unicfdlab / hybridCentralSolvers

United collection of hybrid Central solvers - one-phase, two-phase and multicomponent versions
GNU General Public License v3.0
95 stars 59 forks source link

stabilization problem #56

Open dimaZloy opened 1 year ago

dimaZloy commented 1 year ago

Hei!

I have some challenges to run a simple 2.25 Mach nozzle problem since the solver crashes with negative Temperature/Pressure fields. I observe similar behavior for Ansys Fluent with the same setup, but in Fluent its solvable just by settings of the min/max density and pressure. I looked over the code and don't see any limiting factors or, I just missed something? In practice, it will be useful to have this option to be configurable in the solver's settings.

Thanks, Dmitry

dimaZloy commented 1 year ago

ahhh, i forgot about std capabilities: functions { limitT { type limitFields; libs (fieldFunctionObjects); fields (T); limit both; min 50; max 1000; log false; writeControl none; } }

mkraposhin commented 11 months ago

ahhh, i forgot about std capabilities: functions { limitT { type limitFields; libs (fieldFunctionObjects); fields (T); limit both; min 50; max 1000; log false; writeControl none; } }

Exactly!

mkraposhin commented 11 months ago

However, I must admit that usually negative temperature / pressure mean a problem with numerical model settings, that comes from: low grid quality (it's better to use uniform cubic cells), numerical scheme properties, wrong boundary conditions, wrong model constants (Cp, Cv, etc).

So, instead of limiting temperature / pressure / density (however, sometime it is the only option), I would recommend to try changing case settings.

For example, you can start with Euler + upwind schemes for temporal and spatial terms. In this case your solution will be very diffusive, but it can be used to debug BC, model constants. After that I would recommed to switch to Minmod/vanLeer schemes and after that - to backward.

In some cases we used combined schemes: with upwind in high-speed flow regions (Ma > 5) and Minmod in slow regions.