50 <<
"Cannot have all resistances set to negative, resistance = " 57 for (label cmpt = 0; cmpt < vector::nComponents; cmpt++)
61 val[cmpt] *= -maxCmpt;
73 const word& modelType,
75 const dictionary&
dict,
76 const wordRe& cellZoneName
93 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
95 zoneName_(cellZoneName),
99 coordinateSystem::
New(
mesh, coeffs_, coordinateSystem::typeName)
135 for (
const label celli : cZone)
137 const cell&
c =
cells[celli];
140 for (
const point& pt : cellPoints)
142 bb.add(
csys().localPosition(pt));
157 if (!mesh_.upToDatePoints(*
this))
159 calcTransformModelData();
162 mesh_.setUpToDatePoints(*
this);
174 transformModelData();
178 if (!cellZoneIDs_.empty())
180 this->calcForce(
U,
rho,
mu, tforce.ref());
189 if (cellZoneIDs_.empty())
194 transformModelData();
206 if (cellZoneIDs_.empty())
211 transformModelData();
223 if (cellZoneIDs_.empty())
228 transformModelData();
254 cellZoneIDs_ = mesh_.cellZones().indices(zoneName_);
const Type & value() const noexcept
Return const reference to value.
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
Ostream & indent(Ostream &os)
Indent stream.
virtual bool writeData(Ostream &os) const
Write.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dictionary & dict() const
Return dictionary used for model construction.
virtual bool read()
Read object.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
List< face > faceList
A List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const cellList & cells() const
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
bool active_
Porosity active flag.
virtual const pointField & points() const
Return raw points.
porosityModel(const porosityModel &)=delete
No copy construct.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
wordRe zoneName_
Name(s) of cell-zone.
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
bool returnReduceAnd(const bool value, const label comm=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
vectorField pointField
pointField is a vectorField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) zone indices for all matches.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual const faceList & faces() const
Return raw faces.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const fvMesh & mesh_
Reference to the mesh database.
virtual void transformModelData()
Transform the model data wrt mesh changes.
const coordinateSystem & csys() const
Local coordinate system.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil) - psi) *pSat, rhoMin);# 1 "/home/chef2/andy/OpenFOAM/release/v2212/OpenFOAM-v2212/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
labelList cellZoneIDs_
Cell zone IDs.
const dictionary dict_
Dictionary used for model construction.
const dimensionedScalar mu
Atomic mass unit.
vector point
Point is a vector.
const dimensionedScalar c
Speed of light in a vacuum.
fvMatrix< vector > fvVectorMatrix
wordList groupNames() const
A list of the zone group names (if any)
static bool master(const label communicator=worldComm)
Am I the master rank.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
void correctBoundaryConditions()
Correct boundary field.
wordList names() const
A list of the zone names.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
virtual void addResistance(fvVectorMatrix &UEqn)
Add resistance.
List< cell > cellList
A List of cells.
Top level model for porosity models.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
static constexpr const zero Zero
Global zero (0)