- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **RhoSimpleFoam problem with patch**
(*http://www.cfd-online.com/Forums/openfoam-solving/58866-rhosimplefoam-problem-patch.html*)

Hi foamusers,
I am tryinHi foamusers,
I am trying to run a compressible steady state problem with rhosimplefoam solver. The patches are something like this:- Inlet- pressure - fixedvalue 1.2 - velocity - pressureInletvelocity outlet - pressure - fixedvalue 1 - velocity - zerogradient After running for 3 time step, it stops abrupty like this: /home/343880/OpenFOAM/343880-1.4.1/run/tutorials/rhoExplicitPorousSimpleFoam Case : channel-mv-sy Nprocs : 1 Create time Create mesh for time = 0 Reading thermophysical properties Selecting thermodynamics package hThermo<puremixture<sutherlandtransport<speciether mo<hconstthermo<perfectgas>>>> > Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model laminar Starting time loop Time = 1 smoothSolver: Solving for Ux, Initial residual = 0.999941, Final residual = 0.0828475, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.999941, Final residual = 0.091559, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0986704, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 0.435509, Final residual = 0.0101943, No Iterations 1 GAMG: Solving for p, Initial residual = 1, Final residual = 0.0436432, No Iterations 2 time step continuity errors : sum local = 3.80816e-05, global = -2.77424e-05, cumulative = -2.77424e-05 bounding p, min: 1.00109 max: 1.10057 average: 1.04803 rho max/min : 6.89377e-05 1.15862e-05 ExecutionTime = 0.43 s ClockTime = 0 s Time = 2 smoothSolver: Solving for Ux, Initial residual = 0.160346, Final residual = 0.0156449, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.432668, Final residual = 0.0365237, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 0.999207, Final residual = 0.0467854, No Iterations 4 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.0254643, No Iterations 1 GAMG: Solving for p, Initial residual = 1, Final residual = 0.0295425, No Iterations 3 time step continuity errors : sum local = 0.0499758, global = 0.00909272, cumulative = 0.00906498 bounding p, min: 16.5489 max: 60.9572 average: 30.2185 rho max/min : 0.000162646 1.15862e-05 ExecutionTime = 0.59 s ClockTime = 1 s Time = 3 smoothSolver: Solving for Ux, Initial residual = 0.365917, Final residual = 0.0183303, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.395495, Final residual = 0.0049005, No Iterations 4 smoothSolver: Solving for Uz, Initial residual = 0.387345, Final residual = 0.0231165, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 0.933419, Final residual = 0.0256051, No Iterations 1 #0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: [0x110420] #3 Foam::hThermo<foam::puremixture<foam::sutherlandtr ansport<foam::speciethermo<foa m::hconstthermo<foam::perfectgas> > > > >::calculate() in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so" #4 Foam::hThermo<foam::puremixture<foam::sutherlandtr ansport<foam::speciethermo<foa m::hconstthermo<foam::perfectgas> > > > >::correct() in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so" #5 main in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/rhoSimpleFo am" #6 __libc_start_main in "/lib/libc.so.6" #7 Foam::regIOobject::readIfModified() in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/rhoSimpleFo am" Floating point exception Can anybody suggest something? regards, nishant |

Your pressure looks really reaYour pressure looks really really low.
(Do you have the correct units?) Unless you have a very modest resistance, you should also try the implicit formulation. |

Hi Nishant
You have a signiHi Nishant
You have a significant continuity error, which I think originate from the fact, that you have a large residual in your solution to the pressure. Try to add one or two more iterations in the pressure. Hopefully that will help somewhat. - Niels |

dimension for pressure is:
didimension for pressure is:
dimensions [1 -1 -2 0 0 0 0]; which look okay to me. I tried my solver with higher pressure like 2, 3 , 11. but all failed in similar way. Nishant |

Hi Neils ..
Thanks for the reHi Neils ..
Thanks for the reply. how can I add more iteration to the pressure? can you tell me from where i can change the number of iteration? Nishant |

Hi
You can change it in
Hi
You can change it in /case/system/fvSolution There is an entry called PISO, where you change the nCorrectors to a higher value. Here you can also set nonOrthogonalityCorrectors if needed. - Niels |

Thanks Neils.
Since its a Thanks Neils.
Since its a steadystate solve, so there is SIMPLE instead of PISO. i change the ncorrectors to higher values like 4 for SIMPLE. but there is no effect on residual and simulation is still crashing after 3 time steps. Now the output is: Create mesh for time = 0 Reading thermophysical properties Selecting thermodynamics package hThermo<puremixture<sutherlandtransport<speciether mo<hconstthermo<perfectgas>>>> > Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model laminar Starting time loop Time = 1 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0452055, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0416017, No Iterations 4 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0986704, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 0.525665, Final residual = 0.0347495, No Iterations 2 GAMG: Solving for p, Initial residual = 1, Final residual = 0.0436432, No Iterations 2 GAMG: Solving for p, Initial residual = 0.0199054, Final residual = 0.000583828, No Iterations 5 time step continuity errors : sum local = 11169.4, global = -5860.9, cumulative = -5860.9 rho max/min : 1.39034 1.15862 ExecutionTime = 0.48 s ClockTime = 1 s Time = 2 smoothSolver: Solving for Ux, Initial residual = 0.35641, Final residual = 0.00800959, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.448542, Final residual = 0.0159096, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 0.50882, Final residual = 0.00394456, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.087616, No Iterations 1 GAMG: Solving for p, Initial residual = 1, Final residual = 0.0303177, No Iterations 5 GAMG: Solving for p, Initial residual = 0.00260182, Final residual = 8.9025e-05, No Iterations 5 time step continuity errors : sum local = 1761.83, global = -720.736, cumulative = -6581.64 rho max/min : 2.66976e+07 1.15862 ExecutionTime = 0.7 s ClockTime = 1 s Time = 3 smoothSolver: Solving for Ux, Initial residual = 0.46346, Final residual = 0.0272365, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.489989, Final residual = 0.0350318, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 0.640354, Final residual = 0.0195653, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.052648, No Iterations 3 #0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: [0x110420] #3 Foam::hThermo<foam::puremixture<foam::sutherlandtr ansport<foam::speciethermo<foa m::hconstthermo<foam::perfectgas> > > > >::calculate() in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so" #4 Foam::hThermo<foam::puremixture<foam::sutherlandtr ansport<foam::speciethermo<foa m::hconstthermo<foam::perfectgas> > > > >::correct() in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so" #5 main in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/rhoSimpleFo am" #6 __libc_start_main in "/lib/libc.so.6" #7 Foam::regIOobject::readIfModified() in "/home/343880/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/rhoSimpleFo am" Floating point exception Nishant |

I even tried changing the toleI even tried changing the tolerance and relTol of the p. but that also didnt help.
Nishant |

dimension for pressure is:
dQuote:
What sort of Knudsen number do you have for this flow? Did you already add some rarified correction to the solver or is it unnecessary? |

Thanks Mark,
in fact we arThanks Mark,
in fact we are planing to simulate the standing sound waves in these pressure ranges. Before that I felt that the solver is crashing with even fixedValue patch. The low pressure values are actually the relative pressures. But I tried running the case with totalPressure boundary condition as well and still the same result.! I have checked the navier stoke equation for the solver but how come I say that its valid or not? The Navier stokes equation is solving for convection, diffusion and laplacian terms and I am ok with that. Could you please tell me how to check the validity of the NS eqn? knudsen number is very low for these cases. Approx in range of 10-5 to 10-7. I tried some variation with the PISO corrector but they didnt help much. Nishant |

Nishant,
From your explanatNishant,
From your explanation, what you are trying to do really doesn't fit together at all. You wish to specify a relative pressure, but I don't know how this is supposed to work with the rhoSimpleFoam solver. I can't see where the pressure datum should be comming from. From the output of the first iteration, it is quite evident that the pressure datum is indeed 0 Pa (ie, the rhoSimpleFoam is using absolute pressures): Quote:
Changing to a thermodymamic pressure won't change much here. Give what you are trying to simulate, I suspect you know a lot more about this field than I do. However, assuming a pressure datum of 100kPa, you should note that the pressure perturbations are at least 5 orders of magnitude smaller! An acoustic formulation, in which the perturbations are resolved directly, might prove more useful. If the convective component is small and there are no large thermal gradients, the flank of the pressure waves might be shallow enough that a linearized acoustic solution might work. If the above assumptions are indeed true, a BEM or FEM method might be a better choice to consider. Unfortunately I know really nothing about acoustics per se, so I can't help you further. But if you do find a good solution, please let us know - it is a potentially really interesting area. |

Thanks for the reply Mark. SorThanks for the reply Mark. Sorry for late.
I am currently working with rhopSonicfoam to simulate my problem as it is a pressure-density based solver and most likely suitable for my problem. But my runs are repeatedly crashing around 0.49sec with high courant number. However its working quite fine with incompressible steady state solver simpleFoam. I therefore tried to run my case on rhoSimple foam, which is also a compressible steady state solver, to know whether it has something to do with time marching issues. I will soon try running it with rhosimplefoam case with suggestion u have given. I am also not sure about the pRefCell and prefValue. what value should i put for prefvalue for my case where i kept inlet boundary as totalpressure (104599pa). prefcell i took the first cell in outlet boundary of /constant/polymesh/boundary file. Is it ok? Nishant |

Hi Nishant
The specificatioHi Nishant
The specification of pRefCell and pRefValue is only used if you are having gradient conditions on all boundaries, because the Poisson equation become non-unique if a level for the pressure is not specified. As long as you are specifying a pressure on the boundary, then pRefCell is not used. Best regards, Niels |

Thanks Niels,
This was veryThanks Niels,
This was very helpful. Hi Mark, I am attaching my boundary condition files here please go through them and if you have some time then please try running it on either rhopSonicFoam or rhoSimpleFoam on your machine and let me know what you feel is going wrong. http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif p http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif U http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif T Thanks in advance, Nishant |

Hi Nishant
I might have comHi Nishant
I might have come around for a solution ... I have been trying for rather long time to solve one of the most classic problems, namely the Poiseuille flow, to test the calculation of my bed shear stresses. First I tried icoFoam, and it gave me significant problems when I specified pressure at both inlet and outlet, whereas gradient in p at inlet together with velocity field went succesfully. Trying different solvers, some succeeded and others gave rise to unbounded pressures. Finally I figured out that the momentum-correction before the PISO loop caused the instabilities, but in icoFoam and also in rhoSimpleFoam this momentum-correction is not controlled from the fvSolution-file, thus if you comment line 12 in ~/OpenFOAM/OpenFOAM-1.4.1/applications/solvers/compressible/rhoSimpleFoam/UEqn.H which looks like: solve(UEqn() == -fvc::grad(p)); you might get an improvement in your results. Some of you clever people out there would be very helpful, if you could explain why the momentum-correction causes such instabilities? Even more interesting would be to know when to use it? Thanks in advance and best regards. Niels |

Shock wave with rhoSimpleFoamHi all,
I am using rhoSimpleFoam solver to solve compressible air flow in a converging-diverging nozzle. Can this solver compute supersonic flow and take account for shock wave in the diverging part of the nozzle? The boundary condition are: To=573K Pin = 10e5 Pa Pout = variable Uin = PressureInletOutletVelocity = (0 0 0) Thank you very much Sylvain |

All times are GMT -4. The time now is 03:28. |