54 bool Foam::solvers::isothermalFilm::initFilmMesh()
59 DynamicList<label> wallPatchIndices_;
65 const polyPatch&
p = bm[
patchi];
67 if (isA<filmWallPolyPatch>(
p))
77 <<
"The number of film wall faces in the mesh "
79 <<
" is not equal to the number of cells "
87 <<
"There are no filmWall faces in the mesh"
99 const polyPatch&
p = bm[
patchi];
101 if (isA<filmSurfacePolyPatch>(
p))
110 <<
"More than one filmSurface patch defined: "
119 Info<<
"The filmSurface patch is not defined"
129 const polyPatch& wallp = bm[
patchi];
130 const labelList& fCells = wallp.faceCells();
132 UIndirectList<vector>(
nHat_, fCells) = wallp.faceNormals();
133 UIndirectList<scalar>(
magSf_, fCells) = wallp.magFaceAreas();
147 wordList alphaTypes(delta_.boundaryField().types());
151 if (!delta_.boundaryField()[
patchi].assignable())
153 alphaTypes[
patchi] = fixedValueFvPatchScalarField::typeName;
162 if (surfacePatchID != -1)
171 void Foam::solvers::isothermalFilm::correctCoNum()
175 CoNum = 0.5*
gMax(sumPhi/mesh.V().primitiveField())*runTime.deltaTValue();
179 *(
gSum(sumPhi)/
gSum(mesh.V().primitiveField()))
180 *runTime.deltaTValue();
187 void Foam::solvers::isothermalFilm::continuityErrors()
191 correctContinuityError();
193 if (mass.value() > small)
197 runTime.deltaT()*magSf*contErr()
225 return runTime.controlDict().modified();
234 runTime.controlDict().lookupOrDefault<scalar>(
"maxCo", vGreat);
237 runTime.controlDict().found(
"maxDeltaT")
238 ? runTime.controlDict().lookup<scalar>(
"maxDeltaT", runTime.userUnits())
258 thermoPtr_(thermoPtr),
259 thermo_(thermoPtr_()),
301 initialised_(initFilmMesh()),
330 deltaWet(
"deltaWet",
dimLength, thermo_.properties()),
355 fvc::
flux(alpha_*thermo_.
rho()*U_)
372 thermocapillary(!
isType<surfaceTensionModels::constant>(surfaceTension())),
394 alphaRhoPhi(alphaRhoPhi_),
434 return mesh.boundary()[surfacePatchID];
441 return refCast<const mappedFvPatchBaseBase>(
surfacePatch());
486 if (
pimple.correctTransport())
488 momentumTransport->correct();
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static const char *const typeName
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
DimensionedField< Type, GeoMesh > Internal
Type of the internal field from which this GeometricField is derived.
void correctBoundaryConditions()
Correct boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void append(const T &)
Append an element at the end of the list.
void size(const label)
Override size to be inconsistent with allocated storage.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh data needed to do the Finite Volume discretisation.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
const fvSchemes & schemes() const
Return the fvSchemes.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
void setFluxRequired(const word &name) const
Base class for fv patches that provide mapping between two fv patches.
Abstract base class for turbulence models (RAS, LES and laminar).
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Base-class for fluid thermodynamic properties based on density.
Abstract base class for run-time selectable region solvers.
const fvMesh & mesh
Region mesh.
virtual bool read()
Read controls.
Solver module for flow of compressible isothermal liquid films.
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
virtual void postSolve()
Called after the PIMPLE loop at the end of the time-step.
volScalarField & p
The thermodynamic pressure field.
autoPtr< filmCompressible::momentumTransportModel > momentumTransport
Pointer to the momentum transport model.
virtual bool dependenciesModified() const
Return true if the solver's dependencies have been modified.
const volScalarField & alpha
Film volume fraction in the cell layer.
virtual void moveMesh()
Called at the start of the PIMPLE loop to move the mesh.
virtual scalar maxDeltaT() const
Return the current maximum time-step for stable solution.
virtual void motionCorrector()
Corrections that follow mesh motion.
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
isothermalFilm(fvMesh &mesh, autoPtr< rhoFluidThermo >)
Construct from region mesh and thermophysical properties.
volScalarField VbyA_
Film cell volume/wall face area.
const mappedFvPatchBaseBase & surfacePatchMap() const
Return the film surface patch region-region map.
const fvPatch & surfacePatch() const
Return the film surface patch.
volScalarField::Internal magSf_
Film cell cross-sectional area magnitude.
volVectorField nHat_
Film wall normal.
virtual void preSolve()
Called at the start of the time-step, before the PIMPLE loop.
label surfacePatchID
Film surface patch ID.
virtual ~isothermalFilm()
Destructor.
virtual bool read()
Read controls.
labelList wallPatchIDs
List of film wall patch IDs.
'Patch' on surface as subset of triSurface.
Abstract base-class for surface tension models which return the surface tension coefficient field.
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
Foam::fvModels & fvModels(Foam::fvModels::New(mesh))
pimpleControl pimple(mesh)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Calculate the first temporal derivative.
Calculate the divergence of the given field.
Calculate the face-flux of the given field.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
Volume integrate volField creating a volField.
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
tmp< VolField< Type > > surfaceSum(const SurfaceField< Type > &ssf)
dimensioned< Type > domainIntegrate(const VolField< Type > &vf)
addToRunTimeSelectionTable(solver, compressibleMultiphaseVoF, fvMesh)
defineTypeNameAndDebug(compressibleMultiphaseVoF, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
Type gSum(const FieldField< Field, Type > &f)
List< label > labelList
A List of labels.
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.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
bool isType(const Type &t)
Check the typeid.
const dimensionSet dimLength
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
const dimensionSet dimArea
Type gMax(const FieldField< Field, Type > &f)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
fluidMulticomponentThermo & thermo