101int 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"
157 Info<<
nl <<
"Calculating potential flow" <<
endl;
164 runTime.functionObjects().start();
183 PhiEqn.setReference(PhiRefCell, PhiRefValue);
188 phi -= PhiEqn.flux();
194 Info<<
"Continuity error = "
198 U = fvc::reconstruct(
phi);
199 U.correctBoundaryConditions();
201 Info<<
"Interpolated velocity error = "
210 if (
args.found(
"writephi"))
216 if (
args.found(
"writePhi"))
222 if (
args.found(
"writep"))
224 Info<<
nl <<
"Calculating approximate pressure field" <<
endl;
248 F & fvc::div(
phi,
U),
258 fvm::laplacian(
p) + divDivUU
268 runTime.functionObjects().end();
270 runTime.printExecutionTime(Info);
const dictionary & potentialFlow(mesh.solutionDict().subDict("potentialFlow"))
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
messageStream Info
Information stream (stdout output on master, null elsewhere).
Type weightedAverage(const UList< scalar > &weights, const UList< Type > &fld)
The local weighted average of a field, using the mag() of the weights.
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< Type > sum(const DimensionedField< Type, GeoMesh > &f1, const label comm)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)
setRefCell(p, pimple.dict(), pRefCell, pRefValue)