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
103 zoneName_(cellZoneName),
109 dict_.lookup(
"cellZone") >> zoneName_;
112 cellZoneIDs_ = mesh_.cellZones().findIndices(zoneName_);
114 Info<<
" creating porous zone: " << zoneName_ <<
endl;
116 bool foundZone = !cellZoneIDs_.empty();
122 <<
"cannot find porous cellZone " << zoneName_
138 if (!mesh_.upToDatePoints(*
this))
140 calcTransformModelData();
143 mesh_.setUpToDatePoints(*
this);
159 if (!cellZoneIDs_.empty())
161 this->calcForce(U, rho, mu, tforce.
ref());
170 if (cellZoneIDs_.empty())
175 transformModelData();
187 if (cellZoneIDs_.empty())
192 transformModelData();
215 dict.
lookup(
"cellZone") >> zoneName_;
216 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.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-9/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()
const Type & value() const
Return const reference to value.
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)
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...
Top level model for porosity models.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.