|
[Sponsors] |
July 8, 2019, 22:08 |
rho and rhoFinal in fvSolution and others
|
#1 |
Senior Member
LT
Join Date: Dec 2010
Posts: 104
Rep Power: 15 |
Hi, everyone, I got several questions about rho in a supersonic case.
In the fvSolution file, rho and rhoFinal are listed as follows: rho { solver PCG; preconditioner DIC; tolerance 1e-05; relTol 0.1; } rhoFinal { $rho; tolerance 1e-05; relTol 0; } And in the out file which tracks the calculating procedure, T gas min/max = 430, 623.672 GAMG: Solving for p, Initial residual = 2.26273e-05, Final residual = 7.51315e-18, No Iterations 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.57103e-16, global = 1.94956e-19, cumulative = -3.49727e-10 rho max/min : 0.910176 0.370584 GAMG: Solving for p, Initial residual = 3.09174e-09, Final residual = 3.09174e-09, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.05469e-09, global = -2.805e-10, cumulative = -6.30226e-10 rho max/min : 0.910176 0.370584 "rho max/min" here means the density of the ambient gas? PCG dose not work here? In other cases, just rho {diagonal}, and other options? Which is better? In the PIMPLE parameters, PIMPLE { transonic no; nCorrectors 2; nNonOrthogonalCorrectors 0; momentumPredictor yes; } In the supersonic case, any changes to the parameters, like "transonic yes"? In the same case, the out file says as the time moves on, the max rho increases while the min rho decreases to zero in "rho max/min". T gas min/max = 292.05649, 560.16501 GAMG: Solving for p, Initial residual = 6.9122646e-08, Final residual = 6.0178226e-17, No Iterations 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.4710115e-16, global = 8.989728e-18, cumulative = -4.0886722e-11 rho max/min : 2.6846574 0 GAMG: Solving for p, Initial residual = 1.2631451e-14, Final residual = 1.2631451e-14, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 3.8377566e-15, global = -3.1919617e-16, cumulative = -4.0887041e-11 rho max/min : 2.6846574 0 While at the beginning, the typical message are: T gas min/max = 292.05649, 560.16501 GAMG: Solving for p, Initial residual = 6.8756424e-08, Final residual = 5.8489247e-17, No Iterations 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.4692626e-16, global = 1.162629e-17, cumulative = -2.3113945e-12 rho max/min : 1.2973163 0.22735949 GAMG: Solving for p, Initial residual = 1.2201536e-14, Final residual = 1.2201536e-14, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 3.7178298e-15, global = -3.1773557e-16, cumulative = -2.3117123e-12 rho max/min : 1.2973163 0.22735949 Then some loops after rho becomes zero, something bad happens, "floating point exception" --- BOOM!!! It should be noted that this bad thing always happens in the almost same task, like task 31. Dose the task 31 means the subdomain 31? T gas min/max = 292.05649, 560.16501 GAMG: Solving for p, Initial residual = 6.9122656e-08, Final residual = 6.056107e-17, No Iterations 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.4693461e-16, global = 9.095551e-18, cumulative = -4.0887342e-11 rho max/min : 2.6846531 0 yhrun: error: cn11982: task 31: Floating point exception yhrun: First task exited 60s ago yhrun: tasks 0-30,32-479: running yhrun: task 31: exited abnormally yhrun: Terminating job step 11863880.0 slurmd[cn9820]: *** STEP 11863880.0 KILLED AT 2019-07-07T03:46:26 WITH SIGNAL 9 *** yhrun: Job step aborted: Waiting up to 2 seconds for job step to finish. slurmd[cn9820]: *** STEP 11863880.0 KILLED AT 2019-07-07T03:46:26 WITH SIGNAL 9 *** yhrun: error: cn12237: tasks 288-299: Killed This happens with sprayFoam in a supersonic case which turns the switch "coupled" on in the sprayCloudProperties file. It never happens while this switch is turned off. Any clue, suggestion, comment or help? |
|
July 9, 2019, 22:39 |
|
#2 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
This signals divergence. "rho max/min" indicates the maximum and minimum density in the field. OpenFOAM uses these to allow you to check the calculations. Obviously, if the density at some spots goes to 0, it's no good. Normally this shouldn't happen though, for example if you are using the ideal gas law, 0 density corresponds to infinite temperature (rho = p/RT). Therefore, this clearly suggests that your calculation is diverging. Check your boundary conditions first, then think about the numerics.
I'm not sure about the transonic options, but you should have nOuterCorrectors set to some number (in the PIMPLE entry) instead of nothing. Typically it should be around 5~100. PCG should be a good linear solver, I don't think it is causing problems. About the "diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0" line, you can search the forum for more details, or take a look at some textbooks for numerical methods. It has something to do with the fact that the coefficient matrix for calculating density has only diagonal terms, and obviously you don't need to do any iterations to solve it. |
|
July 10, 2019, 05:27 |
|
#3 |
Senior Member
LT
Join Date: Dec 2010
Posts: 104
Rep Power: 15 |
cryabroad, thanks!
Now it's very clear this exception occurs due to the density. I follow one tutorial case to define the fixed wall and the nozzle exit zone of the liquid fuel supersonicFreestream instead of fixedValue (0 0 0). It's my first time to do supersonic calculation, I am not sure this boundary condition is right. |
|
July 15, 2019, 10:36 |
|
#4 |
Senior Member
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8 |
Hey, if you can use at least 2 as value for correctors:
nCorrectors 2; nNonOrthogonalCorrectors 2; for this particolar problem, use also a very small relaxator factor for rho, for exampple 0.1 can be correct. Furthemore, use the term bouded in the FvSchemes. Least, use mu=0 in trasportProperties. It is not correct, but help you to find a solution. Not a correct solution, but next to the correct one. |
|
Tags |
coupled, openfoam, sprayfoam, supersonic |
|
|