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

Momentum predictor UEqn.H

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2020, 13:44
Question Momentum predictor UEqn.H
  #1
Member
 
nikhil108's Avatar
 
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 5
nikhil108 is on a distinguished road
Hallo Foamers,

I have a small doudt. In UEqn.H, in solvers where momentum predictor setting exists in pimple loop. If momentum predictor is set to no then the Right-hand side of the momentum equation is not solved (skipped because of if loop). But, I dont understand, in any case, we need to solve whole momentum equation to get U right? . Why we skip gravity and dp term ? what does this mean
Code:
     tmp<fvVectorMatrix> tUEqn
     (
         fvm::ddt(rho, U) + fvm::div(phi, U)
       + MRF.DDt(rho, U)
       + turbulence->divDevTau(U)
      ==
         fvOptions(rho, U)
     );
     fvVectorMatrix& UEqn = tUEqn.ref();
 
     UEqn.relax();
 
     fvOptions.constrain(UEqn);
 
// In here

     if (pimple.momentumPredictor())
     {
         solve
         (
             UEqn
          ==
             fvc::reconstruct
             (
                 (
                   - ghf*fvc::snGrad(rho)
                   - fvc::snGrad(p_rgh)
                 )*mesh.magSf()
             )
         );
 
         fvOptions.correct(U);
         K = 0.5*magSqr(U);
     }
nikhil108 is offline   Reply With Quote

Old   December 4, 2020, 03:50
Default
  #2
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Dear Nikhil,



When you turn off momentumPrediction, you do no solve the momentum equation.



If you look at the predictor-corrector solution algorithms used in CFD (PISO, SIMPLE, PIMPLE...), basically you do the following sequence:


- Discretize the momentum equation and form a matrix for U (optionnaly inverse this matrix to have a first guess of U)

- Form a matrix for p. This matrix depends on the coefficients of the matrix for U. Inverse the matrix for p.

- Correct the value of U point-wised based on the updated pressure field.
- Iterate until you converge.
- March in time



So, when you turn off momentumPrediction, you do update the coefficients in the matrix for U, but you do not inverse this matrix.


Cheers,
Cyprien
Cyp is offline   Reply With Quote

Old   December 4, 2020, 08:41
Default
  #3
Member
 
nikhil108's Avatar
 
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 5
nikhil108 is on a distinguished road
Hallo Cyprien,

Thanks for the explanation. Yah! now it's crystal clear.

cheers,
nick.
nikhil108 is offline   Reply With Quote

Reply

Tags
momentum equation, piso, ueqn.h

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
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 17, 2020 00:44
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 18:38
Simulation of Axial Fan Flow using A Momentum Source Subdomain Liam CFX 28 July 16, 2013 09:24
Spray total droplet momentum calculation help tarnsharma AVL FIRE 0 July 19, 2012 09:17
Derivation of Momentum Equation in Integral Form Demonwolf Main CFD Forum 2 October 29, 2009 20:53


All times are GMT -4. The time now is 06:23.