47 <<
"Cannot have all resistances set to negative, resistance = " 53 maxCmpt =
max(0, maxCmpt);
59 val[cmpt] *= -maxCmpt;
69 if (!coordSys_.R().uniform())
79 Foam::porosityModel::porosityModel
82 const word& modelType,
85 const word& cellZoneName
104 zoneName_(cellZoneName),
111 dict_.lookup(
"cellZone") >> zoneName_;
114 cellZoneIDs_ = mesh_.cellZones().findIndices(zoneName_);
116 Info<<
" creating porous zone: " << zoneName_ <<
endl;
118 bool foundZone = !cellZoneIDs_.empty();
124 <<
"cannot find porous cellZone " << zoneName_
140 if (!mesh_.upToDatePoints(*
this))
142 calcTransformModelData();
145 mesh_.setUpToDatePoints(*
this);
157 transformModelData();
161 if (!cellZoneIDs_.empty())
163 this->calcForce(U, rho, mu, tforce.
ref());
172 if (cellZoneIDs_.empty())
177 transformModelData();
189 if (cellZoneIDs_.empty())
194 transformModelData();
206 if (cellZoneIDs_.empty())
211 transformModelData();
236 dict.
lookup(
"cellZone") >> zoneName_;
237 cellZoneIDs_ = mesh_.cellZones().findIndices(zoneName_);
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual bool writeData(Ostream &os) const
Write.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool read()
Read object.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const Time & time() const
Return the top-level database.
label fieldIndex(const label index) const
Return label index.
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
static const direction nComponents
Number of components in this vector space.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
A class for handling words, derived from string.
const Type & value() const
Return const reference to value.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
static const word null
An empty word.
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void transformModelData()
Transform the model data wrt mesh changes.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-7/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()
defineTypeNameAndDebug(combustionModel, 0)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
virtual ~porosityModel()
Destructor.
static autoPtr< coordinateSystem > New(const objectRegistry &obr, const dictionary &dict)
Select constructed from dictionary and objectRegistry.
Mesh data needed to do the Finite Volume discretisation.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
void correctBoundaryConditions()
Correct boundary field.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
virtual void addResistance(fvVectorMatrix &UEqn)
Add resistance.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.