|
[Sponsors] |
compressibleInterFoam diverging Temperature/Velocity problem |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 11, 2016, 03:18 |
compressibleInterFoam diverging Temperature/Velocity problem
|
#1 |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
Hi to all,
I am trying to run laval Nozzle simulations using compressibleInterFoam. Nozzle has 3 inlets, 2 of them are liquid nitrogen whereas other one gas nitrogen. I tried several boundary condition, however finally always getting number of iterations exceeded based on final Temp became negative whereas the velocity is too high. My boundary conditions are as follows: alphaLiquid: Code:
boundaryField { inletliq1 { type fixedValue; value uniform 1; } inletliq2 { type fixedValue; value uniform 1; } inletgas { type fixedValue; value uniform 0; } hotplate { type zeroGradient; } outlet { type zeroGradient; // type calculated; // value uniform 0; //type inletOutlet; // inletValue $internalField; } frontAndBack { type empty; } } Code:
inletliq1 { type fixedValue; value uniform (15 0 0); } inletliq2 { type fixedValue; value uniform (15 0 0); } inletgas { type fixedValue; value uniform (15 0 0); } hotplate { type fixedValue; value uniform (0 0 0); } outlet { // type zeroGradient; type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } frontAndBack { type empty; } Code:
boundaryField { inletliq1 { type zeroGradient; /* type totalPressure; phi rhoPhi; rho rho; psi none; gamma 1.4; p0 uniform 2.8e5; value uniform 2.8e5;*/ } inletliq2 { type zeroGradient; /* type totalPressure; phi rhoPhi; rho rho; psi none; gamma 1.4; p0 uniform 2.8e5; value uniform 2.8e5;*/ } inletgas { type zeroGradient; /* type totalPressure; phi rhoPhi; rho rho; psi none; gamma 1.4; p0 uniform 2.8e5; value uniform 2.8e5;*/ } hotplate { type zeroGradient; // gradient uniform 0; // value uniform 100000; } outlet { type totalPressure; phi rhoPhi; rho rho; psi none; gamma 1.4; p0 uniform 100000; value uniform 100000; } frontAndBack { type empty; } Code:
inletliq1 { type fixedValue; value uniform 64; } inletliq2 { type fixedValue; value uniform 64; } inletgas { type fixedValue; value uniform 64; } hotplate { type zeroGradient; } outlet { type fixedValue; value uniform 300; } frontAndBack { type empty; } Code:
divSchemes { div(phi,alpha) Gauss vanLeer01; //vanLeer div(phirb,alpha) Gauss linear; div(rhoPhi,U) Gauss upwind; div(phi,thermo:rho.N2liquid) Gauss upwind; //vanLeer01; div(phi,thermo:rho.N2gas) Gauss upwind; //vanLeer01; //upwind; div(rhoPhi,T) Gauss upwind; div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; div(phi,k) Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } Code:
PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0.047367522 Min(alpha.N2liquid) = -4.1378651e-09 Min(alpha.N2gas) = -8.197836e-09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00057059475, Final residual = 9.6696153e-11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00017737476, Final residual = 2.5523847e-11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.5862065e-05, Final residual = 5.1625609e-09, No Iterations 1 min(T) 1.0603252e-06 GAMG: Solving for p_rgh, Initial residual = 4.5001306e-05, Final residual = 2.4484333e-14, No Iterations 1 max(U) 151.60039 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 4.1897599e-06, Final residual = 2.2659211e-15, No Iterations 1 max(U) 151.60044 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 3.8525366e-06, Final residual = 2.6463465e-16, No Iterations 1 max(U) 151.60044 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 3.8402215e-06, Final residual = 3.8142587e-23, No Iterations 1 max(U) 151.60044 min(p_rgh) 100000 ExecutionTime = 1132.48 s Courant Number mean: 0.04020333 max: 0.24664585 deltaT = 3.4425687e-08 Time = 0.0008864852698 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0.047356642 Min(alpha.N2liquid) = -6.7193432e-08 Min(alpha.N2gas) = -3.1465242e-09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00056220914, Final residual = 9.531315e-11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00017542992, Final residual = 2.5257089e-11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.5606028e-05, Final residual = 5.0761703e-09, No Iterations 1 min(T) 2.073488e-07 GAMG: Solving for p_rgh, Initial residual = 4.5783127e-05, Final residual = 2.5054008e-14, No Iterations 1 max(U) 151.69519 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 4.5587802e-06, Final residual = 2.2455038e-15, No Iterations 1 max(U) 151.69523 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 4.2241096e-06, Final residual = 2.7998571e-16, No Iterations 1 max(U) 151.69523 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 4.2032737e-06, Final residual = 4.560433e-23, No Iterations 1 max(U) 151.69523 min(p_rgh) 100000 ExecutionTime = 1132.52 s Courant Number mean: 0.040201488 max: 0.24679589 deltaT = 3.4425687e-08 Time = 0.0008865196955 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0.047345767 Min(alpha.N2liquid) = -3.653193e-09 Min(alpha.N2gas) = -3.1586107e-09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00049636171, Final residual = 8.3886739e-11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.0001596781, Final residual = 2.2907359e-11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.3608802e-05, Final residual = 4.4344118e-09, No Iterations 1 min(T) -5.9874863e-07 GAMG: Solving for p_rgh, Initial residual = 4.9065333e-05, Final residual = 2.5108673e-14, No Iterations 1 max(U) 151.78778 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 7.5718612e-06, Final residual = 2.1709276e-15, No Iterations 1 max(U) 151.78782 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 7.2286592e-06, Final residual = 2.5013507e-16, No Iterations 1 max(U) 151.78782 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 7.2137334e-06, Final residual = 3.0444005e-23, No Iterations 1 max(U) 151.78782 min(p_rgh) 100000 ExecutionTime = 1132.56 s Courant Number mean: 0.040198901 max: 0.24695147 deltaT = 3.4425687e-08 Time = 0.0008865541212 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0.047334892 Min(alpha.N2liquid) = -3.2573147e-09 Min(alpha.N2gas) = -3.1638578e-09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00054769955, Final residual = 9.3002095e-11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00017190608, Final residual = 2.4799912e-11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.5173815e-05, Final residual = 4.9445499e-09, No Iterations 1 [8] [8] [8] --> FOAM FATAL ERROR: [8] Maximum number of iterations exceeded [8] [8] From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar)const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar)const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar)const) const [with Thermo = Foam::hConstThermo<Foam::perfectFluid<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectFluid<Foam::specie> >, Foam::sensibleInternalEnergy>] [8] in file /opt/OpenFOAM/OpenFOAM-3.0.x/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 66. [8] FOAM parallel run aborting [8] [8] #0 Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libOpenFOAM.so" [8] #1 Foam::error::abort() in "/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libOpenFOAM.so" [8] #2 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectFluid<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() in "/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libfluidThermophysicalModels.so" [8] #3 Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectFluid<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() in "/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libfluidThermophysicalModels.so" [8] #4 Foam::twoPhaseMixtureThermo::correct() in "/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libtwoPhaseMixtureThermo.so" [8] #5 ? in "/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt32Opt/bin/compressibleInterFoam" [8] #6 __libc_start_main in "/lib64/libc.so.6" [8] #7 ? in "/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt32Opt/bin/compressibleInterFoam" -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 8 in communicator MPI_COMM_WORLD with errorcode 1. Is there anyone that can give some suggestion. Thank you in advance. |
|
January 11, 2016, 12:27 |
|
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 |
First and most important step.
You should run checkMesh. If your nonOrthogonality is above 50 add nonOrthogonalCorrectors. If it is above 60 consider remeshing. The aspect ratio is another big problem for the interfoam solvers from my experience. nOuterCorrectors can be increased and relaxation factors added. However those are all just measures to counteract bad meshes. Please post the checkMesh log. Are you using a turbulence model? Some things that might help, but probably won't. You could try adding this to your grad schemes: Code:
grad(U) cellLimited Gauss linear 1; |
|
January 11, 2016, 20:21 |
|
#3 | |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
Quote:
Thank you for your suggestions. I am running the case using 2D geometry and turbulence model is not so big deal. first, I just want to fix problem which I mentioned above. (Velocity is extremely increasing almost 15~20 times larger than inlet velocity, whereas Temp is going to negative...) This is checkMesh: Code:
Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 127512 internal points: 0 faces: 252530 internal faces: 125020 cells: 62925 faces per cell: 6 boundary patches: 6 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 62925 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology inletliq1 20 42 ok (non-closed singly connected) inletliq2 20 42 ok (non-closed singly connected) inletgas 25 52 ok (non-closed singly connected) hotplate 1060 2124 ok (non-closed singly connected) outlet 535 1072 ok (non-closed singly connected) frontAndBack 125850 127512 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (0 -0.008 -0.0001) (0.024 0.008 0.0001) Mesh has 2 geometric (non-empty/wedge) directions (1 1 0) Mesh has 2 solution (non-empty) directions (1 1 0) All edges aligned with or perpendicular to non-empty directions. Boundary openness (-2.4370059e-17 -1.1251536e-17 1.1104837e-15) OK. Max cell openness = 2.178075e-16 OK. Max aspect ratio = 4.517634 OK. Minimum face area = 3.2677224e-10. Maximum face area = 3.2916764e-08. Face area magnitudes OK. Min volume = 6.5354449e-14. Max volume = 2.3984089e-12. Total volume = 3.509564e-08. Cell volumes OK. Mesh non-orthogonality Max: 46.2859 average: 5.8587258 Non-orthogonality check OK. Face pyramids OK. Max skewness = 1.0520423 OK. Coupled point location match (average 0) OK. Mesh OK. End I set also the fvSolution as you suggested: Code:
PIMPLE { momentumPredictor yes; transonic no; nOuterCorrectors 3; nCorrectors 4;//2; nNonOrthogonalCorrectors 1; } Any other request? Thank you. |
||
January 12, 2016, 04:26 |
|
#4 |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
As an adiditon, I also commented out TEqn.H to see whether it affects or not velocity increasing. However, no solution. still velocity is increasing extremely high and giving same error which i post at #1.
Any suggestion will be appreaciated. thank you |
|
January 12, 2016, 15:40 |
|
#5 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 |
Your mesh seems alright. Therefore it is most likely a boundary condition.
You set T at your outlet to fixedValue. This needs to be zeroGradient. You can not define it as fixedValue on both inlet and outlet. Did not even see this before. For p_rgh you might try setting hotPlate to fixedFluxPressure. Everything within the p file should be set to calculated. |
|
June 20, 2016, 18:49 |
|
#6 | |
New Member
angela huang
Join Date: Nov 2015
Posts: 6
Rep Power: 10 |
Quote:
your reply is most appreciated. |
||
June 22, 2016, 08:53 |
|
#7 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 |
You should add the changes I talked about. Change the Temperature outlet boundary condition to zeroGradient. Change p_rgh at walls to fixedFluxPressure etc.
|
|
August 14, 2016, 15:46 |
|
#8 |
New Member
Sam Salehian
Join Date: Jul 2016
Posts: 4
Rep Power: 9 |
Hello everyone,
I am using CompressibleInterFoam for a test case of a rectangular computational domain. In my case instead of what Shipman had, I have two walls on the left boundary and an Inlet in the middle. Top and Bottom Patches are free surfaces. And the Right patch is outlet. And as a test case I initialize all the regions to be air. I was getting negative temperature before but using zeroGradiaent at the inlet fixed that problem. (Thanks for all the useful information here) The temperature decreases rapidly but does not become negative anymore. However, I am getting the following error: Code:
Courant Number mean: 0.017525563 max: 0.36055112 deltaT = 3.1316128e-05 Time = 0.01149259369 PIMPLE: iteration 1 MULES: Solving for alpha.water Liquid phase volume fraction = 0.99838497 Min(alpha.water) = 0 Min(alpha.air) = -6.1014024e-05 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for T, Initial residual = 0.0020526023, Final residual = 0.0023329173, No Iterations 1000 min(T) 0.93072415 GAMG: Solving for p_rgh, Initial residual = 0.17359627, Final residual = 6.6372495e-05, No Iterations 1 max(U) 34.502714 min(p_rgh) 52859.589 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #4 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #5 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? #6 ? at ??:? #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 ? at ??:? Floating point exception (core dumped) alpha.water Code:
object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { FrontAndBack { type empty; } Inlet { type zeroGradient; } Outlet { type zeroGradient; } TopAndBottomPatches { type inletOutlet; inletValue uniform 0; value uniform 0; } Walls { type zeroGradient; } } Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { FrontAndBack { type empty; } Inlet { type fixedValue; value uniform (10 0 0); } Outlet { type zeroGradient; } TopAndBottomPatches { type pressureInletOutletVelocity; value uniform (0 0 0); } Walls { type noSlip; } Code:
dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; boundaryField { FrontAndBack { type empty; } Inlet { type zeroGradient; } Outlet { type fixedValue; value uniform 1e5; } TopAndBottomPatches { type totalPressure; p0 uniform 1e5; } Walls { type zeroGradient; } } Code:
dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; boundaryField { FrontAndBack { type empty; } Inlet { type zeroGradient; } Outlet { type fixedValue; value uniform 1e5; } TopAndBottomPatches { type totalPressure; p0 uniform 1e5; } Walls { type fixedFluxPressure; value uniform 0; } } Code:
dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { FrontAndBack { type empty; } Inlet { type fixedValue; value uniform 300; } Outlet { type zeroGradient; } TopAndBottomPatches { type zeroGradient; } Walls { type zeroGradient; } } I would appreciate if someone could give me some guidance on how to resolve the issue and help me understand why this error is happening. Thanks to all, |
|
May 30, 2017, 08:09 |
|
#9 |
New Member
Tong Li
Join Date: Mar 2017
Posts: 2
Rep Power: 0 |
Have you solved your problem. I meet the same problem and cannot figure where the problem is? Your reply is highly appreciated.
|
|
October 30, 2019, 12:24 |
|
#10 |
Member
Join Date: Apr 2018
Location: UK
Posts: 78
Rep Power: 8 |
Hi everyone,
I am having the same problem with diverging temperature and velocity using compressibleInterFoam. I am using OF v5. I am using uniformFixedValue for p_rgh, calculated for p, zeroGradient for T, U and alpha but the simulation still crashes after few time-steps. I have tried several schemes but the simulation fails at more or less the same point in time. Has anyone managed to solve this problem? |
|
February 12, 2020, 12:25 |
|
#11 |
Member
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 7 |
Hey guys,
I know it is a old thread but be careful when you run simulation with Liquid N2. Check in the following path according to your version : /src/thermophysicalModels/thermophysicalProperties/liquidProperties/N2/N2.C If you have: mu_(32.165, 496.9, 3.9069, -1.08e-21, 10.0), you need to add a minus to the coeff in bold because without this correction it compute a dynamic viscosity over 1e+24 Pa.s which is wrong. See this link for more information: https://bugs.openfoam.org/view.php?id=3136 Maybe it can solve your problems with the velocity and temperature. Cheers, |
|
May 7, 2020, 12:04 |
|
#12 |
Member
Join Date: Apr 2018
Location: UK
Posts: 78
Rep Power: 8 |
I am now running a different simulation for internal flow in compressibleInterFoam using air and water.
I still end up having the same problem, i.e. velocity and pressure keep on increasing and increasing until the simulation diverges I've tried all sorts of boundary conditions and changed solver settings but it still keeps having the same issues although at different point in the simulation. I've also suppressed solution of the temperature equation to try and single out the issue but it seems that temperature is NOT causing the problem... Can someone please tell me how they solved this problem?? |
|
March 4, 2023, 01:51 |
|
#13 |
New Member
Xinzhen
Join Date: Nov 2022
Posts: 3
Rep Power: 3 |
Hi, I've been modifying the compressibleInterFoam solver recently as well, and ran into the problem you raised. I found that the calculations are correct when the grid is perfectly orthogonal, but quickly diverge when there are non-orthogonal parts of the grid. Did you solve this problem?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with interFoam; Wave/wiggle alpha1 behavior | JonW | OpenFOAM | 10 | February 4, 2023 07:27 |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 05:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |