99 int main(
int argc,
char *argv[])
103 "Potential flow solver which solves for the velocity potential" 110 "Name of the pressure field" 113 argList::addBoolOption
116 "Initialise U boundary conditions" 119 argList::addBoolOption
122 "Write the final volumetric flux field" 125 argList::addBoolOption
128 "Write the final velocity potential field" 131 argList::addBoolOption
134 "Calculate and write the Euler pressure field" 137 argList::addBoolOption
139 "withFunctionObjects",
140 "Execute functionObjects" 151 #include "createFields.H" 155 Info<<
nl <<
"Calculating potential flow" <<
endl;
159 runTime.functionObjects().start();
174 PhiEqn.setReference(PhiRefCell, PhiRefValue);
179 phi -= PhiEqn.flux();
185 Info<<
"Continuity error = " 190 U.correctBoundaryConditions();
192 Info<<
"Interpolated velocity error = " 214 Info<<
nl <<
"Calculating approximate pressure field" <<
endl;
258 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"))
const dimensionSet dimless
Dimensionless.
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)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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.