
[Sponsors] 
August 31, 2021, 04:27 
chtMultiRegionFoam speed up

#1 
New Member
Join Date: Jul 2021
Posts: 6
Rep Power: 4 
Hi everyone,
I am quite new with using OpenFoam and if I could have feed back from experienced users, I would be very grateful about it. I am running of solidliquid heat transfer problem with a air flow flowing in a rectangular channel above obstacles. The obstacles are hot and the flow aims at cooling them. Moreover, one obstacle expulses air with a high speed. As everything is rectangular I made the mesh with blockMesh and checkMesh says it is OK. However, the simulations is very slow (more than 12 hours in parallel) even if the mesh is quite small (~ 20 000 cells) because it is 2D. I tried running it in serial or in parallel (with various number of cores up to 12) but even if the speed up in parallel is noticable it stays very slow. Is it normal to be so slow ? The case is based on the multiRegionHeater tutorial and the fvSolution and fvSchemes are the same. A piece of mesh can be found attached, the blue arrows correspond to the normal air flow (5 m/s) and the red one to the gas explusion (50 m/s). What could be done to increase the speed ? Thanks a lot ! fvSchemes for solid region Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; } laplacianSchemes { default none; laplacian(alpha,h) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } Code:
solvers { h { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0.1; } hFinal { $h; tolerance 1e06; relTol 0; } } PIMPLE { nNonOrthogonalCorrectors 0; } Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; turbulence Gauss upwind; div(phi,k) $turbulence; div(phi,epsilon) $turbulence; div(phi,R) $turbulence; div(R) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } Code:
solvers { rho { solver PCG; preconditioner DIC; tolerance 1e6; relTol 0.1; } rhoFinal { $rho; tolerance 1e6; relTol 0; } p_rgh { solver GAMG; tolerance 1e6; relTol 0.01; smoother GaussSeidel; } p_rghFinal { $p_rgh; tolerance 1e6; relTol 0; } "(UhkepsilonR)" { solver PBiCGStab; preconditioner DILU; tolerance 1e6; relTol 0.1; } "(UhkepsilonR)Final" { $U; tolerance 1e6; relTol 0; } } PIMPLE { momentumPredictor yes; nCorrectors 2; nNonOrthogonalCorrectors 0; } relaxationFactors { equations { "h.*" 1; "U.*" 1; } } 

September 2, 2021, 19:27 
What do you mean with very slow?

#2 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16 
Hello!
What do you mean with very slow?  The convergence?  The velocity of the domain? or someting else...  Post the residuals please. Post the setups of controlDict please.  Steady state or transient is your target? In ddtShemes you have Euler > transient If your simulation stady state then you must change it to steadyState in all domains!  Increase your deltaT to higher value...  in decomposeParDict files (all of them), use simple with n (x 1 1), where x is the number of cores you use. Supposing your flow in X direction...  In U change internalField to: uniform (5 0 0), so that the velocity inside the domain starts with better values, or (50 0 0) if your inlet velocity 50 m/sec. Supposing your flow in X direction...  Run checkMesh and be sure that the domain hast the right dimensions. All dimensions are in m. Post the output please.  PIMPLE { momentumPredictor yes; nCorrectors 2; nNonOrthogonalCorrectors 0; } Reduce nCorrectors > 0 This makes the solving faster, but unstable. Divergence could happend.  openFoam version? Regards Peter Last edited by peterhess; September 5, 2021 at 16:33. 

September 7, 2021, 04:15 

#3 
New Member
Join Date: Jul 2021
Posts: 6
Rep Power: 4 
Hello Peter,
Thanks a lot for your answer ! I am in fact interested with the transient state (to see how does the temperature change in the solid regions) ideally during 5 to 10 minutes of real time. I mean with very slow that the simulation takes a very long time to complete. Calculating 0.1 s can take more than 15 minutes to complete. I am using openFOAM version 21.06 on Ubuntu 20.04. checkMesh Code:
Create time Create mesh for time = 0 Time = 0 Mesh stats points: 41454 internal points: 0 faces: 81831 internal faces: 40377 cells: 20368 faces per cell: 6 boundary patches: 5 point zones: 0 face zones: 0 cell zones: 8 Overall number of cells of each type: hexahedra: 20368 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 walls 548 1100 ok (nonclosed singly connected) frontAndBAck 40736 41454 ok (nonclosed singly connected) inletGas 30 60 ok (nonclosed singly connected) outlet 70 142 ok (nonclosed singly connected) inlet 70 142 ok (nonclosed singly connected) Checking faceZone topology for multiply connected surfaces... No faceZones found. Checking basic cellZone addressing... CellZone Cells Points Volume BoundingBox module1a 1400 2958 9.82948595996e06 (0 0.003 0.0970737265531) (0.001 0.112 0.187252496828) cell 1350 2856 9.47843288986e06 (0 0.003 0.187252496828) (0.001 0.112 0.274210596735) module1b 2750 5712 1.9270482607e05 (0 0.003 0.274210596735) (0.001 0.112 0.451004015148) module2 2150 4488 3.80812796158e05 (0 0.003 0.466321934613) (0.001 0.112 0.815691472373) module3 2200 4590 3.89668907702e05 (0 0.003 0.825761737464) (0.001 0.112 1.1832561482) module4 2250 4692 3.82095061324e05 (0 0.003 1.19332641329) (0.001 0.112 1.54387234111) rod 1608 4304 6.306e06 (0 0 0) (0.001 0.125 1.5765) air 6660 14398 3.69204220247e05 (0 0.003 0) (0.001 0.124 1.5765) Checking geometry... Overall domain bounding box (0 0 0) (0.001 0.125 1.5765) Mesh has 2 geometric (nonempty/wedge) directions (0 1 1) Mesh has 2 solution (nonempty) directions (0 1 1) All edges aligned with or perpendicular to nonempty directions. Boundary openness (2.63469889903e14 1.46208517769e17 3.81444783463e20) OK. Max cell openness = 1.98477334022e16 OK. Max aspect ratio = 80.5435611482 OK. Minimum face area = 1.46808651e07. Maximum face area = 6.48458130018e05. Face area magnitudes OK. Min volume = 4.22400580858e10. Max volume = 6.48458130018e08. Total volume = 0.0001970625. Cell volumes OK. Mesh nonorthogonality Max: 0 average: 0 Nonorthogonality check OK. Face pyramids OK. Max skewness = 3.46944695195e13 OK. Coupled point location match (average 0) OK. Mesh OK. End Note: I begin with writing the results every 0.1 s and then changed it to 10 s later on. Code:
application chtMultiRegionFoam; startFrom latestTime; stopAt endTime; endTime 300; deltaT 1e3; writeControl adjustable; writeInterval 10; purgeWrite 0; writeFormat binary; writePrecision 12; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; maxCo 0.9; // Maximum diffusion number maxDi 10.0; adjustTimeStep yes; functions { Co1 { type CourantNo; region air; libs ("libfieldFunctionObjects.so"); executeControl timeStep; executeInterval 2; writeControl writeTime; } residuals { type residuals; functionObjectLibs ("libutilityFunctionObjects.so"); enabled true; outputControl timeStep; outputInterval 1; fields ( p_rgh U h ); } } Thanks a lot for your answer. Best regards Last edited by qwertz; September 7, 2021 at 07:25. Reason: Adding residuals 

September 7, 2021, 07:07 

#4 
New Member
Join Date: Jul 2021
Posts: 6
Rep Power: 4 
Hello,
I tried your solution. It works in fact quite well to speed up the solver, however the results are completely inaccurate. The parameter that speed up the simulation is nCorrectors, it runs a lot faster when it is set to 0 instead of 2. However, when it is set to 0, the results are inaccurate and thus nonusable. By visualizing the results with paraFoam, we can see that the problem comes from the velocity field which isn't initialized correctly. When trying to initialize the velocity field first with nCorrectors = 2 and then reducing the number of correctors to 0, the simulation runs again as slow as before. In fact, I think that the problem of the slowness might come from the mesh. The deltaT is around 2e6 to have a Courant number of 0.9, which is quite small. However, I don't see how I can improve the mesh. If you have any suggestions, I would be very glad to here them. Thanks again, Best regards 

September 9, 2021, 11:49 

#5 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16 
Well, the problem looks in prgh boundary conditions.
Use the following conditions for prgh field: Inlets and walls: type fixedFluxPressure; Outlets: type fixedValue;  Use: PIMPLE { momentumPredictor yes; nCorrectors 5; nNonOrthogonalCorrectors 1; } Then reduce after stabilization(i.e. velocity field is calculated and not change itself too much): nCorrectors 1; The first steps will take a while, until the flow field is calculated, then runs faster after reducing nCorrectors .  Use also small deltaT at the start, store the results and then restart with higher deltaT, starting from the values you stored (not from 0). startFrom latestTime;  Post please the output of one of the time steps (not the first one).  checkMesh is OK. Your units look also OK. Regards Peter Last edited by peterhess; September 13, 2021 at 00:06. 

September 12, 2021, 00:42 

#6 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16 
For better viewing the residuals and supposing you use gnuplot use the following:
"< cat your_output_file  grep 'Solving for h'  cut d' ' f9  sed n 'p;N;N;N;N'  tr d ','" title 'h' with lines,\ "< cat your_output_file  grep 'Solving for p_rgh'  cut d' ' f9  sed n 'p;N'  tr d ','" title 'prgh' with lines Where your_output_file is the log file name of the solver 

September 16, 2021, 05:13 

#7 
New Member
Join Date: Jul 2021
Posts: 6
Rep Power: 4 
Hello Peter,
Thanks a lot for your answer. I tried your solution by beginning to run with 5 correctors and then reduce this number to 1 after a few time steps. It works quite well with 5 correctors but as soon as I set this number to 1, it divergences as can be seen on the Residuals. I started each time with a deltaT of 1e6 but using adjustableTimeStep with a maximum Courant number of 0.9, the timeStep raises around 1e5. I attached the Residuals (the change in the number of correctors is made around the 60000 iterations and as we can see it started to diverge here). Below is also a snapshot of the log file for a time step with 5 correctors and with only one. My boundary conditions were already on fixedFluxPressure for wall and inlet and fixedValue for outlet. In fact, I am not sure anymore that something can be done to improve the speed as the model is already quite stable and seems correct physically speaking. I guess I will just have to be patient :( Thanks a lot ! Regards. log file 5 correctors Code:
Solving for fluid region air diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCGStab: Solving for Ux, Initial residual = 0.0015687623, Final residual = 4.2063576e08, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 0.0014327044, Final residual = 9.6958372e08, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 0.0050987817, Final residual = 7.648817e08, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 0.0008144664, Final residual = 2.3212616e08, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 372.98004 Unlimited Tmin 292.8167 Min/max T:292.81663 373 GAMG: Solving for p_rgh, Initial residual = 0.0041713463, Final residual = 3.1211529e05, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 3.11558e05, Final residual = 9.5919597e07, No Iterations 13 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (air): sum local = 2.1498812e08, global = 1.2400844e10, cumulative = 3.1787068e08 GAMG: Solving for p_rgh, Initial residual = 6.7787091e06, Final residual = 8.158686e07, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 8.1586577e07, Final residual = 8.1586577e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (air): sum local = 1.8416162e08, global = 7.7085042e10, cumulative = 3.2557918e08 GAMG: Solving for p_rgh, Initial residual = 1.041728e06, Final residual = 7.0287163e07, No Iterations 1 GAMG: Solving for p_rgh, Initial residual = 7.0287166e07, Final residual = 7.0287166e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (air): sum local = 1.5760623e08, global = 1.561511e10, cumulative = 3.2401767e08 GAMG: Solving for p_rgh, Initial residual = 7.4699867e07, Final residual = 7.4699867e07, No Iterations 0 GAMG: Solving for p_rgh, Initial residual = 7.4699867e07, Final residual = 7.4699867e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (air): sum local = 1.6749961e08, global = 1.6992275e10, cumulative = 3.2231844e08 GAMG: Solving for p_rgh, Initial residual = 7.7365068e07, Final residual = 7.7365068e07, No Iterations 0 GAMG: Solving for p_rgh, Initial residual = 7.7365068e07, Final residual = 7.7365068e07, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (air): sum local = 1.7347577e08, global = 1.7560706e10, cumulative = 3.2056237e08 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.0010628079, Final residual = 4.3380748e08, No Iterations 1 DILUPBiCGStab: Solving for k, Initial residual = 0.0031487963, Final residual = 1.1211234e07, No Iterations 1 Solving for solid region module1a DICPCG: Solving for h, Initial residual = 0.00055474291, Final residual = 5.8367861e10, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.9833 DICPCG: Solving for h, Initial residual = 5.829401e10, Final residual = 5.829401e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.9833 DICPCG: Solving for h, Initial residual = 5.829401e10, Final residual = 5.829401e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.9833 Min/max T:309.98742 318.00008 Solving for solid region module1b DICPCG: Solving for h, Initial residual = 0.00057020072, Final residual = 7.0954334e10, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00367 Unlimited Tmin 317.9927 DICPCG: Solving for h, Initial residual = 7.0927752e10, Final residual = 7.0927752e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00367 Unlimited Tmin 317.9927 DICPCG: Solving for h, Initial residual = 7.0927752e10, Final residual = 7.0927752e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00367 Unlimited Tmin 317.9927 Min/max T:313.11406 318.83654 Solving for solid region module2 DICPCG: Solving for h, Initial residual = 0.0005640013, Final residual = 1.9962897e10, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.9936 DICPCG: Solving for h, Initial residual = 1.992838e10, Final residual = 1.992838e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.9936 DICPCG: Solving for h, Initial residual = 1.992838e10, Final residual = 1.992838e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.9936 Min/max T:312.91885 318.00008 Solving for solid region module3 DICPCG: Solving for h, Initial residual = 0.00059632106, Final residual = 2.0667853e10, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.99314 DICPCG: Solving for h, Initial residual = 2.0635443e10, Final residual = 2.0635443e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.99314 DICPCG: Solving for h, Initial residual = 2.0635443e10, Final residual = 2.0635443e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.99314 Min/max T:312.73427 318.00008 Solving for solid region module4 DICPCG: Solving for h, Initial residual = 0.00060788841, Final residual = 2.0956576e10, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.99312 DICPCG: Solving for h, Initial residual = 2.0954725e10, Final residual = 2.0954725e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.99312 DICPCG: Solving for h, Initial residual = 2.0954725e10, Final residual = 2.0954725e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.00008 Unlimited Tmin 317.99312 Min/max T:312.61441 318.00008 Solving for solid region cell DICPCG: Solving for h, Initial residual = 0.00065160801, Final residual = 8.8868419e10, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 373 Unlimited Tmin 372.97599 DICPCG: Solving for h, Initial residual = 8.8849052e10, Final residual = 8.8849052e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 373 Unlimited Tmin 372.97599 DICPCG: Solving for h, Initial residual = 8.8849052e10, Final residual = 8.8849052e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 373 Unlimited Tmin 372.97599 Min/max T:354.16027 373 Solving for solid region rod DICPCG: Solving for h, Initial residual = 0.0016226256, Final residual = 1.6668971e08, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 293.0084 Unlimited Tmin 292.99985 DICPCG: Solving for h, Initial residual = 1.6645937e08, Final residual = 1.6645937e08, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 293.0084 Unlimited Tmin 292.99985 DICPCG: Solving for h, Initial residual = 1.6645937e08, Final residual = 1.6645937e08, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 293.0084 Unlimited Tmin 292.99985 Min/max T:292.99983 293.15064 ExecutionTime = 81.78 s ClockTime = 86 s Region: air Courant Number mean: 0.0451301 max: 0.90056502 Region: module1a Diffusion Number mean: 2.1285332e06 max: 1.6726315e05 Region: module1b Diffusion Number mean: 2.165626e06 max: 2.582219e05 Region: module2 Diffusion Number mean: 9.3784851e07 max: 1.5112033e05 Region: module3 Diffusion Number mean: 9.3784851e07 max: 1.5112033e05 Region: module4 Diffusion Number mean: 9.6198964e07 max: 1.5112033e05 Region: cell Diffusion Number mean: 2.1285332e06 max: 1.6726315e05 Region: rod Diffusion Number mean: 0.0034288982 max: 0.093338961 deltaT = 2.6703593e05 Time = 0.0168984 Code:
Solving for fluid region air diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCGStab: Solving for Ux, Initial residual = 0.00023527789, Final residual = 1.9304208e07, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 0.00029105541, Final residual = 2.4966454e07, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 0.00016327898, Final residual = 5.5695554e07, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 1.3195614e05, Final residual = 3.3693544e08, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 372.98169 Unlimited Tmin 292.84619 Min/max T:292.84617 373 GAMG: Solving for p_rgh, Initial residual = 0.0019067005, Final residual = 8.2036266e06, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 8.1985285e06, Final residual = 8.0075445e07, No Iterations 4 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (air): sum local = 2.9097591e09, global = 4.3122041e11, cumulative = 2.5412789e06 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00018411018, Final residual = 1.2797755e07, No Iterations 1 DILUPBiCGStab: Solving for k, Initial residual = 0.00018811312, Final residual = 3.24778e07, No Iterations 1 Solving for solid region module1a DICPCG: Solving for h, Initial residual = 3.3267166e05, Final residual = 3.7643426e11, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.73662 DICPCG: Solving for h, Initial residual = 3.7640352e11, Final residual = 3.7640352e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.73662 DICPCG: Solving for h, Initial residual = 3.7640352e11, Final residual = 3.7640352e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.73662 Min/max T:310.25482 318.0015 Solving for solid region module1b DICPCG: Solving for h, Initial residual = 4.0932275e05, Final residual = 5.7206289e11, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.08893 Unlimited Tmin 317.93165 DICPCG: Solving for h, Initial residual = 5.7215401e11, Final residual = 5.7215401e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.08893 Unlimited Tmin 317.93165 DICPCG: Solving for h, Initial residual = 5.7215401e11, Final residual = 5.7215401e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.08893 Unlimited Tmin 317.93165 Min/max T:313.71518 319.18193 Solving for solid region module2 DICPCG: Solving for h, Initial residual = 3.9895735e05, Final residual = 1.5607356e11, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.93801 DICPCG: Solving for h, Initial residual = 1.5599525e11, Final residual = 1.5599525e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.93801 DICPCG: Solving for h, Initial residual = 1.5599525e11, Final residual = 1.5599525e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.93801 Min/max T:313.85818 318.0015 Solving for solid region module3 DICPCG: Solving for h, Initial residual = 3.8701118e05, Final residual = 1.5051108e11, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.936 DICPCG: Solving for h, Initial residual = 1.5051674e11, Final residual = 1.5051674e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.936 DICPCG: Solving for h, Initial residual = 1.5051674e11, Final residual = 1.5051674e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.936 Min/max T:314.1574 318.0015 Solving for solid region module4 DICPCG: Solving for h, Initial residual = 3.7505492e05, Final residual = 1.4394123e11, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.93854 DICPCG: Solving for h, Initial residual = 1.440831e11, Final residual = 1.440831e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.93854 DICPCG: Solving for h, Initial residual = 1.440831e11, Final residual = 1.440831e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 318.0015 Unlimited Tmin 317.93854 Min/max T:314.39587 318.0015 Solving for solid region cell DICPCG: Solving for h, Initial residual = 3.8216895e05, Final residual = 5.5205799e11, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 373 Unlimited Tmin 372.58753 DICPCG: Solving for h, Initial residual = 5.5296942e11, Final residual = 5.5296942e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 373 Unlimited Tmin 372.58753 DICPCG: Solving for h, Initial residual = 5.5296942e11, Final residual = 5.5296942e11, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 373 Unlimited Tmin 372.58753 Min/max T:355.99928 373 Solving for solid region rod DICPCG: Solving for h, Initial residual = 5.7494926e05, Final residual = 8.0986173e10, No Iterations 1 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 293.03872 Unlimited Tmin 292.99846 DICPCG: Solving for h, Initial residual = 8.0981734e10, Final residual = 8.0981734e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 293.03872 Unlimited Tmin 292.99846 DICPCG: Solving for h, Initial residual = 8.0981734e10, Final residual = 8.0981734e10, No Iterations 0 limitTemperature limitT Lower limited 0 (0%) of cells limitTemperature limitT Upper limited 0 (0%) of cells limitTemperature limitT Unlimited Tmax 293.03872 Unlimited Tmin 292.99846 Min/max T:292.99845 293.03899 ExecutionTime = 0.82 s ClockTime = 1 s Region: air Courant Number mean: 0.050436095 max: 0.90016512 Region: module1a Diffusion Number mean: 2.2521461e06 max: 1.7697683e05 Region: module1b Diffusion Number mean: 2.2913931e06 max: 2.7321794e05 Region: module2 Diffusion Number mean: 9.9231333e07 max: 1.5989652e05 Region: module3 Diffusion Number mean: 9.9231333e07 max: 1.5989652e05 Region: module4 Diffusion Number mean: 1.0178564e06 max: 1.5989652e05 Region: cell Diffusion Number mean: 2.2521461e06 max: 1.7697683e05 Region: rod Diffusion Number mean: 0.0036280288 max: 0.098759549 deltaT = 2.8264552e05 Time = 0.300085 

September 16, 2021, 08:13 

#8  
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16 
Hello,
Try the following in fluid p_rgh solver: solver PCG; preconditioner DIC;  Looking to the first residuals you posted, you can see that actualy just two nCorrectors are needed since the number of iterations for the third ist 1 as marked in red. Quote:
And actualy just one nCorrectors is sufficient, as shown in the second residuals you posted. Those residuals show also no divergence. All values are acceptable. The Problem must be in the solver, since your boundary conditions are right.  nNonOrthogonalCorrectors 1; is good.  Is the velocity at the outlet: inletOutlet? zeroGradient is unstable and cause problems. It should be like this. Do you have back flow?  Try to see the velocity and/or temperature fields at the start of divergence to see where is the problem happens.  You can post the case so I can have a look to it. Regards Peter Last edited by peterhess; September 17, 2021 at 03:25. 

September 18, 2021, 06:16 

#9 
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 
This is your problem:
Code:
Region: air Courant Number mean: 0.0451301 max: 0.90056502 Region: module1a Diffusion Number mean: 2.1285332e06 max: 1.6726315e05 Region: module1b Diffusion Number mean: 2.165626e06 max: 2.582219e05 Region: module2 Diffusion Number mean: 9.3784851e07 max: 1.5112033e05 Region: module3 Diffusion Number mean: 9.3784851e07 max: 1.5112033e05 Region: module4 Diffusion Number mean: 9.6198964e07 max: 1.5112033e05 Region: cell Diffusion Number mean: 2.1285332e06 max: 1.6726315e05 Region: rod Diffusion Number mean: 0.0034288982 max: 0.093338961 deltaT = 2.6703593e05 You could switch your solid regions to GAMG solver. Since those are a lot faster. The main thing you need to try is however is increasing your time step. You could try increasing maxCo > 1 which will lead to instability. You can solve every time step more than once with nOuterCorrectors and the typical PIMPLE settings to prevent it from blowing up. For simple flows you might be OKish with maxCo 100, you are however still loosing flow features which are rapidly changing. Or you need to coarsen your grid. This is a typical problem for transient runs with high flow velocities. You might want to try dirty tricks like the frozenFlow=yes switch. I.e you compute the flow for a while and then switch the computation of the flow of. Freezing the flow velocites to the ones you currently have. If your flow is stationary you can even compute the steady state beforehand. Which only leaves the energy transport to solve. And because of that you can use Co numbers that are much higher and you can still solve the transient temperature. It will however only work if you flow is not changing, but your temperature profile is. Like in high Re pipe flow. 

Tags 
chtmultiregionfoam, speed up 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Error in thermophysical properties (chtMultiRegionFoam)  mukut  OpenFOAM PreProcessing  28  November 23, 2021 06:34 
Processor multi core speed question  user benchmark  mw4617  Main CFD Forum  2  February 28, 2021 04:54 
AMI speed performance  danny123  OpenFOAM  21  October 24, 2020 04:13 
Fluent rp var to modify rotation speed of a boundary  QBeast  FLUENT  2  August 12, 2015 15:58 
Train Speed  yeo  FLUENT  5  February 14, 2012 08:38 