42 int main(
int argc,
char *argv[])
48 "Name of the pressure field" 51 argList::addBoolOption
54 "Initialise U boundary conditions" 57 argList::addBoolOption
60 "Write the velocity potential field" 63 argList::addBoolOption
66 "Calculate and write the pressure field" 69 argList::addBoolOption
71 "withFunctionObjects",
72 "execute functionObjects" 81 #include "createFields.H" 85 Info<<
nl <<
"Calculating potential flow" <<
endl;
89 runTime.functionObjects().start();
104 PhiEqn.setReference(PhiRefCell, PhiRefValue);
109 phi -= PhiEqn.flux();
115 Info<<
"Continuity error = " 120 U.correctBoundaryConditions();
122 Info<<
"Interpolated velocity error = " 139 Info<<
nl <<
"Calculating approximate pressure field" <<
endl;
142 scalar pRefValue = 0.0;
176 pEqn.setReference(pRefCell, pRefValue);
183 runTime.functionObjects().end();
185 Info<<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s" 186 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
fvMatrix< scalar > fvScalarMatrix
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
const dictionary & potentialFlow(mesh.solutionDict().subDict("potentialFlow"))
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
bool adjustPhi(surfaceScalarField &phi, const volVectorField &U, volScalarField &p)
Adjust the balance of fluxes to obey continuity.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
volVectorField F(fluid.F())
dimensioned< scalar > magSqr(const dimensioned< Type > &)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
Foam::argList args(argc, argv)
bool setRefCell(const volScalarField &field, const volScalarField &fieldRef, const dictionary &dict, label &refCelli, scalar &refValue, const bool forceReference=false)
If the field fieldRef needs referencing find the reference cell nearest.