Go to the documentation of this file.
50 <<
"Cannot have all resistances set to negative, resistance = "
61 val[cmpt] *= -maxCmpt;
70 Foam::porosityModel::porosityModel
73 const word& modelType,
76 const word& cellZoneName
95 zoneName_(cellZoneName),
105 dict_.readEntry(
"cellZone", zoneName_);
108 cellZoneIDs_ = mesh_.cellZones().indices(zoneName_);
110 Info<<
" creating porous zone: " << zoneName_ <<
endl;
112 bool foundZone = !cellZoneIDs_.empty();
118 <<
"cannot find porous cellZone " << zoneName_
126 const faceList& faces = mesh_.faces();
128 for (
const label zonei : cellZoneIDs_)
130 const cellZone& cZone = mesh_.cellZones()[zonei];
134 for (
const label celli : cZone)
139 for (
const point& pt : cellPoints)
141 bb.
add(csys().localPosition(pt));
156 if (!mesh_.upToDatePoints(*
this))
158 calcTransformModelData();
161 mesh_.setUpToDatePoints(*
this);
173 transformModelData();
177 if (!cellZoneIDs_.empty())
179 this->calcForce(
U,
rho,
mu, tforce.ref());
188 if (cellZoneIDs_.empty())
193 transformModelData();
205 if (cellZoneIDs_.empty())
210 transformModelData();
222 if (cellZoneIDs_.empty())
227 transformModelData();
253 cellZoneIDs_ = mesh_.cellZones().indices(zoneName_);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void reduce()
Parallel reduction of min/max values.
A class for handling words, derived from Foam::string.
const dimensionedScalar mu
Atomic mass unit.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
static word timeName(const scalar t, const int precision=precision_)
virtual bool read()
Read object.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector span() const
The bounding box span (from minimum to maximum)
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
virtual void transformModelData()
Transform the model data wrt mesh changes.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
static autoPtr< coordinateSystem > New(word modelType, const objectRegistry &obr, const dictionary &dict)
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void correctBoundaryConditions()
Correct boundary field.
static bool master(const label communicator=0)
Am I the master process.
virtual bool writeData(Ostream &os) const
Write.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
static const word null
An empty word.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
A bounding box defined in terms of min/max extrema points.
const dimensionedScalar c
Speed of light in a vacuum.
const Time & time() const
Return the top-level database.
virtual void addResistance(fvVectorMatrix &UEqn)
Add resistance.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
defineTypeNameAndDebug(combustionModel, 0)
A cell is defined as a list of faces with extra functionality.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
static constexpr direction nComponents
Number of components in this vector space.
void add(const boundBox &bb)
Extend to include the second box.