1 Info<<
"Reading velocity field U\n" <<
endl;
32 U.correctBoundaryConditions();
46 U.boundaryField().size(),
52 if (
U.boundaryField()[
patchi].fixesValue())
58 Info<<
"Constructing pressure field " << pName <<
nl <<
endl;
82 p.boundaryField().size(),
88 if (
p.boundaryField()[
patchi].fixesValue())
96 Info<<
"Constructing velocity potential field Phi\n" <<
endl;
104 IOobject::READ_IF_PRESENT,
112 label PhiRefCell = 0;
113 scalar PhiRefValue = 0;
bool optionFound(const word &opt) const
Return true if the named option is found.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
const fvSchemes & schemes() const
Return the fvSchemes.
void setFluxRequired(const word &name) const
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
tmp< SurfaceField< typename innerProduct< vector, Type >::type > > flux(const VolField< Type > &vf)
Return the face-flux field obtained from the given volVectorField.
List< word > wordList
A List of words.
VolField< vector > volVectorField
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimLength
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
SurfaceField< scalar > surfaceScalarField
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimVelocity
VolField< scalar > volScalarField
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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.
const dictionary & potentialFlow(mesh.solution().dict().subDict("potentialFlow"))
Foam::argList args(argc, argv)
volVectorField U(IOobject("U", runTime.name(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
forAll(p.boundaryField(), patchi)
wordList PhiBCTypes(p.boundaryField().size(), zeroGradientFvPatchScalarField::typeName)
Info<< "Reading velocity field U\n"<< endl;volVectorField U(IOobject("U", runTime.name(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);U=Zero;surfaceScalarField phi(IOobject("phi", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), fvc::flux(U));if(args.optionFound("initialiseUBCs")){ U.correctBoundaryConditions();phi=fvc::flux(U);}word pName("p");args.optionReadIfPresent("pName", pName);wordList pBCTypes(U.boundaryField().size(), fixedValueFvPatchScalarField::typeName);forAll(U.boundaryField(), patchi){ if(U.boundaryField()[patchi].fixesValue()) { pBCTypes[patchi]=zeroGradientFvPatchScalarField::typeName;}}Info<< "Constructing pressure field "<< pName<< nl<< endl;typeIOobject< volScalarField > pHeader(pName, runTime.name(), mesh)