
[Sponsors] 
January 11, 2016, 04:18 
compressibleInterFoam diverging Temperature/Velocity problem

#1 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 123
Rep Power: 5 
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.1378651e09 Min(alpha.N2gas) = 8.197836e09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00057059475, Final residual = 9.6696153e11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00017737476, Final residual = 2.5523847e11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.5862065e05, Final residual = 5.1625609e09, No Iterations 1 min(T) 1.0603252e06 GAMG: Solving for p_rgh, Initial residual = 4.5001306e05, Final residual = 2.4484333e14, No Iterations 1 max(U) 151.60039 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 4.1897599e06, Final residual = 2.2659211e15, No Iterations 1 max(U) 151.60044 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 3.8525366e06, Final residual = 2.6463465e16, No Iterations 1 max(U) 151.60044 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 3.8402215e06, Final residual = 3.8142587e23, 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.4425687e08 Time = 0.0008864852698 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0.047356642 Min(alpha.N2liquid) = 6.7193432e08 Min(alpha.N2gas) = 3.1465242e09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00056220914, Final residual = 9.531315e11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00017542992, Final residual = 2.5257089e11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.5606028e05, Final residual = 5.0761703e09, No Iterations 1 min(T) 2.073488e07 GAMG: Solving for p_rgh, Initial residual = 4.5783127e05, Final residual = 2.5054008e14, No Iterations 1 max(U) 151.69519 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 4.5587802e06, Final residual = 2.2455038e15, No Iterations 1 max(U) 151.69523 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 4.2241096e06, Final residual = 2.7998571e16, No Iterations 1 max(U) 151.69523 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 4.2032737e06, Final residual = 4.560433e23, 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.4425687e08 Time = 0.0008865196955 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0.047345767 Min(alpha.N2liquid) = 3.653193e09 Min(alpha.N2gas) = 3.1586107e09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00049636171, Final residual = 8.3886739e11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.0001596781, Final residual = 2.2907359e11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.3608802e05, Final residual = 4.4344118e09, No Iterations 1 min(T) 5.9874863e07 GAMG: Solving for p_rgh, Initial residual = 4.9065333e05, Final residual = 2.5108673e14, No Iterations 1 max(U) 151.78778 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 7.5718612e06, Final residual = 2.1709276e15, No Iterations 1 max(U) 151.78782 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 7.2286592e06, Final residual = 2.5013507e16, No Iterations 1 max(U) 151.78782 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 7.2137334e06, Final residual = 3.0444005e23, 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.4425687e08 Time = 0.0008865541212 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0.047334892 Min(alpha.N2liquid) = 3.2573147e09 Min(alpha.N2gas) = 3.1638578e09 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.00054769955, Final residual = 9.3002095e11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00017190608, Final residual = 2.4799912e11, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1.5173815e05, Final residual = 4.9445499e09, 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/OpenFOAM3.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/OpenFOAM3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libOpenFOAM.so" [8] #1 Foam::error::abort() in "/opt/OpenFOAM/OpenFOAM3.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/OpenFOAM3.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/OpenFOAM3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libfluidThermophysicalModels.so" [8] #4 Foam::twoPhaseMixtureThermo::correct() in "/opt/OpenFOAM/OpenFOAM3.0.x/platforms/linux64Gcc48DPInt32Opt/lib/libtwoPhaseMixtureThermo.so" [8] #5 ? in "/opt/OpenFOAM/OpenFOAM3.0.x/platforms/linux64Gcc48DPInt32Opt/bin/compressibleInterFoam" [8] #6 __libc_start_main in "/lib64/libc.so.6" [8] #7 ? in "/opt/OpenFOAM/OpenFOAM3.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, 13:27 

#2 
New Member
Stephan
Join Date: Sep 2013
Posts: 21
Rep Power: 4 
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, 21:21 

#3  
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 123
Rep Power: 5 
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 (nonclosed singly connected) inletliq2 20 42 ok (nonclosed singly connected) inletgas 25 52 ok (nonclosed singly connected) hotplate 1060 2124 ok (nonclosed singly connected) outlet 535 1072 ok (nonclosed singly connected) frontAndBack 125850 127512 ok (nonclosed singly connected) Checking geometry... Overall domain bounding box (0 0.008 0.0001) (0.024 0.008 0.0001) Mesh has 2 geometric (nonempty/wedge) directions (1 1 0) Mesh has 2 solution (nonempty) directions (1 1 0) All edges aligned with or perpendicular to nonempty directions. Boundary openness (2.4370059e17 1.1251536e17 1.1104837e15) OK. Max cell openness = 2.178075e16 OK. Max aspect ratio = 4.517634 OK. Minimum face area = 3.2677224e10. Maximum face area = 3.2916764e08. Face area magnitudes OK. Min volume = 6.5354449e14. Max volume = 2.3984089e12. Total volume = 3.509564e08. Cell volumes OK. Mesh nonorthogonality Max: 46.2859 average: 5.8587258 Nonorthogonality 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, 05:26 

#4 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 123
Rep Power: 5 
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, 16:40 

#5 
New Member
Stephan
Join Date: Sep 2013
Posts: 21
Rep Power: 4 
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. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problem with interFoam; Wave/wiggle alpha1 behavior  JonW  OpenFOAM  3  February 23, 2013 21:41 
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  SeHee  CFX  2  June 10, 2007 06:29 
Adiabatic and Rotating wall (Convection problem)  ParodDav  CFX  5  April 29, 2007 19:13 