OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

UEqn.H

Go to the documentation of this file.
00001     // Solve the momentum equation
00002 
00003     tmp<fvVectorMatrix> UEqn
00004     (
00005         fvm::div(phi, U)
00006       - fvm::Sp(fvc::div(phi), U)
00007       + turbulence->divDevReff(U)
00008     );
00009 
00010     UEqn().relax();
00011 
00012     eqnResidual = solve
00013     (
00014         UEqn()
00015       ==
00016         fvc::reconstruct
00017         (
00018             (
00019                 fvc::interpolate(rhok)*(g & mesh.Sf())
00020               - fvc::snGrad(p)*mesh.magSf()
00021             )
00022         )
00023     ).initialResidual();
00024 
00025     maxResidual = max(eqnResidual, maxResidual);
Copyright © 2000-2009 OpenCFD Ltd