Hello,
how may I fix all the variables at a given boundary to a given value?
Best regards
Hello,
how may I fix all the variables at a given boundary to a given value?
Best regards
FR is a discontinuous scheme. Fixing values is inconsistent with this; or to put it another way: the fact the values are prescribed at a boundary does not mean that the solution value at that boundary will be the same value as there are two solutions: one from the boundary side and one from the fluid side. As the scheme is discontinuous these can be different while still being consistent with the PDE.
Regards, Freddie.
Hi Freddie, thanks a lot for the answer.
Then I would kindly ask how would you set up a 2d riemann problem? I got correctly the 4 quadrants but after a while the solution at the boundary starts to “smear” out among the edges of the various zones (I’m currently using sup-in-fa as boundary condition for each of the quadrant)
Best regards
Could you send an image?
Yes sure
This is the initial condition
and this is the flow that develops
but I would expect something like this
Any idea?
Best regards
Have you tried using free (sup-out-fn) BCs or combining it with slip walls for cases that allow it? I believe for that case the flow is parallel/zero along the top and right boundaries, so you could do a slip adiabatic wall there and sup-out-fn BCs on the bottom and left walls if sup-out-fn everywhere doesn’t work (free BCs for all boundaries is typically sensitive to numerical disturbances). The ICs also seem a little strange since your discontinuities aren’t in the center of the domain, is that on purpose?
Hi Tarik,
thanks for the answer
Have you tried using free (sup-out-fn)
Yes but as you pointed out it is subjected to numerical disturbances as you can see in the following picture which refers to a free bc on left and bottom as you recommended but the same happens also with all free bcs.
The ICs also seem a little strange since your discontinuities aren’t in the center of the domain, is that on purpose?
Yes that was a test with a discontinuity located at x=.8, y=.8 in a [0,1]^2 domain. The picture I sent now is located at x=y=1 in a [0,2]^2 domain, but this is not the cause of the issues
Any further idea on how to solve this?
Could you share the mesh and ini file you’re using?
Hi @tdzanic,
thanks for looking into this, mesh and ini file are available at this link
Let me know if you can correctly download them
Best regards
You can prescribe the exact solution at the boundary similarly to what’s done with the double Mach reflection test case, which is the discontinuity propagating at a constant shock speed of roughly v_s = 0.4221156
(downwards on the left boundary and leftwards on the bottom boundary). The ini file would then have:
[soln-bcs-bottom]
type = sup-in-fa
t1 = 0.5 * (1 + tanh(1000000 * (x - 1.0 + t*0.4221156)))
rho = r4 * %(t1)s + r3 * (1 - %(t1)s)
u = u4 * %(t1)s + u3 * (1 - %(t1)s)
v = v4 * %(t1)s + v3 * (1 - %(t1)s)
p = p4 * %(t1)s + p3 * (1 - %(t1)s)
[soln-bcs-right]
type = slp-adia-wall
[soln-bcs-top]
type = slp-adia-wall
[soln-bcs-left]
type = sup-in-fa
t1 = 0.5 * (1 + tanh(1000000 * (y - 1.0 + t*0.4221156)))
rho = r2 * %(t1)s + r3 * (1 - %(t1)s)
u = u2 * %(t1)s + u3 * (1 - %(t1)s)
v = v2 * %(t1)s + v3 * (1 - %(t1)s)
p = p2 * %(t1)s + p3 * (1 - %(t1)s)
It’s not perfect since you’ll get some numerical artifacts where the numerical solution meets the exact solution at the boundary, but with this, I get these results at t=1.1
:
You can adjust your initial discontinuity in the ICs/BCs as you wish.
Hi Tarik,
I’m extremely grateful for your help! Thanks a lot!
Best regards
No problem. I also noticed that your ini file is running Navier-Stokes with mu = 0
. Unless you need to evaluate corrected gradients somewhere, you’ll get a pretty large speedup by switching to Euler.
Thanks for the hint!
This was just because I was also trying the artificial viscosity and was easier to switch between them (simulations were small)