I don’t think you can use if statements in the ini file, but I might be wrong. There is support for max and min functions, but I think that you should try using tanh functions.
i.e. u = 0.5 + 0.5tanh(100*x), approximately gives a step function.
If you use tanh(c*x) and increase c, after the function is sampled to grid it will look identical to the discontinuous function. This the same method Tarik has used in our recent shock capturing work, including when Tarik has run the 2D Riemann problem.
In terms of your grid, it is hard to say from eye balling the mesh file if it will work. But when you run pyfr import does it throw any errors?
A discontinuous function makes no sense within the context of a high order method wherein the solution inside of each element is represented by a smooth polynomial. Hence, Will’s suggestion to use tanh with a suitable constant (which will be more robust against round off errors and minor perturbations in solution point placement).
You mean resolution is the sparsity of grid? In the slip wall condition, I set the grid from 2020 to 400400, it also comes with “Minimum sized time step rejected”. But when I set the sub-out-fp, it can work, but the result is also wrong. As shown below, but the bottom of density contour comes with vortex.
Simulation of sod tube in 1D
In PyfR, a two-dimensional grid is used to simulate the one-dimensional shock tube problem. On the top, bottom, left and right of the grid, I tried some boundary conditions. The results are wrong.
I’m not really sure what to tell you, slip wall boundaries are what are required for this case. Anything else may be stable but it’ll be wrong. It could be that the large gradients at the wall are enough to make the scheme unstable. If I’m not mistake the gradients appear in this boundary condition. You could try stripping those out so it’s more like the Euler slip BC.
Yep, pyfr can’t simulate 1D problems, so you have to use a 2D domain. This is the configuration you want:
Slip wall
_________________________________________
| | | | | | | | | | | | | | |
Left BC | | | | | | | | | | | | | | | Right BC
|__|__|__|__|__|__|__|__|__|__|__|__|__|__|
Slip wall