Problems with compressible NS in a ball

118 views
Skip to first unread message

Lautaro Alvear

unread,
Jun 30, 2025, 7:05:58 PMJun 30
to Dedalus Users
Hello Dedalus experts.

I am trying to solve the compressible Navier-Stokes equations with an ideal-gas equation of state in a ball domain with entropy and density as the independent variables, such that the equations to be solved are
Screenshot from 2025-06-30 18-36-55.png

I've built the code that tries to solve these equations and I have tried with many values for the parameters of the simulations but I haven't been able to have success with it, since in the second or third iteration all the variables have values nan.

I've tried solving for \ln rho and rho, multiple choices for the parameters, random initial conditions and a set initial condition for rho and s (included in the script below) without any success.

I was wondering if someone else has tried solving a similar set of equations in a ball basis and if they've ran into similar problems or if someone has any insight on why my code is failing.

Regards,
Lautaro.

CompressibleNS.py

Keaton Burns

unread,
Jun 30, 2025, 9:25:55 PMJun 30
to dedalu...@googlegroups.com
Hi Lautaro,

It’s important to implicitly integrate the stiff terms, meaning you should put a linearized version of the viscous term on the LHS and subtract the same from the RHS. Typically you also only want to impose boundary conditions and have tau terms for the fields that are being diffused, so just velocity and entropy (if you add thermal diffusion), but not density.

Best,
-Keaton


--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dedalus-users/d6203437-73e7-4a87-92c4-9a02a5f98d0en%40googlegroups.com.


Lautaro Alvear

unread,
Jul 1, 2025, 4:21:09 PMJul 1
to Dedalus Users
Thanks Keaton for your help.

Best Regards,
Lautaro.

Ben Brown

unread,
Jul 1, 2025, 5:02:10 PMJul 1
to dedalu...@googlegroups.com
Lautaro,
      Depending on the speed of your flows (u) vs sound waves in your system (sqrt(gamma*P/rho), you may also have substantial stiffness in your grad(P)/rho term in the momentum equation.

Various of us have been interested in approaches to those for years, and we've had success solving them in Dedalus, which may give you some hints on how to proceed.

Some starting points (direct journal links, as these are open access):


--Ben

Reply all
Reply to author
Forward
0 new messages