101 int main(
int argc,
char *argv[])
105 "Overset potential flow solver which solves for the velocity potential" 112 "Name of the pressure field" 115 argList::addBoolOption
118 "Initialise U boundary conditions" 121 argList::addBoolOption
124 "Write the final volumetric flux field" 127 argList::addBoolOption
130 "Write the final velocity potential field" 133 argList::addBoolOption
136 "Calculate and write the Euler pressure field" 139 argList::addBoolOption
141 "withFunctionObjects",
142 "Execute functionObjects" 153 #include "createFields.H" 157 Info<<
nl <<
"Calculating potential flow" <<
endl;
164 runTime.functionObjects().start();
183 PhiEqn.setReference(PhiRefCell, PhiRefValue);
188 phi -= PhiEqn.flux();
194 Info<<
"Continuity error = " 199 U.correctBoundaryConditions();
201 Info<<
"Interpolated velocity error = " 224 Info<<
nl <<
"Calculating approximate pressure field" <<
endl;
268 runTime.functionObjects().end();
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
fvMatrix< scalar > fvScalarMatrix
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
constexpr char nl
The newline '\n' character (0x0a)
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< GeometricField< Type, faPatchField, areaMesh > > average(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Area-weighted average a edgeField creating a areaField.
const dictionary & potentialFlow(mesh.solutionDict().subDict("potentialFlow"))
bool adjustPhi(surfaceScalarField &phi, const volVectorField &U, volScalarField &p)
Adjust the balance of fluxes to obey continuity.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
volVectorField F(fluid.F())
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> reconstruct(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
messageStream Info
Information stream (stdout output on master, null elsewhere)
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.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
bool found(const word &optName) const
Return true if the named option is found.