Open skylord-a52 opened 8 months ago
If you look at the function being assigned to checkInv, it is the invariant domain of the equation system being solved for. So for example, the invariant domain of Euler's equations is that the density and pressure are both positive definite.
This assertion, while perhaps not as descriptive as it could be, is just breaking out of the simulation flow when the invariant domain is not satisfied and there is no recovering from this violation (either because you initialized a simulation which violates the invariant domain, or because the simulation could not be prevented from driving outside of the invariant domain, for example if you try to do a fluid simulation with a true vacuum state on one side and the Riemann solve has difficulty resolving the transition from finite density to genuinely 0 density).
Sounds like it's an issue with physicality then. Thanks for your continued help! I'll adjust my initial conditions and see if I can get something that works a bit better.
It would be very helpful if the error not only said what the problem was (that some invariant was violated) but specifically which particular parameter was the issue. In the meantime I can use the debugger to figure things out, but a message to console saying "Density is negative [at x,y=...]" would make things much faster.
Line 495 of
MomentSpecies.lua
raises an error in... some cases, but because there's no descriptive text on the error and no documentation on whatfIn
orcheckInv
, it's impossible to tell what exactly causes the error. I'm guessing there's some issue with either a non-invertible matrix somewhere, or with the definition ofequationInv
in the species definition.Heres my code that's causing the error. (Please note -- this is a bit of a mishmash of different examples at the moment, and because I'm still learning, some of the initial conditions may be nonphysical.)
https://pastebin.pl/view/42736129
When run, the console prints
with no further information.