50 <<
"Cannot have all resistances set to negative, resistance = "
61 val[cmpt] *= -maxCmpt;
73 const word& modelType,
93 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
95 zoneName_(cellZoneName),
138 for (
const label celli : cZone)
143 for (
const point& pt : cellPoints)
145 bb.
add(
csys().localPosition(pt));
160 if (!mesh_.upToDatePoints(*
this))
162 calcTransformModelData();
165 mesh_.setUpToDatePoints(*
this);
177 transformModelData();
181 if (!cellZoneIDs_.empty())
183 this->calcForce(
U,
rho,
mu, tforce.
ref());
192 if (cellZoneIDs_.empty())
197 transformModelData();
209 if (cellZoneIDs_.empty())
214 transformModelData();
226 if (cellZoneIDs_.empty())
231 transformModelData();
257 cellZoneIDs_ = mesh_.cellZones().indices(zoneName_);
void correctBoundaryConditions()
Correct boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
wordList groupNames() const
A list of the zone group names (if any)
wordList names() const
A list of the zone names.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) zone indices for all matches.
A bounding box defined in terms of min/max extrema points.
void reduce()
Parallel reduction of min/max values.
void add(const boundBox &bb)
Extend to include the second box.
vector span() const
The bounding box span (from minimum to maximum)
A cell is defined as a list of faces with extra functionality.
Base class for coordinate system specification, the default coordinate system type is cartesian .
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
const Type & value() const
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
static constexpr direction nComponents
Number of components in bool is 1.
virtual const faceList & faces() const
Return raw faces.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
virtual const pointField & points() const
Return raw points.
Top level model for porosity models.
virtual void addResistance(fvVectorMatrix &UEqn)
Add resistance.
bool active_
Porosity active flag.
const fvMesh & mesh_
Reference to the mesh database.
virtual bool writeData(Ostream &os) const
Write.
virtual void transformModelData()
Transform the model data wrt mesh changes.
const dictionary dict_
Dictionary used for model construction.
wordRe zoneName_
Name(s) of cell-zone.
const coordinateSystem & csys() const
Local coordinate system.
const dictionary & dict() const
Return dictionary used for model construction.
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
labelList cellZoneIDs_
Cell zone IDs.
virtual bool read()
Inherit read from regIOobject.
const cellList & cells() const
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
splitCell * master() const
A class for managing temporary objects.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & mu
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
Field< vector > vectorField
Specialisation of Field<T> for vector.
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
constexpr char nl
The newline '\n' character (0x0a)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.