
[Sponsors] 
October 31, 2013, 10:56 
rhoSimplecFoam Mach0.8 no pressure values

#1 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
Hello together,
I'm trying to simulate a kind of rocket with rhoSimplecFoam and the following startup conditions(it's laminar without any turbulence modell and a coarse mesh built with snappyhexmesh, the values are for standard atmosphere in 0km): Code:
p dimensions [1 1 2 0 0 0 0]; internalField uniform 101325; boundaryField { flange_CATIA { type zeroGradient; } inlet { type fixedValue; value uniform 101325; } outlet { type zeroGradient; } upperWall { type zeroGradient; } lowerWall { type zeroGradient; } frontAndBack { type zeroGradient; } } Code:
T dimensions [0 0 0 1 0 0 0]; internalField uniform 288.16; boundaryField { flange_CATIA { type fixedValue; value uniform 288.16; } inlet { type fixedValue; value uniform 288.16; } outlet { type zeroGradient; } upperWall { type zeroGradient; } lowerWall { type zeroGradient; } frontAndBack { type zeroGradient; } } Code:
U dimensions [0 1 1 0 0 0 0]; internalField uniform (272.215 0 0); boundaryField { flange_CATIA { type fixedValue; value uniform (0 0 0); } inlet { type fixedValue; value uniform (272.215 0 0); } outlet { type zeroGradient; } upperWall { type freestream; freestreamValue uniform (272.215 0 0); phi phi; } lowerWall { type freestream; freestreamValue uniform (272.215 0 0); phi phi; } frontAndBack { type freestream; freestreamValue uniform (272.215 0 0); phi phi; } } Code:
solvers { p { solver GAMG; tolerance 1e06; relTol 0.1; smoother GaussSeidel; nPreSweeps 2; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } "(Uekepsilon)" { solver GAMG; tolerance 1e08; relTol 0.1; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } } SIMPLE { nNonOrthogonalCorrectors 3; rhoMin rhoMin [1 3 0 0 0] 0.1; rhoMax rhoMax [1 3 0 0 0] 1.7; transonic yes; residualControl { p 1e3; U 1e4; e 1e3; // possibly check turbulence fields "(kepsilonomega)" 1e3; } } relaxationFactors { fields { p 0.1; rho 0.2; } equations { p 0.1; U 0.1; e 0.1; k 0.1; epsilon 0.1; } } Code:
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phid,p) bounded Gauss upwind; div(phi,Ekp) bounded Gauss upwind; div((phiinterpolate(rho)),p) Gauss upwind; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; pCorr; } Code:
GAMG: Solving for Ux, Initial residual = 3.5620403e05, Final residual = 1.145979e07, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.0016973702, Final residual = 6.0027881e06, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.001536366, Final residual = 4.8191816e06, No Iterations 1 GAMG: Solving for e, Initial residual = 0.00045292245, Final residual = 1.9744077e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.14242369, Final residual = 0.032751031, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.090691613, Final residual = 0.030714924, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.052047365, Final residual = 0.028755893, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.038641847, Final residual = 0.027810481, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.033185164, Final residual = 0.027251068, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.030303116, Final residual = 0.026959392, No Iterations 1000 time step continuity errors : sum local = 0.00026140328, global = 7.6367694e16, cumulative = 1.1835275e13 rho max/min : 1.5 1.1663043 ExecutionTime = 16521.99 s ClockTime = 16533 s Can anyone help me and tell me, where is the problem or failure? best regards, cfdnewbie147 Last edited by CFDnewbie147; November 5, 2013 at 05:42. 

November 5, 2013, 05:33 

#2 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
That everybody knows what i mean:
When i look at my written solution file U i see: Code:
dimensions [0 1 1 0 0 0 0]; internalField nonuniform List<vector> 31816 ( (272.215 5.221145e12 1.7181269e12) (272.215 5.7207594e12 1.4172429e12) (272.215 3.0062849e13 8.1789221e14) (272.215 8.1848292e14 8.1992441e14) (272.215 5.7952553e12 1.5504855e12) (272.215 9.2944646e13 4.9986554e12) (272.215 3.4030351e13 8.3896778e13) (272.215 1.2806153e12 1.5817917e13) (272.215 5.5325204e13 3.0713544e13) (272.215 7.3076711e14 1.2613566e12) (272.215 1.545563e12 9.7705242e14) (272.215 2.0237993e12 6.0391271e12) (272.215 1.3645437e12 1.1097317e12) (272.215 1.1176496e12 4.6202634e12) (272.215 5.9042102e12 1.8083531e12) (272.215 1.8823713e12 1.7038351e12) (272.215 1.3134718e12 6.0098351e12) ... But when I look at the written p file: Code:
dimensions [1 1 2 0 0 0 0]; internalField nonuniform List<scalar> 31816 ( 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 101325 .... Best regards, CFDNewbie147 

November 5, 2013, 05:55 

#3 
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 275
Rep Power: 9 
Hi,
your pressure equation does not converge  1000 Iterations! Under normal conditions, you should not fix p AND U anywhere. Same is true for zeroGradient. Try setting the pressure at the outlet and zeroGradient it at the inlet. Henrik 

November 5, 2013, 06:15 

#4 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
I changed as you said to:
Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.1   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 1 2 0 0 0 0]; internalField uniform 101325; boundaryField { flange_CATIA { type zeroGradient; } outlet { type fixedValue; value uniform 101325; } inlet { type zeroGradient; } upperWall { type zeroGradient; } lowerWall { type zeroGradient; } frontAndBack { type zeroGradient; } } // ************************************************************************* // But it doesn't work either. Output is: Code:
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.1   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ Build : 2.2.157f3c3617a2d Exec : rhoSimplecFoam parallel Date : Nov 05 2013 Time : 11:07:51 Host : "magnus08" PID : 4128 Case : /z/pro/cfdtmp03/zachjoer/OpenFOAM/BA/HFK_SHM_grÃ¶ber/Mach0080_turbulent nProcs : 64 Slaves : 63 ( "magnus08.4129" "magnus08.4130" "magnus08.4131" "magnus08.4132" "magnus08.4133" "magnus08.4134" "magnus08.4135" "magnus07.21150" "magnus07.21151" "magnus07.21152" "magnus07.21153" "magnus07.21154" "magnus07.21155" "magnus07.21156" "magnus07.21157" "magnus06.22483" "magnus06.22484" "magnus06.22485" "magnus06.22486" "magnus06.22487" "magnus06.22488" "magnus06.22489" "magnus06.22490" "magnus05.23351" "magnus05.23352" "magnus05.23353" "magnus05.23354" "magnus05.23355" "magnus05.23356" "magnus05.23357" "magnus05.23358" "magnus04.22806" "magnus04.22807" "magnus04.22808" "magnus04.22809" "magnus04.22810" "magnus04.22811" "magnus04.22812" "magnus04.22813" "magnus03.23177" "magnus03.23178" "magnus03.23179" "magnus03.23180" "magnus03.23181" "magnus03.23182" "magnus03.23183" "magnus03.23184" "magnus02.23682" "magnus02.23683" "magnus02.23684" "magnus02.23685" "magnus02.23686" "magnus02.23687" "magnus02.23688" "magnus02.23689" "magnus01.23113" "magnus01.23114" "magnus01.23115" "magnus01.23116" "magnus01.23117" "magnus01.23118" "magnus01.23119" "magnus01.23120" ) Pstream initialized with: floatTransfer : 0 nProcsSimpleSum : 0 commsType : nonBlocking polling iterations : 0 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster allowSystemOperations : Disallowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 SIMPLE: convergence criteria field p tolerance 0.001 field U tolerance 0.0001 field e tolerance 0.001 field "(kepsilonomega)" tolerance 0.001 Reading thermophysical properties Selecting thermodynamics package { type hePsiThermo; mixture pureMixture; transport sutherland; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting RAS turbulence model laminar No finite volume options present Starting time loop Time = 0.001 GAMG: Solving for Ux, Initial residual = 0.99999977, Final residual = 0.057843227, No Iterations 1 GAMG: Solving for Uy, Initial residual = 1, Final residual = 0.0057390397, No Iterations 1 GAMG: Solving for Uz, Initial residual = 1, Final residual = 0.005994265, No Iterations 1 GAMG: Solving for e, Initial residual = 0.99999813, Final residual = 0.011565501, No Iterations 1 GAMG: Solving for p, Initial residual = 0.53767394, Final residual = 0.042120368, No Iterations 1 GAMG: Solving for p, Initial residual = 0.40405034, Final residual = 0.039739205, No Iterations 1 GAMG: Solving for p, Initial residual = 0.19331502, Final residual = 0.026101031, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.11284094, Final residual = 0.019926848, No Iterations 1000 time step continuity errors : sum local = 0.002175723, global = 2.3026111e17, cumulative = 2.3026111e17 rho max/min : 1.2250034 1.221886 ExecutionTime = 27.95 s ClockTime = 28 s forceCoeffs output: Cm = 1.320359e05 Cd = 0.093371132 Cl = 1.03555e07 Cl(f) = 1.3255368e05 Cl(r) = 1.3151813e05 Time = 0.002 GAMG: Solving for Ux, Initial residual = 0.00060043462, Final residual = 2.0503577e05, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.082441175, Final residual = 0.00049357056, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.11074134, Final residual = 0.00068867064, No Iterations 1 GAMG: Solving for e, Initial residual = 0.0041800268, Final residual = 4.1992587e05, No Iterations 1 GAMG: Solving for p, Initial residual = 0.5304093, Final residual = 0.04458336, No Iterations 1 GAMG: Solving for p, Initial residual = 0.36752576, Final residual = 0.038220884, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.18137599, Final residual = 0.025174498, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.108366, Final residual = 0.019873609, No Iterations 1000 time step continuity errors : sum local = 0.002175922, global = 5.3378713e17, cumulative = 7.6404824e17 rho max/min : 1.2294214 1.2213151 ExecutionTime = 69.49 s ClockTime = 70 s regIOobject::readIfModified() : Rereading object controlDict from file "/z/pro/cfdtmp03/zachjoer/OpenFOAM/BA/HFK_SHM_grÃ¶ber/Mach0080_turbulent/processor0/../system/controlDict" forceCoeffs output: Cm = 1.3143246e05 Cd = 0.093271678 Cl = 1.0385113e07 Cl(f) = 1.3195172e05 Cl(r) = 1.3091321e05 Time = 0.003 GAMG: Solving for Ux, Initial residual = 0.00037857059, Final residual = 8.5052485e06, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.044059488, Final residual = 0.00028399619, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.064196449, Final residual = 0.00042835073, No Iterations 1 GAMG: Solving for e, Initial residual = 0.0021000954, Final residual = 1.8270224e05, No Iterations 1 GAMG: Solving for p, Initial residual = 0.50388282, Final residual = 0.040716606, No Iterations 1 GAMG: Solving for p, Initial residual = 0.33629964, Final residual = 0.03360745, No Iterations 1 GAMG: Solving for p, Initial residual = 0.17019278, Final residual = 0.022648336, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.1026526, Final residual = 0.018258963, No Iterations 1000 time step continuity errors : sum local = 0.0021761224, global = 9.5011782e17, cumulative = 1.7141661e16 rho max/min : 1.2346406 1.2205626 ExecutionTime = 97.24 s ClockTime = 97 s forceCoeffs output: Cm = 1.3086146e05 Cd = 0.093173218 Cl = 1.0438748e07 Cl(f) = 1.313834e05 Cl(r) = 1.3033952e05 Time = 0.004 GAMG: Solving for Ux, Initial residual = 0.00029835602, Final residual = 4.6544107e06, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.031149037, Final residual = 0.00020970957, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.048156363, Final residual = 0.00033464271, No Iterations 1 GAMG: Solving for e, Initial residual = 0.0014066861, Final residual = 1.0578563e05, No Iterations 1 GAMG: Solving for p, Initial residual = 0.47831378, Final residual = 0.038590737, No Iterations 1 GAMG: Solving for p, Initial residual = 0.3080249, Final residual = 0.031021751, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.15908332, Final residual = 0.021173073, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.096633434, Final residual = 0.017030443, No Iterations 1000 time step continuity errors : sum local = 0.0021763272, global = 1.2815543e16, cumulative = 2.9957203e16 rho max/min : 1.2400847 1.21968 ExecutionTime = 139.14 s ClockTime = 139 s forceCoeffs output: Cm = 1.3031053e05 Cd = 0.093075976 Cl = 1.0516642e07 Cl(f) = 1.3083637e05 Cl(r) = 1.297847e05 Time = 0.005 GAMG: Solving for Ux, Initial residual = 0.00025412598, Final residual = 2.8360233e06, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.024940148, Final residual = 0.00016987267, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.040378206, Final residual = 0.00028347182, No Iterations 1 GAMG: Solving for e, Initial residual = 0.001061219, Final residual = 6.8777058e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.44372922, Final residual = 0.036002632, No Iterations 1 GAMG: Solving for p, Initial residual = 0.28758996, Final residual = 0.029753192, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.15212154, Final residual = 0.020341676, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.093066532, Final residual = 0.017055932, No Iterations 1000 time step continuity errors : sum local = 0.0021765357, global = 1.5571698e16, cumulative = 4.5528902e16 rho max/min : 1.2453618 1.2187083 ExecutionTime = 180.69 s ClockTime = 181 s forceCoeffs output: Cm = 1.2976731e05 Cd = 0.092980081 Cl = 1.0631692e07 Cl(f) = 1.302989e05 Cl(r) = 1.2923573e05 Time = 0.006 GAMG: Solving for Ux, Initial residual = 0.00022470774, Final residual = 1.8258374e06, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.021459541, Final residual = 0.00014443178, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.03597171, Final residual = 0.00024868834, No Iterations 1 GAMG: Solving for e, Initial residual = 0.0008551344, Final residual = 4.767277e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.41873944, Final residual = 0.034360238, No Iterations 1 GAMG: Solving for p, Initial residual = 0.26954847, Final residual = 0.027546949, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.14318594, Final residual = 0.020450321, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.088867609, Final residual = 0.01662983, No Iterations 1000 time step continuity errors : sum local = 0.0021767679, global = 1.9269832e16, cumulative = 6.4798733e16 rho max/min : 1.2502182 1.2176803 ExecutionTime = 222.19 s ClockTime = 222 s forceCoeffs output: Cm = 1.2923706e05 Cd = 0.092885572 Cl = 1.0766722e07 Cl(f) = 1.2977539e05 Cl(r) = 1.2869872e05 Time = 0.007 GAMG: Solving for Ux, Initial residual = 0.00020301393, Final residual = 1.214904e06, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.019284991, Final residual = 0.00012594988, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.033408597, Final residual = 0.00022331514, No Iterations 1 GAMG: Solving for e, Initial residual = 0.00071877212, Final residual = 3.4481471e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.392023, Final residual = 0.032911925, No Iterations 1 GAMG: Solving for p, Initial residual = 0.25364493, Final residual = 0.026367517, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.13814654, Final residual = 0.019546314, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.086155724, Final residual = 0.015924053, No Iterations 1000 time step continuity errors : sum local = 0.0021770555, global = 1.9641971e16, cumulative = 8.4440704e16 rho max/min : 1.2545031 1.2166215 ExecutionTime = 263.64 s ClockTime = 264 s forceCoeffs output: Cm = 1.2873292e05 Cd = 0.092792417 Cl = 1.0917299e07 Cl(f) = 1.2927879e05 Cl(r) = 1.2818706e05 Time = 0.008 GAMG: Solving for Ux, Initial residual = 0.00018599158, Final residual = 8.2619823e07, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.017834814, Final residual = 0.0001112848, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.031957113, Final residual = 0.00020336741, No Iterations 1 GAMG: Solving for e, Initial residual = 0.00062225315, Final residual = 2.5766043e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.36825807, Final residual = 0.031599221, No Iterations 1 GAMG: Solving for p, Initial residual = 0.23882483, Final residual = 0.025922063, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.13136105, Final residual = 0.01864055, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.08279768, Final residual = 0.015756884, No Iterations 1000 time step continuity errors : sum local = 0.0021773878, global = 2.5142653e16, cumulative = 1.0958336e15 rho max/min : 1.2581417 1.215552 ExecutionTime = 305.17 s ClockTime = 305 s regIOobject::readIfModified() : Rereading object controlDict from file "/z/pro/cfdtmp03/zachjoer/OpenFOAM/BA/HFK_SHM_grÃ¶ber/Mach0080_turbulent/processor0/../system/controlDict" forceCoeffs output: Cm = 1.2827066e05 Cd = 0.092700554 Cl = 1.1079009e07 Cl(f) = 1.2882462e05 Cl(r) = 1.2771671e05 Time = 0.009 GAMG: Solving for Ux, Initial residual = 0.00017209101, Final residual = 5.7049672e07, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.016795727, Final residual = 9.8895364e05, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.031131225, Final residual = 0.00018609196, No Iterations 1 GAMG: Solving for e, Initial residual = 0.00055064953, Final residual = 1.9676097e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.34989204, Final residual = 0.029939648, No Iterations 1 GAMG: Solving for p, Initial residual = 0.22819607, Final residual = 0.024709557, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.12779538, Final residual = 0.01867555, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.080116272, Final residual = 0.015209984, No Iterations 1000 time step continuity errors : sum local = 0.002177766, global = 2.4235564e16, cumulative = 1.3381892e15 rho max/min : 1.2611139 1.2144872 ExecutionTime = 346.67 s ClockTime = 347 s forceCoeffs output: Cm = 1.2785563e05 Cd = 0.092609912 Cl = 1.1228936e07 Cl(f) = 1.2841708e05 Cl(r) = 1.2729418e05 Time = 0.01 GAMG: Solving for Ux, Initial residual = 0.00016042696, Final residual = 3.9853703e07, No Iterations 1 GAMG: Solving for Uy, Initial residual = 0.015963236, Final residual = 8.7946467e05, No Iterations 1 GAMG: Solving for Uz, Initial residual = 0.030476925, Final residual = 0.00016997212, No Iterations 1 GAMG: Solving for e, Initial residual = 0.00049567157, Final residual = 1.528501e06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.33324438, Final residual = 0.028036589, No Iterations 1 GAMG: Solving for p, Initial residual = 0.21835329, Final residual = 0.022957868, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.12379308, Final residual = 0.018037857, No Iterations 1000 GAMG: Solving for p, Initial residual = 0.077487114, Final residual = 0.014877161, No Iterations 1000 time step continuity errors : sum local = 0.0021781888, global = 2.8736122e16, cumulative = 1.6255504e15 rho max/min : 1.264078 1.2134386 ExecutionTime = 388.21 s ClockTime = 388 s forceCoeffs output: Cm = 1.2753832e05 Cd = 0.092520433 Cl = 1.1351413e07 Cl(f) = 1.2810589e05 Cl(r) = 1.2697074e05 End Finalising parallel run Sorry for my incompetence...:/ 

November 5, 2013, 11:26 

#5 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
When I try some different Solver for p like this:
Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.1   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver PBiCG; preconditioner diagonal; tolerance 1e05;//1e08 relTol 0.5;//0.1 smoother DILUGaussSeidel;//GaussSeidel nPreSweeps 2; nPostSweeps 4; nFinestSweeps 2; cacheAgglomeration off; nCellsInCoarsestLevel 100; agglomerator faceAreaPair; mergeLevels 1; } "(Uekepsilon)" { solver GAMG; tolerance 1e08; relTol 0.1; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 100; agglomerator faceAreaPair; mergeLevels 1; } } SIMPLE { nNonOrthogonalCorrectors 1; rhoMin rhoMin [1 3 0 0 0] 1.0; rhoMax rhoMax [1 3 0 0 0] 1.5; transonic yes; residualControl { p 1e3; U 1e4; e 1e3; // possibly check turbulence fields "(kepsilonomega)" 1e3; } } relaxationFactors { fields { p 0.2; rho 0.5; } equations { p 0.2; U 0.3; e 0.3; k 0.3; epsilon 0.3; } } // ************************************************************************* // Code:
GAMG: Solving for Ux, Initial residual = 4.922311e10, Final residual = 4.922311e10, No Iterations 0 GAMG: Solving for Uy, Initial residual = 5.2654842e09, Final residual = 5.2654842e09, No Iterations 0 GAMG: Solving for Uz, Initial residual = 1.7094164e08, Final residual = 9.0853684e11, No Iterations 1 GAMG: Solving for e, Initial residual = 9.9583003e09, Final residual = 9.9583003e09, No Iterations 0 diagonalPBiCG: Solving for p, Initial residual = 0.044142169, Final residual = 0.016692135, No Iterations 1 diagonalPBiCG: Solving for p, Initial residual = 0.022796388, Final residual = 0.0057005063, No Iterations 1 time step continuity errors : sum local = 0.00017012542, global = 6.1272094e05, cumulative = 0.049840115 rho max/min : 1.2224959 1.1601203 ExecutionTime = 99.81 s ClockTime = 101 s forceCoeffs output: Cm = 7.6045523e06 Cd = 0.075369208 Cl = 1.8001372e08 Cl(f) = 7.5955516e06 Cl(r) = 7.6135529e06 Time = 0.1 GAMG: Solving for Ux, Initial residual = 4.8521402e10, Final residual = 4.8521402e10, No Iterations 0 GAMG: Solving for Uy, Initial residual = 5.211509e09, Final residual = 5.211509e09, No Iterations 0 GAMG: Solving for Uz, Initial residual = 1.6856978e08, Final residual = 8.9579104e11, No Iterations 1 GAMG: Solving for e, Initial residual = 1.0037838e08, Final residual = 5.5905957e11, No Iterations 1 diagonalPBiCG: Solving for p, Initial residual = 0.043558749, Final residual = 0.0058719703, No Iterations 1 diagonalPBiCG: Solving for p, Initial residual = 0.025481547, Final residual = 0.0091210457, No Iterations 1 time step continuity errors : sum local = 0.00017012541, global = 6.1272111e05, cumulative = 0.049901388 rho max/min : 1.2224959 1.1601203 ExecutionTime = 99.94 s ClockTime = 101 s forceCoeffs output: Cm = 7.6045524e06 Cd = 0.075369208 Cl = 1.8001385e08 Cl(f) = 7.5955517e06 Cl(r) = 7.6135531e06 End Finalising parallel run 

November 9, 2013, 15:37 

#6 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Greetings to all!
@CFDnewbie147:
Best regards, Bruno
__________________


November 10, 2013, 05:57 

#7 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
Dear Bruno,
first of all, thank you for your detailed answer. 3. I understand your example but that's not right at all. I'm working more than one year with CFD(TAU Code) and now, for my bachelor thesis, I'm trying to solve the described problem with openfoam. With openfoam I don't have so much experience, only some simple work at university. I made some tutorials before trying to simulate my real problem and tried to transfer my problem to the tutorial. 2. I thought, in comparison to the rhoSImplecFoam tutorial, I'm trying to solve the equations with more underrelaxation, so lower coefficients. I do not really have a feeling for this numbers, but i thought that for beginning, lower is better, but apparently not? 3.Yes that's true, i fix the pressure and velocity at the inlet (like in TAU). So do I have to fix only velocity at inlet and pressure at outlet? I hope you will carry on guiding me to a solution. Best regards, CFDNewbie147 

November 10, 2013, 06:15 

#8  
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Hi CFDnewbie147,
Quote:
But still, I'm guessing that TAU is a lot more user friendly than OpenFOAM, so consider this a whole other level of a spaceship
Quote:
Quote:
In addition, check with the tutorials of OpenFOAM, to see the effect of reducing the relaxation parameters, so that you can get a better feel for them. Quote:
Best regards, Bruno
__________________


November 10, 2013, 07:45 

#9 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
Dear Bruno,
no, that's OK you're right, OpenFOAM is more complex than TAU. First of all, I took the motorbike tutorial with simpleFoam to look if my mesh works, after that I went to the square bend tutorial and made it running with my mesh and my boundary file without changing the values of the start up conditions. Then I changed some parameters in the startup conditions and looked if it worked...going to mach 0.8 because I think that's easier with subsonic than supersonic start up conditions. I decreased the underrelaxtion values but still doesn't work...and now I'm here because time is running away... OK I will try underrelexation values near to 1 and I will fix velocity at inlet and pressure at outlet. rest of my boundary conditions are OK? is the freestream condition better then slip conditions for the wall? Any other improvements so far? Unfortunately I can change the values and run the case again at Tuesday... So far, thanks for helping me. Best regards, CFDNewbie147 

November 10, 2013, 09:31 

#10 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Hi CFDNewbie147,
Well, from my experience, one should never be in a hurry when it comes to using OpenFOAM. The software is completely free, but it requires a lot more time in exchange. Although, once one has a full grasp of how to use, it can be as easy as running Allrun As for the questions at hand: have a look at the sonicFoam tutorials. For example, "compressible/sonicFoam/ras/prism" does impose pressure on the inlet as well, but on the outlet it uses the "waveTransmissive" boundary condition. On the walls, it uses "supersonicFreestream", so I'm guessing that for subsonic, you can use the one you're using. I would also advise you to check the code documentation: http://foam.sourceforge.net/docs/cpp/  for example, the "freestream" page is this one: http://foam.sourceforge.net/docs/cpp...5.html#details I don't have experience on this, so I have no idea if either one is suitable for your case . Good luck! Best regards, Bruno edit: I forgot about the underrelaxation details... my guess is that you should use the ones from the tutorial "squareBend" as a reference, not to just start using "1.0" is all equations and fields!
__________________
Last edited by wyldckat; November 10, 2013 at 09:35. Reason: see "edit:" 

November 11, 2013, 09:29 

#11 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
You are right,
if anything is known, you can make a Allrun script, but the way to knowing everything in OpenFOAM is long and hard... I thougth that the waveTransmissive condition is only for supersonic speed? But I don't know exactly, I've to look it up....or does anybody know this? The unterrelaxation values I will use as reference and adapt to my case when it's running... Do you know if rhoSimplecFoam can be used for mach numbers above 1? Or is this not possible because rhoSimplecFoam cannot solve the equations with the appearing shock waves? I'm not sure about this... Thank you for your help, and if anybody can answer some other questions I would be happy. Best regards, CFDNewbie147 

November 12, 2013, 03:44 

#12 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
I checked my error file and found the following:
Code:
Duplicate entry Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField #0 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x27) [0x2b1a63159437] #1 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so(_ZN4Foam12fvPatchFieldIdE26addpatchConstructorToTableINS_14incompressible47alphatJayatillekeWallFunctionFvPatchScalarFieldEEC2ERKNS_4wordE+0xce) [0x2b1a7230c3de] #2 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b1a7230c76b] #3 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b1a72325516] Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField Duplicate entry Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField #0 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x27) [0x2b1a63159437] #1 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so(_ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_14incompressible47alphatJayatillekeWallFunctionFvPatchScalarFieldEEC2ERKNS_4wordE+0xce) [0x2b1a7230c4de] #2 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b1a7230c793] Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField #3 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b1a72325516] Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField ... #0 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x27) [0x2b79d49bd437] #1 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so(_ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_14incompressible47alphatJayatillekeWallFunctionFvPatchScalarFieldEEC2ERKNS_4wordE+0xce) [0x2b79e3b704de] #2 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b79e3b70793] #3 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b79e3b89516] Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField #0 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x27) [0x2ad2a5ca5437] #1 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so(_ZN4Foam12fvPatchFieldIdE31adddictionaryConstructorToTableINS_14incompressible47alphatJayatillekeWallFunctionFvPatchScalarFieldEEC2ERKNS_4wordE+0xce) [0x2ad2b4e585de] #2 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2ad2b4e587bb] #3 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2ad2b4e71516] #0 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x27) [0x2b6c75140437] #1 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so(_ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_14incompressible47alphatJayatillekeWallFunctionFvPatchScalarFieldEEC2ERKNS_4wordE+0xce) [0x2b6c842f34de] #2 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b6c842f3793] #3 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b6c8430c516] Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField #2 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b2ecc47d793] #3 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2b2ecc496516] Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField #0 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+0x27) [0x2ace46fc6437] #1 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so(_ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_14incompressible47alphatJayatillekeWallFunctionFvPatchScalarFieldEEC2ERKNS_4wordE+0xce) [0x2ace561794de] #2 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2ace56179793] #3 /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libincompressibleRASModels.so [0x2ace56192516] Duplicate entry alphatJayatillekeWallFunction in runtime selection table fvPatchField ... [magnus05:12296] [ 7] /opt/OpenFOAM/OpenFOAM2.2.1/platforms/linux64Gcc48DPOpt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5solveERNS_5FieldIdEERKS2_h+0x5c2) [0x2b6714195742] [magnus05:12296] [ 8] rhoSimplecFoam [0x43a3da] [magnus05:12296] [ 9] rhoSimplecFoam [0x4532c1] [magnus05:12296] [10] rhoSimplecFoam [0x45359e] [magnus05:12296] [11] rhoSimplecFoam [0x44de14] [magnus05:12296] [12] /lib64/libc.so.6(__libc_start_main+0xf4) [0x2b6715104b54] [magnus05:12296] [13] rhoSimplecFoam(__gxx_personality_v0+0x371) [0x41e109] [magnus05:12296] *** End of error message *** [magnus06][[20951,1],22][btl_tcp_frag.c:215:mca_btl_tcp_frag_recv] mca_btl_tcp_frag_recv: readv failed: Connection reset by peer (104) [magnus01][[20951,1],62][btl_tcp_frag.c:215:mca_btl_tcp_frag_recv] mca_btl_tcp_frag_recv: readv failed: Connection reset by peer (104) [magnus07][[20951,1],14][btl_tcp_frag.c:215:mca_btl_tcp_frag_recv] mca_btl_tcp_frag_recv: readv failed: Connection reset by peer (104)  mpirun noticed that process rank 30 with PID 12296 on node magnus05.cfd.lfk.eads.net exited on signal 8 (Floating point exception).  And what's the duplicate entry error? Does anybody know? Best regards, CFDNewbie147 Last edited by CFDnewbie147; November 12, 2013 at 09:56. 

November 15, 2013, 03:30 

#13 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Hi CFDNewbie147,
If my memory doesn't fail me, that bug was corrected soon after OpenFOAM 2.2.1 was released. It means that there is a collision of object names, because "alphatJayatillekeWallFunction" exists for both compressible and incompressible and objectwise this is bad, since it can lead to the crash you have witnessed. If possible, upgrade to OpenFOAM 2.2.2. Otherwise, you'll have to patch the code manually to correct the problem and then rebuild the affected OpenFOAM libraries. Best regards, Bruno
__________________


November 15, 2013, 12:08 

#14 
Member
Join Date: Jul 2013
Posts: 62
Rep Power: 3 
Thank's a lot for answering this.
That means, perhabs al my simulations where this error occurs could be false and the results are not good/realistic? Updating to OpenFOAM2.2 is no opinion...but how to fix this bug manually? Where do I find this specific patch and how to update the OF libraries? Can anybody explain this to me? Best regards, CFDNewbie147 

November 21, 2013, 07:33 

#15 
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 5 
Dear Bruno and CFDnewbie147,
I add myself in your conversation because I think I have a relevant problem. I introduce first the case. To understand the geometry, I attached a slice, but the problem is 3D. The flow moves from the right to the left side. The inlet BCs are applied on the inlet of the channel on the left; the outlet BCs on the outlet of the channel on the right. The air comes also from on high, from the external domain. I'm using rhoSimplecFoam as solver, and kOmegaSST as turbulence model. I got yet a first result, using the minimum flow rate for my problem; and everything seems good. I obtained the right value (I mean, as calculated) for the maximum velocity, and in general the behaviour of the flow field seems reasonable. Now, I'm trying to increase the flow rate, but without success... Using the same parameters from the previous simulation, the solution diverges after few iterations. I tried to change some of these parameters, in particular the underrelaxation factors. I can obtain a converging simulation if I use a relaxation factor for p (0.9), but the solution is wrong: 1) it is veeeeery slow (but this isn't a real problem); 2) at the beginning, the velocity profile (with the new velocity) seems to move in the right direction, toward the nozzle; 3) then, it seems to come back! The flow doesn't reach the nozzle, but comes back! Considering the nozzle, downstream (on the right) nothing changes (p, rho, U....nothing!) Instead, if I don't use any relaxation factor for p (so, I put just 1, as in the working case with minimum flow rate), it diverges after few iterations! What I'm asking you is: there is some parameter I'm using in the wrong way?! Thare is something I can do to obtain a converging simulation, physically correct?! The fvSolution file: Code:
solvers { p { solver GAMG; tolerance 1e08; relTol 0.1; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } "(Uekomega)" { solver GAMG; tolerance 1e08; relTol 0.1; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } } SIMPLE { nNonOrthogonalCorrectors 0; rhoMin rhoMin [1 3 0 0 0] 0.1; rhoMax rhoMax [1 3 0 0 0] 5.0; transonic yes; residualControl { p 1e5; U 1e5; e 1e3; // possibly check turbulence fields "(komega)" 1e3; } } relaxationFactors { fields { p 1; rho 1; } equations { p 1; U 0.9; e 0.9; k 0.9; omega 0.9; } } Code:
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,e) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div(phid,p) Gauss upwind; div(phi,Ekp) bounded Gauss upwind; div((phiinterpolate(rho)),p) Gauss upwind; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; pCorr; } I hope some of you could help me, because I don't know what I'm doing wrong... Thank you in advance! Best regards, Claudio 

November 23, 2013, 06:52 

#16  
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
Greetings to all!
@CFDnewbie147: Quote:
Bruno
__________________


November 23, 2013, 06:58 

#17  
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84 
@Claudio:
Quote:
Bruno
__________________


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Pulsatile pressure inlet with pressure outlet  a.lynchy  FLUENT  3  March 23, 2012 14:45 
Fluent natural ventilation pressure boundary condition  pierresandre  FLUENT  24  November 8, 2011 15:32 
Neumann pressure BC and velocity field  Antech  Main CFD Forum  0  April 25, 2006 02:15 
Pressure outlet values  Eric  FLUENT  3  February 11, 2004 13:05 
Hydrostatic pressure in 2phase flow modeling (CFX4.2)  HB &DS  CFX  0  January 9, 2000 14:19 