idefix-code / idefix

A fast finite volume code designed to run on many architectures, such as GPU, CPU and manycores, using Kokkos.
https://idefix.readthedocs.io/
Other
28 stars 19 forks source link

BUG: VSI Setup Boundary Condition #262

Open birnstiel opened 1 month ago

birnstiel commented 1 month ago

Describe the issue:

I think the inner radial boundary of the VSI setup is not correct (I hope I'm not being stupid again). This line:

Vc(VX3,k,j,i) = R*Omega;

defines Keplerian rotation for the ghost cells, but just above omega is initialized as Omega = 1.0 and not changed anywhere else. I think Omega can be removed and the velocity could be set as:

Vc(VX3,k,j,i) = 1.0/sqrt(R);

Error message:

No response

runtime information:

Issue is architecture independent.

glesur commented 1 month ago

Yes, well, there is no "perfect" boundary conditions for VSI. The one in the test suite imposes a solid body rotation, so that there is no free energy to tap into in the ghost zones, but it creates artefacts.

The best configuration is to actually add a wave-killing zone. What you propose can help, but is not full-proof, unfortunately.

birnstiel commented 1 month ago

Ok I see. I now saw that the inner boundary is at R=1, hence this is not an issue unless the radial domain is changed.

Somewhat related question: how is the dust boundary condition defined? Does it always equal the gas boundary condition of that side & direction? I.e. if I set a boundary to outflow, it will be outflow in dust and gas while if I set it to userdef I need to define it for both dust and gas? So there is no gas=outflow while dust=userdef?

glesur commented 1 month ago

We have discussed the issue of boundary conditions for gas+dust mixture during the last idefix days. As of now, the boundary conditions are common to every fluid, so if it's outflow for the gas, it's outflow for the dust. This was initially to be retro-compatible with pluto.

The plan is to change that, and define boundary conditions separately for each fluid. I'll therefore keep this issue opened until this is done.