100int main(
int argc,
char *argv[])
104 "Overset potential flow solver which solves for the velocity potential"
111 "Name of the pressure field"
114 argList::addBoolOption
117 "Initialise U boundary conditions"
120 argList::addBoolOption
123 "Write the final velocity potential field"
126 argList::addBoolOption
129 "Calculate and write the Euler pressure field"
132 argList::addBoolOption
134 "withFunctionObjects",
135 "Execute functionObjects"
144 #include "createFields.H"
148 Info<<
nl <<
"Calculating potential flow" <<
endl;
156 runTime.functionObjects().start();
175 PhiEqn.setReference(PhiRefCell, PhiRefValue);
180 phi -= PhiEqn.flux();
186 Info<<
"Continuity error = "
187 <<
mag(fvc::div(
phi))().weightedAverage(
mesh.V()).value()
190 U = fvc::reconstruct(
phi);
191 U.correctBoundaryConditions();
193 Info<<
"Interpolated velocity error = "
211 Info<<
nl <<
"Calculating approximate pressure field" <<
endl;
235 F & fvc::div(
phi,
U),
245 fvm::laplacian(
p) + divDivUU
255 runTime.functionObjects().end();
257 runTime.printExecutionTime(Info);
bool found(const word &optName) const
Return true if the named option is found.
surfaceScalarField faceMask(localMin< scalar >(mesh).interpolate(cellMask))
adjustPhi(phiHbyA, U, p_rgh)
volVectorField F(fluid.F())
tmp< GeometricField< Type, faPatchField, areaMesh > > average(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Area-weighted average a edgeField creating a areaField.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
fvMatrix< scalar > fvScalarMatrix
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
messageStream Info
Information stream (stdout output on master, null elsewhere)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
const dictionary & potentialFlow(mesh.solutionDict().subDict("potentialFlow"))
setRefCell(p, pimple.dict(), pRefCell, pRefValue)