FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

UEqn.H

Go to the documentation of this file.
00001 // Solve the Momentum equation
00002 
00003 tmp<fvVectorMatrix> UEqn
00004 (
00005     fvm::ddt(U)
00006   + fvm::div(phi, U)
00007   + turbulence->divDevReff(U)
00008 );
00009 
00010 if (oCorr == nOuterCorr-1)
00011 {
00012     UEqn().relax(1);
00013 }
00014 else
00015 {
00016     UEqn().relax();
00017 }
00018 
00019 volScalarField rUA = 1.0/UEqn().A();
00020 
00021 if (momentumPredictor)
00022 {
00023     if (oCorr == nOuterCorr-1)
00024     {
00025         solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal"));
00026     }
00027     else
00028     {
00029         solve(UEqn() == -fvc::grad(p));
00030     }
00031 }
00032 else
00033 {
00034     U = rUA*(UEqn().H() - fvc::grad(p));
00035     U.correctBoundaryConditions();
00036 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines