ENH: Added fvOptions support to potentialFoam
This commit is contained in:
parent
ddeaf2c4c8
commit
1290c0f914
@ -1,4 +1,11 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||||
|
-I$(LIB_SRC)/sampling/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = -lfiniteVolume
|
EXE_LIBS = \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lmeshTools \
|
||||||
|
-lfvOptions \
|
||||||
|
-lsampling
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,7 +31,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
|
#include "fvIOoptionList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -49,17 +49,20 @@ int main(int argc, char *argv[])
|
|||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "readControls.H"
|
#include "readControls.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
#include "createFvOptions.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< nl << "Calculating potential flow" << endl;
|
Info<< nl << "Calculating potential flow" << endl;
|
||||||
|
|
||||||
// Since solver contains no time loop it would never execute
|
// Since solver contains no time loop it would never execute
|
||||||
// function objects so do it ourselves.
|
// function objects so do it ourselves
|
||||||
runTime.functionObjects().start();
|
runTime.functionObjects().start();
|
||||||
|
|
||||||
adjustPhi(phi, U, p);
|
adjustPhi(phi, U, p);
|
||||||
|
|
||||||
|
fvOptions.relativeFlux(phi);
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
@ -87,6 +90,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fvOptions.absoluteFlux(phi);
|
||||||
|
|
||||||
Info<< "continuity error = "
|
Info<< "continuity error = "
|
||||||
<< mag(fvc::div(phi))().weightedAverage(mesh.V()).value()
|
<< mag(fvc::div(phi))().weightedAverage(mesh.V()).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user