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     pZones.ddt(rho, U)
00006   + fvm::div(phi, U)
00007   + turbulence->divDevRhoReff(U)
00008 );
00009 
00010 if (oCorr == nOuterCorr-1)
00011 {
00012     UEqn().relax(1);
00013 }
00014 else
00015 {
00016     UEqn().relax();
00017 }
00018 
00019 mrfZones.addCoriolis(rho, UEqn());
00020 pZones.addResistance(UEqn());
00021 
00022 volScalarField rUA = 1.0/UEqn().A();
00023 
00024 if (momentumPredictor)
00025 {
00026     if (oCorr == nOuterCorr-1)
00027     {
00028         solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal"));
00029     }
00030     else
00031     {
00032         solve(UEqn() == -fvc::grad(p));
00033     }
00034 }
00035 else
00036 {
00037     U = rUA*(UEqn().H() - fvc::grad(p));
00038     U.correctBoundaryConditions();
00039 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines