boundaryFoam: Added support for fvOptions

This commit is contained in:
Henry Weller
2015-12-01 10:05:22 +00:00
parent 39fbe85a93
commit 40c7a7996b
2 changed files with 11 additions and 1 deletions

View File

@ -5,6 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
@ -13,4 +14,5 @@ EXE_LIBS = \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-lsampling

View File

@ -38,6 +38,7 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "fvIOoptionList.H"
#include "wallFvPatch.H"
#include "makeGraph.H"
@ -52,8 +53,11 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "createFvOptions.H"
#include "interrogateWallPatches.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
@ -67,13 +71,17 @@ int main(int argc, char *argv[])
fvVectorMatrix UEqn
(
divR == gradP
divR == gradP + fvOptions(U)
);
UEqn.relax();
fvOptions.constrain(UEqn);
UEqn.solve();
fvOptions.correct(U);
// Correct driving force for a constant volume flow rate
dimensionedVector UbarStar = flowMask & U.weightedAverage(mesh.V());