Sudden Density Decrease Before Cons-Prim Conversion #482
Replies: 2 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
-
Negative densities and other violations of physical constraints are a fact of life for multidimensional simulations. Mass might simply be advected out of a cell in several directions in one step, such that the change in mass exceeds the original amount. This can happen even while obeying stability constraints like the CFL condition. In one dimension it's easy enough to employ algorithms that avoid negative densities. However, with multiple dimensions, this requires particular care, with things like multidimensional Riemann solvers (Athena, like most codes, does not have these) and possibly quite small timesteps. The code knows that a negative density will lead to nans, so it replaces anything below the floor with the floor ( |
Beta Was this translation helpful? Give feedback.
-
I am experiencing a halting problem in my simulation where the timestep suddenly plummets, sometimes by 15 orders of magnitude in a single timestep. I have tracked this down to an excessively high velocity that appears within a single timestep. This is accompanied by a sudden drop in density.
My current belief is that for some reason a density drop is occuring before the cons-prim conversion which for a set momenta leads to incredibly high velocities. However none of my custom source terms decrement the density, they only update the momenta of gas.
I have checked the functionality of my source terms and they do not (to the best of my knowledge) suddenly boost the momenta of cells.I have turned off viscosity and am running without magnetic fields/relativity.
Obviously this is quite a specialised problem that is likely directly tied to my own custom additions. I just wanted to see if anyone else had experienced similar problems.
Beta Was this translation helpful? Give feedback.
All reactions