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

laplacianFoam - solver settings for steady state diffusion problems

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2021, 06:50
Default laplacianFoam - solver settings for steady state diffusion problems
  #1
Member
 
Adam
Join Date: Nov 2018
Posts: 36
Rep Power: 7
Adam_K is on a distinguished road
Hello,

I'm trying to simulate the diffusion through a porous cube, with C = 1 at the top and C = 0 at the bottom. The other four sides are zero-flux boundaries. In terms of numerical solutions, I feel like this one should be quite simple, but it doesn't appear to be the case.

1) Is there a set of solver recommendations listed somewhere for steady state diffusion problems? I found a bunch of useful tutorials online (like wolfdynamics) but they typically target more complicated cases with flow and multiple phases.

2) Even for steady state simulations controlDict includes time steps which seem to simply be a way of keeping track of the number of solver iterations. Do I only really need to care about the final residuals? Or is it important to have many steps as well? Is a high number of iterations per step indicative of poor fvSchemes/fvSolution settings or is it mainly indicative that my tolerances are too tight?

Initially I used a GAMG solver but the resulting flux values through my domain did not converge very well. So then I started using the PCG solver with the following fvSolution file.

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
    T
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-8;
        relTol          0;
    }
}
SIMPLE
{
    nNonOrthogonalCorrectors 1;
}
// ************************************************************************* //
Here's an example of my output. In the 25 steps the final residuals are all very close, but the number of iterations decreases considerably. In a case like this, is there any benefit to going past one or two steps since the final residual doesn't change?

Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-340defec456f
Exec   : laplacianFoam -parallel
Date   : May 27 2021
Time   : 15:33:04
Host   : "srv16-seds"
PID    : 262648
I/O    : uncollated
Case   : /home/user/CUBE/OL1_LC1000
nProcs : 4
Slaves : 
3
(
"srv16-seds.262649"
"srv16-seds.262650"
"srv16-seds.262651"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: No convergence criteria found

Reading field T

Reading transportProperties

Reading diffusivity DT

No finite volume options present

Calculating temperature distribution

Time = 1

DICPCG:  Solving for T, Initial residual = 0.99999999999107569426115560418111, Final residual = 9.7359573231362151803842296593147e-09, No Iterations 674
DICPCG:  Solving for T, Initial residual = 0.29936521364782786580605034032487, Final residual = 9.8227074689240328111439158327405e-09, No Iterations 598
ExecutionTime = 200.78999999999999204192135948688 s  ClockTime = 202 s

Time = 2

DICPCG:  Solving for T, Initial residual = 0.04936009407679749216857345572862, Final residual = 9.5588303849891255977202478202187e-09, No Iterations 559
DICPCG:  Solving for T, Initial residual = 0.012411825469636579219456784528575, Final residual = 9.9918096524054039411005939392944e-09, No Iterations 465
ExecutionTime = 361.29000000000002046363078989089 s  ClockTime = 363 s

Time = 3

DICPCG:  Solving for T, Initial residual = 0.0049470722656381055370999888509687, Final residual = 9.909222132449522098222617898667e-09, No Iterations 414
DICPCG:  Solving for T, Initial residual = 0.0028858897183733894092894090022128, Final residual = 9.9931511985862581086117862705191e-09, No Iterations 359
ExecutionTime = 488.35000000000002273736754432321 s  ClockTime = 494 s

Time = 4

DICPCG:  Solving for T, Initial residual = 0.0021913925195753808893017744452436, Final residual = 9.9800311390956302319122818021875e-09, No Iterations 286
DICPCG:  Solving for T, Initial residual = 0.0018585806673575490811228805299038, Final residual = 9.9114819390907541165364761032511e-09, No Iterations 214
ExecutionTime = 570.04999999999995452526491135359 s  ClockTime = 576 s

Time = 5

DICPCG:  Solving for T, Initial residual = 0.0016614318260583058484841645352503, Final residual = 9.8674054518951495158781637420317e-09, No Iterations 92
DICPCG:  Solving for T, Initial residual = 0.0015266092312223946986932121561154, Final residual = 9.9325194049474741141119227337379e-09, No Iterations 32
ExecutionTime = 591.57000000000005002220859751105 s  ClockTime = 598 s

Time = 6

DICPCG:  Solving for T, Initial residual = 0.0014273509883033445172495490282927, Final residual = 9.7150124507147298465936570855545e-09, No Iterations 17
DICPCG:  Solving for T, Initial residual = 0.0013513557145077965092327954010898, Final residual = 9.746098580813178473996809356595e-09, No Iterations 12
ExecutionTime = 597.67999999999994997779140248895 s  ClockTime = 604 s

Time = 7

DICPCG:  Solving for T, Initial residual = 0.0012922577249493555351378404338902, Final residual = 8.765346045313475593952001546031e-09, No Iterations 11
DICPCG:  Solving for T, Initial residual = 0.001245602391909901183672526592261, Final residual = 8.2352667077197453915482681604567e-09, No Iterations 11
ExecutionTime = 602.64999999999997726263245567679 s  ClockTime = 609 s

Time = 8

DICPCG:  Solving for T, Initial residual = 0.0012073769139051989361666183953048, Final residual = 9.5026691000652706992280743651148e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.0011757369760335395058453711314428, Final residual = 7.2940530228971660421404454768129e-09, No Iterations 11
ExecutionTime = 607.40999999999996816768543794751 s  ClockTime = 614 s

Time = 9

DICPCG:  Solving for T, Initial residual = 0.0011494781238797395842010651278997, Final residual = 8.3643011070344197137123765269096e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.0011276899527113946625905827048086, Final residual = 9.0911588808574767646151549606304e-09, No Iterations 10
ExecutionTime = 612.10000000000002273736754432321 s  ClockTime = 619 s

Time = 10

DICPCG:  Solving for T, Initial residual = 0.0011095948934148026302631828698964, Final residual = 8.8844444582587322795010770226654e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.0010946490732921261134630297462422, Final residual = 8.5150157599228302120235789204883e-09, No Iterations 10
ExecutionTime = 616.67999999999994997779140248895 s  ClockTime = 623 s

Time = 11

DICPCG:  Solving for T, Initial residual = 0.0010826748904859536878908521373432, Final residual = 8.3195762452344395818437308839574e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.0010731954153872067143915547404731, Final residual = 8.0562293940606097488640790420071e-09, No Iterations 10
ExecutionTime = 621.29999999999995452526491135359 s  ClockTime = 628 s

Time = 12

DICPCG:  Solving for T, Initial residual = 0.001066093538563909126279383166036, Final residual = 7.8890377911349672425259712399415e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.0010613834567342851026433558914164, Final residual = 7.706864278009963131769483209426e-09, No Iterations 10
ExecutionTime = 625.95000000000004547473508864641 s  ClockTime = 633 s

Time = 13

DICPCG:  Solving for T, Initial residual = 0.0010587205574505466343371296034093, Final residual = 9.925345394732363765788595998292e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0010577118511664704465780051378943, Final residual = 7.6419085909385810127787366135069e-09, No Iterations 10
ExecutionTime = 630.47000000000002728484105318785 s  ClockTime = 637 s

Time = 14

DICPCG:  Solving for T, Initial residual = 0.001057805476903748466421806284643, Final residual = 9.3352777658709296960675103082584e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0010589031917784710694341310244226, Final residual = 9.4994149884089111388916018292178e-09, No Iterations 9
ExecutionTime = 634.78999999999996362021192908287 s  ClockTime = 641 s

Time = 15

DICPCG:  Solving for T, Initial residual = 0.001060947571672199180731199774641, Final residual = 7.3132647701374290112027792484795e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.0010638777983996935451449505904975, Final residual = 8.9612383765949922625054858732647e-09, No Iterations 9
ExecutionTime = 639.27999999999997271515894681215 s  ClockTime = 646 s

Time = 16

DICPCG:  Solving for T, Initial residual = 0.0010676714089250536124375834390321, Final residual = 9.1361847543866629127292864048088e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0010722922104279652803782152403755, Final residual = 7.057993721573911677559808085583e-09, No Iterations 10
ExecutionTime = 643.76999999999998181010596454144 s  ClockTime = 651 s

Time = 17

DICPCG:  Solving for T, Initial residual = 0.0010777213747203905850474692229568, Final residual = 8.7014997708987952197143817922691e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0010839168463820873355291096729047, Final residual = 8.9290261775459772933884826221808e-09, No Iterations 9
ExecutionTime = 648.08000000000004092726157978177 s  ClockTime = 655 s

Time = 18

DICPCG:  Solving for T, Initial residual = 0.0010908465365125387391831424110933, Final residual = 6.8529259759907971351336162266297e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.0010985028170533844837919446035812, Final residual = 8.4932865057385959629627079805862e-09, No Iterations 9
ExecutionTime = 652.53999999999996362021192908287 s  ClockTime = 659 s

Time = 19

DICPCG:  Solving for T, Initial residual = 0.0011068681176652969948975835379201, Final residual = 8.744625818748223665747071526623e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0011159362932743601901086627492532, Final residual = 9.8523988577962435105843527153452e-09, No Iterations 9
ExecutionTime = 656.91999999999995907273842021823 s  ClockTime = 664 s

Time = 20

DICPCG:  Solving for T, Initial residual = 0.0011256943819246672394696062724506, Final residual = 9.7968062836950933207724018757234e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0011361396297413822904787128464932, Final residual = 9.746827695909840881030629660027e-09, No Iterations 9
ExecutionTime = 661.25 s  ClockTime = 668 s

Time = 21

DICPCG:  Solving for T, Initial residual = 0.0011472620636991796329307025104072, Final residual = 9.7136993136242671375382118597978e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0011590610956644252418218377087555, Final residual = 9.6817867381137596561430872649234e-09, No Iterations 9
ExecutionTime = 665.57000000000005002220859751105 s  ClockTime = 673 s

Time = 22

DICPCG:  Solving for T, Initial residual = 0.0011715315234211794073043710895377, Final residual = 9.6586736034028382467561365306435e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0011846738895478236587577303140506, Final residual = 9.6407293764852469080778942000023e-09, No Iterations 9
ExecutionTime = 669.87999999999999545252649113536 s  ClockTime = 677 s

Time = 23

DICPCG:  Solving for T, Initial residual = 0.0011984888612897154867853455328941, Final residual = 9.6288876976836497699403070072051e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0012129765554697276644380288246339, Final residual = 9.6220355587989789020312954227927e-09, No Iterations 9
ExecutionTime = 674.23000000000001818989403545856 s  ClockTime = 681 s

Time = 24

DICPCG:  Solving for T, Initial residual = 0.0012281366253050461385259994884223, Final residual = 9.6215856387426752108226702341585e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0012439737911124472500429272159295, Final residual = 9.6302432487258157729989954350981e-09, No Iterations 9
ExecutionTime = 678.55999999999994543031789362431 s  ClockTime = 686 s

Time = 25

DICPCG:  Solving for T, Initial residual = 0.0012604911384544083968739514034496, Final residual = 9.6440262237010657485857656858255e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.0012776885952470796222607551939632, Final residual = 9.6624218731269942531164125103585e-09, No Iterations 9
ExecutionTime = 682.87999999999999545252649113536 s  ClockTime = 690 s

End

Finalising parallel run
The above solution (aside from the question of the necessity of 25 steps) does seem to work fine on a 100mm X 100 mm X 100 mm cube but when I increase the length to 1600 mm the number of iterations hits 1000 and the final residual is many orders of magnitude larger. Does it seem like I'm doing something wrong or is this to be expected with a higher aspect ratio mesh (going from 1:1:1: to 16:1:1)?

Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-340defec456f
Exec   : laplacianFoam -parallel
Date   : Jun 03 2021
Time   : 18:17:25
Host   : "srv16-seds"
PID    : 572296
I/O    : uncollated
Case   : /home/user/CASES/OL1_LC1000
nProcs : 4
Slaves : 
3
(
"srv16-seds.572297"
"srv16-seds.572298"
"srv16-seds.572299"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: No convergence criteria found

Reading field T

Reading transportProperties

Reading diffusivity DT

No finite volume options present

Calculating temperature distribution

Time = 1

DICPCG:  Solving for T, Initial residual = 1, Final residual = 0.0013376263303212366888306217305171, No Iterations 1000
DICPCG:  Solving for T, Initial residual = 0.29183194732282119465693881465995, Final residual = 0.00026922573679248184164852775168697, No Iterations 1000
ExecutionTime = 10962.19000000000050931703299284 s  ClockTime = 10981 s

Time = 2

DICPCG:  Solving for T, Initial residual = 0.077903245197562878687769227781246, Final residual = 2.9009004950946739692348511074904e-05, No Iterations 1000
DICPCG:  Solving for T, Initial residual = 0.029377252753838793003504648027047, Final residual = 1.7210094286604748071815851329092e-05, No Iterations 1000
ExecutionTime = 22106.639999999999417923390865326 s  ClockTime = 22146 s

Time = 3

DICPCG:  Solving for T, Initial residual = 0.019212631418907503283444171415795, Final residual = 2.882887164641591866957480091993e-06, No Iterations 1000
DICPCG:  Solving for T, Initial residual = 0.017580080110607066573580326007686, Final residual = 1.7682425868997719388880712418355e-06, No Iterations 1000
ExecutionTime = 33438.139999999999417923390865326 s  ClockTime = 33497 s

Time = 4
Adam_K is offline   Reply With Quote

Old   June 7, 2021, 08:29
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Very strange behavior. Can you share your case?

By the way ... the initial residual is the important one. The final shows us, if the linear solver does find a solution of the matrix system we are solving at the moment.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 7, 2021, 08:56
Default
  #3
Member
 
Adam
Join Date: Nov 2018
Posts: 36
Rep Power: 7
Adam_K is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Very strange behavior. Can you share your case?
Sure, I've attached the case files + .brep + .geo file (I mesh with gmsh) since I assume that uploading the actual mesh will be too big.

Quote:
Originally Posted by Tobi View Post
By the way ... the initial residual is the important one. The final shows us, if the linear solver does find a solution of the matrix system we are solving at the moment.
Thanks for the clarification, looks like I've got some more background reading to do.
Attached Files
File Type: zip CFDonline.zip (86.5 KB, 6 views)
Adam_K is offline   Reply With Quote

Old   June 7, 2021, 10:04
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Please at in the source file of the laplacian.C file:

Code:
            fvOptions.constrain(TEqn);
            TEqn.relax();
            TEqn.solve();
            fvOptions.correct(T);
and recompile the application (wmake). In addition, insert in the fvSolution file the following at the end:
Code:
relaxationFactors
{
    equations
    {
        T     0.8;
    }
}
I guess it is too stiff and we need under-relaxation as the time-dependent term is missing (which is a limiter in the solution).
croecker likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 8, 2021, 09:05
Default
  #5
Member
 
Adam
Join Date: Nov 2018
Posts: 36
Rep Power: 7
Adam_K is on a distinguished road
Thanks for the tips!

I assume that you meant laplacianFoam.c in openfoam8/applications/solvers/basic/laplacianFoam.c.

I was not able to save the file because it was read only. So I did the following based on this thread.

Code:
cp -r $FOAM_APP $FOAM_RUN
Replaced FOAM_APPBIN in "$FOAM_RUN/applications/solvers/basic/laplacianFoam/Make
/files" by FOAM_USER_APPBIN. Then ran wmake.

It seems to run faster now (12 vs 33 seconds in the example below), although the initial residual after 25 steps is 5 times larger.

Here without relaxation:
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-340defec456f
Exec   : laplacianFoam
Date   : Jun 08 2021
Time   : 11:20:30
Host   : "srv16-seds"
PID    : 757820
I/O    : uncollated
Case   : /home/user/testNoRelax
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: No convergence criteria found

Reading field T

Reading transportProperties

Reading diffusivity DT

No finite volume options present

Calculating temperature distribution

Time = 1

DICPCG:  Solving for T, Initial residual = 0.99999999999946209694456911165616, Final residual = 9.3941622433799702091526345553406e-09, No Iterations 252
DICPCG:  Solving for T, Initial residual = 0.29041453461302718652703447332897, Final residual = 8.9072139109022076936970487514265e-09, No Iterations 220
ExecutionTime = 7.790000000000000035527136788005 s  ClockTime = 8 s

Time = 2

DICPCG:  Solving for T, Initial residual = 0.051972157937314272801998527029355, Final residual = 9.8446714508909861498172047165021e-09, No Iterations 206
DICPCG:  Solving for T, Initial residual = 0.016404898425008588441764700860404, Final residual = 9.7689199185977901698379693528999e-09, No Iterations 167
ExecutionTime = 13.83999999999999985789145284798 s  ClockTime = 14 s

Time = 3

DICPCG:  Solving for T, Initial residual = 0.008710286809118606560220499090974, Final residual = 9.7184480990647138006463984531355e-09, No Iterations 149
DICPCG:  Solving for T, Initial residual = 0.006196627359666518480851848948987, Final residual = 9.5917588970019467713552674555631e-09, No Iterations 135
ExecutionTime = 18.48000000000000042632564145606 s  ClockTime = 19 s

Time = 4

DICPCG:  Solving for T, Initial residual = 0.0050824877528735275256099868101956, Final residual = 9.9325600564494361335043619959904e-09, No Iterations 119
DICPCG:  Solving for T, Initial residual = 0.0044185282788387113608874479098176, Final residual = 9.9924352665122720477183177801607e-09, No Iterations 60
ExecutionTime = 21.48999999999999843680598132778 s  ClockTime = 22 s

Time = 5

...

Time = 21

DICPCG:  Solving for T, Initial residual = 0.00093303476365616012933035250398461, Final residual = 7.2291354382065740724956122301506e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.00090917770396538148420378933067809, Final residual = 7.0569503182932826831494063960729e-09, No Iterations 9
ExecutionTime = 31.37000000000000099475983006414 s  ClockTime = 32 s

Time = 22

DICPCG:  Solving for T, Initial residual = 0.00088608552134905149266080881531593, Final residual = 6.8869026565399615341733985862324e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.00086384993993195114889149799353163, Final residual = 6.7273561699599664429890091886608e-09, No Iterations 9
ExecutionTime = 31.8500000000000014210854715202 s  ClockTime = 32 s

Time = 23

DICPCG:  Solving for T, Initial residual = 0.00084231028520622916195420559759555, Final residual = 6.5680744046397447726836210386402e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.000821479538727757350492775234585, Final residual = 6.4177296108417369699678447646403e-09, No Iterations 9
ExecutionTime = 32.310000000000002273736754432321 s  ClockTime = 33 s

Time = 24

DICPCG:  Solving for T, Initial residual = 0.00080130841386544617889475805583288, Final residual = 6.2670486114671524639597905987753e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.00078203228372547334192738111013909, Final residual = 6.1249004959002893651056657832628e-09, No Iterations 9
ExecutionTime = 32.78000000000000113686837721616 s  ClockTime = 33 s

Time = 25

DICPCG:  Solving for T, Initial residual = 0.00076331279279923743182056927736312, Final residual = 5.9820402596463485177285687667461e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.00074538567135008673529561473714011, Final residual = 5.8474953906457247514119391674798e-09, No Iterations 9
ExecutionTime = 33.259999999999998010480339871719 s  ClockTime = 33 s

End
Here with relaxation:
Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-340defec456f
Exec   : laplacianFoam
Date   : Jun 08 2021
Time   : 11:22:32
Host   : "srv16-seds"
PID    : 757889
I/O    : uncollated
Case   : /home/user/test
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: No convergence criteria found

Reading field T

Reading transportProperties

Reading diffusivity DT

No finite volume options present

Calculating temperature distribution

Time = 1

DICPCG:  Solving for T, Initial residual = 0.99999999996874677776759199332446, Final residual = 8.8496482942733626673009660816398e-09, No Iterations 11
DICPCG:  Solving for T, Initial residual = 0.19543329461575437155929080290662, Final residual = 2.0585641600321122840042101947468e-09, No Iterations 11
ExecutionTime = 0.78000000000000002664535259100376 s  ClockTime = 1 s

Time = 2

DICPCG:  Solving for T, Initial residual = 0.1006244947085474100711977030187, Final residual = 4.1127489003026880821653010842504e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.067795502872944279904032782724244, Final residual = 2.9501797847286392794605311228453e-09, No Iterations 10
ExecutionTime = 1.3000000000000000444089209850063 s  ClockTime = 2 s

Time = 3

DICPCG:  Solving for T, Initial residual = 0.050424405476877633136556511317394, Final residual = 1.982804737723231519840403418403e-09, No Iterations 10
DICPCG:  Solving for T, Initial residual = 0.039881397990589102786618269647079, Final residual = 8.6591988770661996594947036479453e-09, No Iterations 9
ExecutionTime = 1.8000000000000000444089209850063 s  ClockTime = 2 s

Time = 4

DICPCG:  Solving for T, Initial residual = 0.032879924207762763199713873518704, Final residual = 6.8781960995812208787371059171434e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.027889144238455992191871857244223, Final residual = 5.6553883176248379435887428195139e-09, No Iterations 9
ExecutionTime = 2.290000000000000035527136788005 s  ClockTime = 2 s

Time = 5

DICPCG:  Solving for T, Initial residual = 0.024140937991051145128373889292561, Final residual = 4.7737373389323962805594811216296e-09, No Iterations 9
DICPCG:  Solving for T, Initial residual = 0.021268055373218387738010193288574, Final residual = 4.1233172868907930064703193818055e-09, No Iterations 9
ExecutionTime = 2.7700000000000000177635683940025 s  ClockTime = 3 s

...

Time = 21

DICPCG:  Solving for T, Initial residual = 0.0046820965781367409122570855117829, Final residual = 5.0277044066751759810488688995193e-09, No Iterations 8
DICPCG:  Solving for T, Initial residual = 0.0045712059814553328632169559853082, Final residual = 4.9511166906100507681988477409925e-09, No Iterations 8
ExecutionTime = 10.16999999999999992894572642399 s  ClockTime = 10 s

Time = 22

DICPCG:  Solving for T, Initial residual = 0.0044655666030541368155537540474143, Final residual = 4.878484250625371291884908089018e-09, No Iterations 8
DICPCG:  Solving for T, Initial residual = 0.0043648094662825601824929222516403, Final residual = 4.8096077017395777760449464104109e-09, No Iterations 8
ExecutionTime = 10.63000000000000078159700933611 s  ClockTime = 11 s

Time = 23

DICPCG:  Solving for T, Initial residual = 0.0042685994508113236922675071127742, Final residual = 4.7444234087666250395576231365605e-09, No Iterations 8
DICPCG:  Solving for T, Initial residual = 0.004176631980765625057339107684129, Final residual = 4.6829679227423145062876648383847e-09, No Iterations 8
ExecutionTime = 11.08000000000000007105427357601 s  ClockTime = 11 s

Time = 24

DICPCG:  Solving for T, Initial residual = 0.0040886276886142360054154920590008, Final residual = 4.6251601516086179586614514000747e-09, No Iterations 8
DICPCG:  Solving for T, Initial residual = 0.004004332917892248523694664896766, Final residual = 4.5712454425893547619251703977537e-09, No Iterations 8
ExecutionTime = 11.53999999999999914734871708788 s  ClockTime = 12 s

Time = 25

DICPCG:  Solving for T, Initial residual = 0.003923514738339924264043379054101, Final residual = 4.5211003078209630404462088964536e-09, No Iterations 8
DICPCG:  Solving for T, Initial residual = 0.0038459594557208845629070470550914, Final residual = 4.4746326395357796834751908056013e-09, No Iterations 8
ExecutionTime = 11.99000000000000021316282072803 s  ClockTime = 12 s

End
Adam_K is offline   Reply With Quote

Old   June 8, 2021, 14:33
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Yes that is obvious that it runs faster and that the initial residual is not as small due to the fact that we under-relax the matrix system. That means, we put some part from the matrix A to the source vector b. The result is: more explicit but the diagonal dominance of the matrix A is larger which helps the matrix solver to find the solution faster - indicated to the No iterations which are less for relaxed systems. I just rechecked your case:


Code:
laplacianSchemes
{
    default         none;
    laplacian(DT,T) Gauss linear orthogonal;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}
Question: Do you have a 100 % hexahedral mesh? if yes, why do you set corrected for the surface gradient calculation and if not, your laplace scheme is wrong.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply


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
Solver settings: Coupled, multi-grid, control-volume-based solver ocyee CFX 4 May 1, 2020 07:20
PEMFC model with FLUENT brahimchoice FLUENT 22 April 19, 2020 15:44
SU2 Inviscid Hypersonic Solver Settings jclegg SU2 2 April 10, 2019 11:35
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 16:08
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion faizan_habib7 CFX 4 February 1, 2016 17:00


All times are GMT -4. The time now is 16:12.