I have already done a post on supersonic flow over 23 degree wedge. In that post, we were intentionally creating a situation where the shock wave would be detached from the obstacle. The set-up in that case is certainly appropriate when the shock is attached as well. However it is possible to use an even simpler set up for an attached oblique shock.
Because of the simplicity of this set-up I will only cover the very basics of the set-up. If something is unclear, message me or consult the OpenFOAM manual or read one of my other posts.
In the previous set-up we had inflow properties that were at zero angle of attack. This involved creating the wedge using blockMesh. Alternatively, we could have simply set up a rectangular domain with inflow properties at an angle!
This is shown in the following figure:
The key to this approach is the boundary upstream of the wall is in fact an outflow boundary.
The following is a 2D glyph of velocity vectors and a contour plot of Mach number. We can see that we have successfully created the oblique shock situation without having to manually create a wedge geometry! This simplifies the set-up if you were going to do a parametric study or something like that. All you would need to modifiy would be the inflow properties!
In this post I briefly went over a simple way to set up an oblique shock case! Additionally, the oblique shock case could be set up in a fashion similar to that in my other post where I simulate a detached oblique shock wave.
Please let me know if you have questions or comments!
Thanks for reading!