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

Which procedure to solve Ueqn without momentum predictor.

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 5 Post By santiagomarquezd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2013, 21:04
Default Which procedure to solve Ueqn without momentum predictor.
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Hi,
This is icoFoam's code,:

Code:
fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U)
        );

        solve(UEqn == -fvc::grad(p));//this term is only executed when the momentumPredictor flag is set to true

        // --- PISO loop

        for (int corr=0; corr<nCorr; corr++)
        {
            volScalarField rAU(1.0/UEqn.A());

            volVectorField HbyA("HbyA", U);
            HbyA = rAU*UEqn.H();
            surfaceScalarField phiHbyA
            (
                "phiHbyA",
                (fvc::interpolate(HbyA) & mesh.Sf())
              + fvc::ddtPhiCorr(rAU, U, phi)
            );

            adjustPhi(phiHbyA, U, p);

            for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
            {
                fvScalarMatrix pEqn
                (
                    fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
                );
My confusion is if I set the momentum predictor is off, which line is to solve U?
sharonyue is offline   Reply With Quote

Old   July 2, 2013, 23:37
Default
  #2
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
Hi, in the PISO method, U is predicted and then corrected in the pressure-velocity coupling loop, so that, if you don't predict the velocity, the velocity used to start the coupling loop is a derivative of the velocity in the last time step as is done in interFoam and other solvers.

In the code you've cited the matrix for the momentum equation is assembled so that you have the A and H methods available for the use in the PISO loop, the line:

HbyA = rAU*UEqn.H();

calculates a first approximation for U using the H operator applied to the velocity of the last-timestep or which was predicted when you solved the UEqn (if you did it) and the A operator. If you need it, please check the definition of these operators in chapter 2.7 of my Ph.D. thesis

The link to my PhD thesis is provided in my user page at openfoamwiki.net: http://openfoamwiki.net/index.php/User:Santiagomarquezd

and Jasak's Ph.D. and other's thesis.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar

Last edited by wyldckat; May 24, 2016 at 17:39. Reason: rectified link according to request
santiagomarquezd 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
Simulation of Axial Fan Flow using A Momentum Source Subdomain Liam CFX 28 July 16, 2013 08:24
Linearized NS euqations: how to solve them?(problem with Matrix operations..) matteoL OpenFOAM Running, Solving & CFD 0 November 18, 2009 06:58
OpenFOAM wonbt solve the momentum U equation sek OpenFOAM Running, Solving & CFD 5 March 6, 2008 16:27
AirPak 2.06 solve problem ABS FLUENT 0 October 4, 2005 17:58
How to solve another continuum and momentum eqn? west_wing FLUENT 0 August 25, 2003 10:00


All times are GMT -4. The time now is 22:41.