CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

chtMultiRegionFoam speed up

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Bloerb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2021, 04:27
Default chtMultiRegionFoam speed up
  #1
New Member
 
Join Date: Jul 2021
Posts: 6
Rep Power: 4
qwertz is on a distinguished road
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 solid-liquid 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;
}
fvSolution for solid region
Code:
solvers
{
    h
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-06;
        relTol           0.1;
    }

    hFinal
    {
        $h;
        tolerance        1e-06;
        relTol           0;
    }
}

PIMPLE
{
    nNonOrthogonalCorrectors 0;
}
fvSchemes for liquid region
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;
}
fvSolution for liquid region
Code:
solvers
{
    rho
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-6;
        relTol          0.1;
    }

    rhoFinal
    {
        $rho;
        tolerance       1e-6;
        relTol          0;
    }

    p_rgh
    {
        solver           GAMG;
        tolerance        1e-6;
        relTol           0.01;
        smoother         GaussSeidel;
    }

    p_rghFinal
    {
        $p_rgh;
        tolerance        1e-6;
        relTol           0;
    }

    "(U|h|k|epsilon|R)"
    {
        solver           PBiCGStab;
        preconditioner   DILU;
        tolerance        1e-6;
        relTol           0.1;
    }

    "(U|h|k|epsilon|R)Final"
    {
        $U;
        tolerance        1e-6;
        relTol           0;
    }
}

PIMPLE
{
    momentumPredictor   yes;
    nCorrectors         2;
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    equations
    {
        "h.*"           1;
        "U.*"           1;
    }
}
Attached Images
File Type: jpg InkedScreenshot at 2021-08-31 10-22-31 (002)_LI.jpg (110.5 KB, 68 views)
qwertz is offline   Reply With Quote

Old   September 2, 2021, 19:27
Default What do you mean with very slow?
  #2
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
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.
peterhess is offline   Reply With Quote

Old   September 7, 2021, 04:15
Default
  #3
New Member
 
Join Date: Jul 2021
Posts: 6
Rep Power: 4
qwertz is on a distinguished road
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 (non-closed singly connected)  
    frontAndBAck        40736    41454    ok (non-closed singly connected)  
    inletGas            30       60       ok (non-closed singly connected)  
    outlet              70       142      ok (non-closed singly connected)  
    inlet               70       142      ok (non-closed 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.82948595996e-06 (0 0.003 0.0970737265531) (0.001 0.112 0.187252496828)
    cell                1350         2856         9.47843288986e-06 (0 0.003 0.187252496828) (0.001 0.112 0.274210596735)
    module1b            2750         5712         1.9270482607e-05 (0 0.003 0.274210596735) (0.001 0.112 0.451004015148)
    module2             2150         4488         3.80812796158e-05 (0 0.003 0.466321934613) (0.001 0.112 0.815691472373)
    module3             2200         4590         3.89668907702e-05 (0 0.003 0.825761737464) (0.001 0.112 1.1832561482)
    module4             2250         4692         3.82095061324e-05 (0 0.003 1.19332641329) (0.001 0.112 1.54387234111)
    rod                 1608         4304         6.306e-06    (0 0 0) (0.001 0.125 1.5765)
    air                 6660         14398        3.69204220247e-05 (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 (non-empty/wedge) directions (0 1 1)
    Mesh has 2 solution (non-empty) directions (0 1 1)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (2.63469889903e-14 -1.46208517769e-17 3.81444783463e-20) OK.
    Max cell openness = 1.98477334022e-16 OK.
    Max aspect ratio = 80.5435611482 OK.
    Minimum face area = 1.46808651e-07. Maximum face area = 6.48458130018e-05.  Face area magnitudes OK.
    Min volume = 4.22400580858e-10. Max volume = 6.48458130018e-08.  Total volume = 0.0001970625.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 3.46944695195e-13 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
controlDict
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          1e-3;

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
        );
    }
}
The residuals are below. It corresponds of the residuals for the 1s of simulation.

Thanks a lot for your answer.
Best regards
Attached Images
File Type: png Residuals.png (19.6 KB, 93 views)

Last edited by qwertz; September 7, 2021 at 07:25. Reason: Adding residuals
qwertz is offline   Reply With Quote

Old   September 7, 2021, 07:07
Default
  #4
New Member
 
Join Date: Jul 2021
Posts: 6
Rep Power: 4
qwertz is on a distinguished road
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 non-usable.

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 2e-6 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
qwertz is offline   Reply With Quote

Old   September 9, 2021, 11:49
Default
  #5
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
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.
peterhess is offline   Reply With Quote

Old   September 12, 2021, 00:42
Default
  #6
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
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
peterhess is offline   Reply With Quote

Old   September 16, 2021, 05:13
Default
  #7
New Member
 
Join Date: Jul 2021
Posts: 6
Rep Power: 4
qwertz is on a distinguished road
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 1e-6 but using adjustableTimeStep with a maximum Courant number of 0.9, the timeStep raises around 1e-5.

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.2063576e-08, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.0014327044, Final residual = 9.6958372e-08, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.0050987817, Final residual = 7.648817e-08, No Iterations 1
DILUPBiCGStab:  Solving for h, Initial residual = 0.0008144664, Final residual = 2.3212616e-08, 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.1211529e-05, No Iterations 3
GAMG:  Solving for p_rgh, Initial residual = 3.11558e-05, Final residual = 9.5919597e-07, No Iterations 13
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 2.1498812e-08, global = 1.2400844e-10, cumulative = 3.1787068e-08
GAMG:  Solving for p_rgh, Initial residual = 6.7787091e-06, Final residual = 8.158686e-07, No Iterations 3
GAMG:  Solving for p_rgh, Initial residual = 8.1586577e-07, Final residual = 8.1586577e-07, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 1.8416162e-08, global = 7.7085042e-10, cumulative = 3.2557918e-08
GAMG:  Solving for p_rgh, Initial residual = 1.041728e-06, Final residual = 7.0287163e-07, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 7.0287166e-07, Final residual = 7.0287166e-07, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 1.5760623e-08, global = -1.561511e-10, cumulative = 3.2401767e-08
GAMG:  Solving for p_rgh, Initial residual = 7.4699867e-07, Final residual = 7.4699867e-07, No Iterations 0
GAMG:  Solving for p_rgh, Initial residual = 7.4699867e-07, Final residual = 7.4699867e-07, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 1.6749961e-08, global = -1.6992275e-10, cumulative = 3.2231844e-08
GAMG:  Solving for p_rgh, Initial residual = 7.7365068e-07, Final residual = 7.7365068e-07, No Iterations 0
GAMG:  Solving for p_rgh, Initial residual = 7.7365068e-07, Final residual = 7.7365068e-07, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 1.7347577e-08, global = -1.7560706e-10, cumulative = 3.2056237e-08
DILUPBiCGStab:  Solving for epsilon, Initial residual = 0.0010628079, Final residual = 4.3380748e-08, No Iterations 1
DILUPBiCGStab:  Solving for k, Initial residual = 0.0031487963, Final residual = 1.1211234e-07, No Iterations 1

Solving for solid region module1a
DICPCG:  Solving for h, Initial residual = 0.00055474291, Final residual = 5.8367861e-10, 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.829401e-10, Final residual = 5.829401e-10, 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.829401e-10, Final residual = 5.829401e-10, 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.0954334e-10, 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.0927752e-10, Final residual = 7.0927752e-10, 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.0927752e-10, Final residual = 7.0927752e-10, 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.9962897e-10, 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.992838e-10, Final residual = 1.992838e-10, 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.992838e-10, Final residual = 1.992838e-10, 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.0667853e-10, 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.0635443e-10, Final residual = 2.0635443e-10, 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.0635443e-10, Final residual = 2.0635443e-10, 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.0956576e-10, 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.0954725e-10, Final residual = 2.0954725e-10, 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.0954725e-10, Final residual = 2.0954725e-10, 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.8868419e-10, 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.8849052e-10, Final residual = 8.8849052e-10, 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.8849052e-10, Final residual = 8.8849052e-10, 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.6668971e-08, 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.6645937e-08, Final residual = 1.6645937e-08, 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.6645937e-08, Final residual = 1.6645937e-08, 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.1285332e-06 max: 1.6726315e-05
Region: module1b Diffusion Number mean: 2.165626e-06 max: 2.582219e-05
Region: module2 Diffusion Number mean: 9.3784851e-07 max: 1.5112033e-05
Region: module3 Diffusion Number mean: 9.3784851e-07 max: 1.5112033e-05
Region: module4 Diffusion Number mean: 9.6198964e-07 max: 1.5112033e-05
Region: cell Diffusion Number mean: 2.1285332e-06 max: 1.6726315e-05
Region: rod Diffusion Number mean: 0.0034288982 max: 0.093338961
deltaT = 2.6703593e-05
Time = 0.0168984
log file 1 corrector

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.9304208e-07, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.00029105541, Final residual = 2.4966454e-07, No Iterations 1
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.00016327898, Final residual = 5.5695554e-07, No Iterations 1
DILUPBiCGStab:  Solving for h, Initial residual = 1.3195614e-05, Final residual = 3.3693544e-08, 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.2036266e-06, No Iterations 3
GAMG:  Solving for p_rgh, Initial residual = 8.1985285e-06, Final residual = 8.0075445e-07, No Iterations 4
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 2.9097591e-09, global = -4.3122041e-11, cumulative = 2.5412789e-06
DILUPBiCGStab:  Solving for epsilon, Initial residual = 0.00018411018, Final residual = 1.2797755e-07, No Iterations 1
DILUPBiCGStab:  Solving for k, Initial residual = 0.00018811312, Final residual = 3.24778e-07, No Iterations 1

Solving for solid region module1a
DICPCG:  Solving for h, Initial residual = 3.3267166e-05, Final residual = 3.7643426e-11, 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.7640352e-11, Final residual = 3.7640352e-11, 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.7640352e-11, Final residual = 3.7640352e-11, 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.0932275e-05, Final residual = 5.7206289e-11, 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.7215401e-11, Final residual = 5.7215401e-11, 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.7215401e-11, Final residual = 5.7215401e-11, 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.9895735e-05, Final residual = 1.5607356e-11, 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.5599525e-11, Final residual = 1.5599525e-11, 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.5599525e-11, Final residual = 1.5599525e-11, 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.8701118e-05, Final residual = 1.5051108e-11, 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.5051674e-11, Final residual = 1.5051674e-11, 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.5051674e-11, Final residual = 1.5051674e-11, 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.7505492e-05, Final residual = 1.4394123e-11, 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.440831e-11, Final residual = 1.440831e-11, 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.440831e-11, Final residual = 1.440831e-11, 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.8216895e-05, Final residual = 5.5205799e-11, 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.5296942e-11, Final residual = 5.5296942e-11, 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.5296942e-11, Final residual = 5.5296942e-11, 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.7494926e-05, Final residual = 8.0986173e-10, 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.0981734e-10, Final residual = 8.0981734e-10, 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.0981734e-10, Final residual = 8.0981734e-10, 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.2521461e-06 max: 1.7697683e-05
Region: module1b Diffusion Number mean: 2.2913931e-06 max: 2.7321794e-05
Region: module2 Diffusion Number mean: 9.9231333e-07 max: 1.5989652e-05
Region: module3 Diffusion Number mean: 9.9231333e-07 max: 1.5989652e-05
Region: module4 Diffusion Number mean: 1.0178564e-06 max: 1.5989652e-05
Region: cell Diffusion Number mean: 2.2521461e-06 max: 1.7697683e-05
Region: rod Diffusion Number mean: 0.0036280288 max: 0.098759549
deltaT = 2.8264552e-05
Time = 0.300085
Attached Images
File Type: png Residuals.png (29.2 KB, 26 views)
qwertz is offline   Reply With Quote

Old   September 16, 2021, 08:13
Default
  #8
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
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:
Originally Posted by qwertz View Post
GAMG: Solving for p_rgh, Initial residual = 0.0041713463, Final residual = 3.1211529e-05, No Iterations 3
GAMG: Solving for p_rgh, Initial residual = 3.11558e-05, Final residual = 9.5919597e-07, No Iterations 13
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 2.1498812e-08, global = 1.2400844e-10, cumulative = 3.1787068e-08
GAMG: Solving for p_rgh, Initial residual = 6.7787091e-06, Final residual = 8.158686e-07, No Iterations 3
GAMG: Solving for p_rgh, Initial residual = 8.1586577e-07, Final residual = 8.1586577e-07, No Iterations 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 1.8416162e-08, global = 7.7085042e-10, cumulative = 3.2557918e-08
GAMG: Solving for p_rgh, Initial residual = 1.041728e-06, Final residual = 7.0287163e-07, No Iterations 1
GAMG: Solving for p_rgh, Initial residual = 7.0287166e-07, Final residual = 7.0287166e-07, No Iterations 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 1.5760623e-08, global = -1.561511e-10, cumulative = 3.2401767e-08
GAMG: Solving for p_rgh, Initial residual = 7.4699867e-07, Final residual = 7.4699867e-07, No Iterations 0
GAMG: Solving for p_rgh, Initial residual = 7.4699867e-07, Final residual = 7.4699867e-07, No Iterations 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (air): sum local = 1.6749961e-08, global = -1.6992275e-10, cumulative = 3.2231844e-08
GAMG: Solving for p_rgh, Initial residual = 7.7365068e-07, Final residual = 7.7365068e-07, No Iterations 0
GAMG: Solving for p_rgh, Initial residual = 7.7365068e-07, Final residual = 7.7365068e-07, No Iterations 0
-----------------------------------

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.
peterhess is offline   Reply With Quote

Old   September 18, 2021, 06:16
Default
  #9
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
This is your problem:
Code:
Region: air Courant Number mean: 0.0451301 max: 0.90056502
Region: module1a Diffusion Number mean: 2.1285332e-06 max: 1.6726315e-05
Region: module1b Diffusion Number mean: 2.165626e-06 max: 2.582219e-05
Region: module2 Diffusion Number mean: 9.3784851e-07 max: 1.5112033e-05
Region: module3 Diffusion Number mean: 9.3784851e-07 max: 1.5112033e-05
Region: module4 Diffusion Number mean: 9.6198964e-07 max: 1.5112033e-05
Region: cell Diffusion Number mean: 2.1285332e-06 max: 1.6726315e-05
Region: rod Diffusion Number mean: 0.0034288982 max: 0.093338961
deltaT = 2.6703593e-05
Your diffusion number is small, hence you could solve your solids with a much bigger time step. Diffusion number should be <1 or you should switch to a backward time scheme. Your fluid region is however unsuprisingly slowing you down to a 1e-5 time step. Which means you need 90 million time steps for 15 minutes of real time. Now even if you can solve them at a fraction of a second per time step it still takes a ton of time to compute these.

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.
tobiasS likes this.
Bloerb is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, speed up


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in thermophysical properties (chtMultiRegionFoam) mukut OpenFOAM Pre-Processing 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


All times are GMT -4. The time now is 05:34.