Go to the documentation of this file.
93 int main(
int argc,
char *argv[])
99 "Name of the pressure field"
102 argList::addBoolOption
105 "Initialise U boundary conditions"
108 argList::addBoolOption
111 "Write the final velocity potential field"
114 argList::addBoolOption
117 "Calculate and write the Euler pressure field"
120 argList::addBoolOption
122 "withFunctionObjects",
123 "execute functionObjects"
130 pisoControl potentialFlow(
mesh,
"potentialFlow");
132 #include "createFields.H"
133 #include "createMRF.H"
137 Info<<
nl <<
"Calculating potential flow" <<
endl;
141 runTime.functionObjects().start();
147 while (potentialFlow.correctNonOrthogonal())
156 PhiEqn.setReference(PhiRefCell, PhiRefValue);
159 if (potentialFlow.finalNonOrthogonalIter())
161 phi -= PhiEqn.flux();
167 Info<<
"Continuity error = "
172 U.correctBoundaryConditions();
174 Info<<
"Interpolated velocity error = "
192 Info<<
nl <<
"Calculating approximate pressure field" <<
endl;
199 potentialFlow.dict(),
222 while (potentialFlow.correctNonOrthogonal())
236 runTime.functionObjects().end();
238 Info<<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
239 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
bool adjustPhi(surfaceScalarField &phi, const volVectorField &U, volScalarField &p)
Adjust the balance of fluxes to obey continuity.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< surfaceScalarField > interpolate(const RhoType &rho)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
const dimensionedScalar F
Faraday constant: default SI units: [C/mol].
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
fvMatrix< scalar > fvScalarMatrix
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
void 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.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
bool optionFound(const word &opt) const
Return true if the named option is found.
int main(int argc, char *argv[])
Foam::argList args(argc, argv)
dimensioned< scalar > magSqr(const dimensioned< Type > &)