I’m running a simulation in pyFR but I noticed that the results are not correct due to the fact that the outlet boundary condition (char-riem-inv) is not respected.
Here is my .ini file regarding outlet
u2 = 201.97914732939512
v2 = -214.57234097906817
rho2 = 0.008134093472774547
p2 = 583.3367859280097
[soln-bcs-outlet]
type = char-riem-inv
rho = rho2
u = u2
v = v2
p = p2
Attached there is the outlet pressure profile
Do you have any suggestions?
If you want to exactly fix the pressure why are you using a characteristic Riemann invariant condition? To fix the pressure you want sub-out-fp. Now is this what you want? I doubt it, since hard fixing the pressure makes it difficult for things such as vortices to leave the domain.
It can be quite annoying, when simulating turbomachinery, to get an exact operating point. This is because you sort of have to guess the pressure loss coefficient. You may have to iterate a little bit changing the boundary conditions in order to get the exact condition you want.
Also just to further Freddie’s point, the characteristic Riemann invariant boundary condition iterativley solves the Riemann problem based on the specified condition and the interpolated value at the boundary. This means that the condition isn’t exactly set at the outlet. (I’ve actually had the flow in a duct reserve because of this). It would actually be unphysical to fix pressure, density and velocity at the outlet. The only time physically you can set all three is a supersonic inlet.
Thanks a lot for your answer!
So basically it is just a matter of repeating with different p2 values that are the non target one and try to see how close you can get with it to the target values? There is basically not a possibility of knowing this a priori.
Last question, in your T106 case from the test cases of HOW, how have you chosen your outflow angle to properly set u2 and v2 from the magnitude of the outlet velocity?
It would make use of the externs functionality in the backend along with the ability of boundary conditions to set and update variables at runtime (via _set_external). This would enable the BC to change the pressure every time step.
One last point (hopefully) is how to directly get the time information within a mako kernel? i tried with ${t} but it fails even if externs='ploc, t is in the mako template
This condition is not consistent as every point on the boundary will be enforcing its own pressure.
Again, if the change was as simple as the above, it would have been implemented a while ago. However, as I mentioned above it requires modifications to the boundary condition class and the use of externals (and a root finding algorithm and boundary-integration routine).
just a question regarding the correction you apply at the outflow to get the correct pressure jump.
In your papers I’ve found δpo = 0.002285 (MTU turbine paper) and δpo = - 0.00728716915 (T106 turbine paper). How did you come up with those values? Could you please explain it a little more?
You simply update the contents of the array. This can be seen in the turbulence plugin. We declare a variable here:
and then update it here:
Note that it only works for array types (not scalars, which go through a different code path), although a broadcasted array wih a single element will enable you to emulate scalar arguments.
You’ll want to check your array description. broadcast-col only makes sense for 2D kernels (rows and columns) and must be of size (..,neles). 1D kernels have their own constraints (but a form of broadcasting is still supported).