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

momentumPredictor in PIMPLE (fvSolution)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2021, 02:02
Default momentumPredictor in PIMPLE (fvSolution)
  #1
New Member
 
WY
Join Date: Mar 2020
Posts: 25
Rep Power: 4
WUYing is on a distinguished road
Hi, I set "momentumPredictor yes;" in PIMPLE of fvSolution file and I use pimpleFoam. But when I check the output log file, I find it is the same with that of "momentumPredictor no;". So I don't know whether the momentum eq. is calculated at each time step. I am wondering is there any indicators in the log file to show that the "momentumPredictor yes;" has been applied in the calculation? Thanks!
WUYing is offline   Reply With Quote

Old   November 13, 2021, 15:18
Post
  #2
Member
 
MNM
Join Date: Aug 2017
Posts: 61
Rep Power: 7
SHUBHAM9595 is on a distinguished road
Hi WY, As we dont have the info which version u r using......maybe try true/false instead of yes/no....

To chek whether the part of momentum predictor is being executed by solver....Try putting the following extra statement (bold one) in ur momentum predictor loop.

And don't forget to compile your solver..!!

Code:
if (pimple.momentumPredictor())
{
    solve(UEqn == -fvc::grad(p));
    
     Info<< "Foam is great" << endl;

    fvOptions.correct(U);
}
Now, every time it goes through the if loop, you should be able to have Foam is great in ur log file...
SHUBHAM9595 is offline   Reply With Quote

Old   November 13, 2021, 15:24
Default
  #3
New Member
 
WY
Join Date: Mar 2020
Posts: 25
Rep Power: 4
WUYing is on a distinguished road
Quote:
Originally Posted by SHUBHAM9595 View Post
Hi WY, As we dont have the info which version u r using......maybe try true/false instead of yes/no....

To chek whether the part of momentum predictor is being executed by solver....Try putting the following extra statement (bold one) in ur momentum predictor loop.

And don't forget to compile your solver..!!

Code:
if (pimple.momentumPredictor())
{
    solve(UEqn == -fvc::grad(p));
    
     Info<< "Foam is great" << endl;

    fvOptions.correct(U);
}
Now, every time it goes through the if loop, you should be able to have Foam is great in ur log file...
Hi SHUBHAM9595, thanks for reply! I use OpenFOAM 8 in the cluster. So there is no any difference in the output log between "momentumPredictor true" and "momentumPredictor false" if I don't modify the source code of PIMPLE algorithm?
WUYing is offline   Reply With Quote

Old   November 13, 2021, 17:06
Default
  #4
Member
 
MNM
Join Date: Aug 2017
Posts: 61
Rep Power: 7
SHUBHAM9595 is on a distinguished road
Quote:
So there is no any difference in the output log between "momentumPredictor true" and "momentumPredictor false" if I don't modify the source code of PIMPLE algorithm?
Definitely there should be a difference....

The info statement was just to be double sure that your solver is going through those lines....

The log file for a true/yes/on momentumPredictor usually have "Solving for Ux"...which is unavailable for its counterpart...
SHUBHAM9595 is offline   Reply With Quote

Old   November 13, 2021, 17:59
Default
  #5
New Member
 
WY
Join Date: Mar 2020
Posts: 25
Rep Power: 4
WUYing is on a distinguished road
Quote:
Originally Posted by SHUBHAM9595 View Post
Definitely there should be a difference....

The info statement was just to be double sure that your solver is going through those lines....

The log file for a true/yes/on momentumPredictor usually have "Solving for Ux"...which is unavailable for its counterpart...
I compare the outputs for momentumPredictor=yes and momentumPredictor=no, and find they are the same, so that's why I am confused here.

The part of log file for momentumPredictor=No is shown below and it also include "Solving for Ux" and "Solving for Uy".
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: sixDoFRigidBodyMotion
Selecting sixDoFSolver Newmark
Translational constraint tensor (0 0 0 0 1 0 0 0 0)
Rotational constraint tensor (0 0 0 0 0 0 0 0 0)

PIMPLE: No convergence criteria found


PIMPLE: No corrector convergence criteria found
        Calculations will do 2 corrections


PIMPLE: Operating solver in transient mode with 2 outer correctors


Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
RAS
{
    RASModel        kOmegaSST;
    turbulence      on;
    printCoeffs     on;
    alphaK1         0.85;
    alphaK2         1;
    alphaOmega1     0.5;
    alphaOmega2     0.856;
    gamma1          0.555556;
    gamma2          0.44;
    beta1           0.075;
    beta2           0.0828;
    betaStar        0.09;
    a1              0.31;
    b1              1;
    c1              10;
    F3              false;
}

No MRF models present

No finite volume options present
Constructing face velocity Uf

Courant Number mean: 3.12577e-05 max: 0.00244642

Starting time loop

forces forces:
    Not including porosity effects
forces forceCoeffs:
    Not including porosity effects
forceCoeffs forceCoeffs:
    Not including porosity effects
forces forces write:
    sum of forces:
        pressure : (0 0 0)
        viscous  : (0 0 0)
        porous   : (0 0 0)
    sum of moments:
        pressure : (0 0 0)
        viscous  : (0 0 0)
        porous   : (0 0 0)

forceCoeffs forceCoeffs write:
    Cm    = 0
    Cd    = 0
    Cl    = 0
    Cl(f) = 0
    Cl(r) = 0
Courant Number mean: 3.12577e-05 max: 0.00244642
Time = 0.005

PIMPLE: Iteration 1
Restraint verticalSpring:  attachmentPt - anchor (0 0 0) spring length 0 force (-0 -0 -0)
6-DoF rigid body motion
    Centre of rotation: (0 0 0)
    Centre of mass: (0 0 0)
    Orientation: (1 0 0 0 1 0 0 0 1)
    Linear velocity: (0 0 0)
    Angular velocity: (0 0 0)
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 0.0165777, No Iterations 14
GAMG:  Solving for pcorr, Initial residual = 0.0181884, Final residual = 0.0181884, No Iterations 0
time step continuity errors : sum local = 0.000182016, global = -1.24516e-07, cumulative = -1.24516e-07
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 3.26433e-06, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 0.99801, Final residual = 6.48199e-07, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00625807, No Iterations 16
GAMG:  Solving for p, Initial residual = 0.0174018, Final residual = 0.000121456, No Iterations 6
time step continuity errors : sum local = 1.22305e-06, global = -8.54508e-08, cumulative = -2.09966e-07
GAMG:  Solving for p, Initial residual = 0.0193525, Final residual = 8.79035e-05, No Iterations 16
GAMG:  Solving for p, Initial residual = 0.0126285, Final residual = 6.23357e-08, No Iterations 22
time step continuity errors : sum local = 6.32078e-10, global = -5.9136e-11, cumulative = -2.10025e-07
PIMPLE: Iteration 2
smoothSolver:  Solving for Ux, Initial residual = 0.46122, Final residual = 2.30174e-07, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0225461, Final residual = 4.41782e-07, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.0194297, Final residual = 9.36663e-05, No Iterations 16
GAMG:  Solving for p, Initial residual = 0.0128303, Final residual = 9.04912e-05, No Iterations 6
time step continuity errors : sum local = 9.15772e-07, global = -6.71101e-08, cumulative = -2.77136e-07
GAMG:  Solving for p, Initial residual = 0.0101681, Final residual = 9.78036e-05, No Iterations 14
GAMG:  Solving for p, Initial residual = 0.00937999, Final residual = 4.13711e-08, No Iterations 22
time step continuity errors : sum local = 4.20708e-10, global = -3.7605e-11, cumulative = -2.77173e-07
smoothSolver:  Solving for omega, Initial residual = 3.6852e-05, Final residual = 8.70431e-07, No Iterations 1
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 6.20835e-07, No Iterations 4
ExecutionTime = 0.42 s  ClockTime = 1 s

forces forces write:
    sum of forces:
        pressure : (354.722 0.00226667 1.25337e-16)
        viscous  : (0.0967875 -9.5508e-07 -6.52158e-18)
        porous   : (0 0 0)
    sum of moments:
        pressure : (1.93686e-17 -3.29627e-17 2.12968e-06)
        viscous  : (-7.52294e-19 -5.23387e-19 3.28001e-06)
        porous   : (0 0 0)

forceCoeffs forceCoeffs write:
    Cm    = 8.83213e-06
    Cd    = 579.296
    Cl    = 0.00369913
    Cl(f) = 0.0018584
    Cl(r) = 0.00184073
WUYing is offline   Reply With Quote

Old   November 13, 2021, 18:48
Default
  #6
Member
 
s1291's Avatar
 
Join Date: Aug 2017
Location: Algeria
Posts: 72
Rep Power: 7
s1291 is on a distinguished road
Not directly answering your question but try to use the residuals function object with the fields (p U) and see the output with and without momentumPredictor set to true/false.
__________________
"When in doubt, use brute force." -- Ken Thompson
s1291 is offline   Reply With Quote

Old   November 13, 2021, 19:25
Default
  #7
New Member
 
WY
Join Date: Mar 2020
Posts: 25
Rep Power: 4
WUYing is on a distinguished road
Quote:
Originally Posted by s1291 View Post
Not directly answering your question but try to use the residuals function object with the fields (p U) and see the output with and without momentumPredictor set to true/false.
Hi s1291, thanks for reply! Do you mean to compare the residuals of p and U for momentumPrediction set true/false? Actaully, I have done this thing and the residuals are also almost same... I also attach the two residuals output for two cases.
Attached Images
File Type: png true.png (112.1 KB, 13 views)
File Type: png false.png (111.7 KB, 12 views)
WUYing is offline   Reply With Quote

Reply

Tags
fvsolution, openfoam 1806, pimple

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to use PIMPLE properly? floquation OpenFOAM Running, Solving & CFD 25 December 2, 2021 09:40
PIMPLE the value of the final under-relaxation factor Zbynek OpenFOAM 7 January 20, 2020 10:38
Error setting fvSolution PIMPLE xneop OpenFOAM Running, Solving & CFD 9 December 4, 2018 14:29
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
error while running modified pimple solver R_21 OpenFOAM Programming & Development 0 May 28, 2015 06:59


All times are GMT -4. The time now is 17:50.