47 <<
"Negative resistances are invalid, resistance = " << resist
57 val[cmpt] *= -maxCmpt;
67 if (!coordSys_.R().uniform())
77 Foam::porosityModel::porosityModel
80 const word& modelType,
83 const word& cellZoneName
100 coeffs_(dict.
subDict(modelType +
"Coeffs")),
102 zoneName_(cellZoneName),
108 dict.
lookup(
"active") >> active_;
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);
155 transformModelData();
159 if (!cellZoneIDs_.empty())
161 this->calcForce(U, rho, mu, tforce.
ref());
170 if (cellZoneIDs_.empty())
175 transformModelData();
187 if (cellZoneIDs_.empty())
192 transformModelData();
204 if (cellZoneIDs_.empty())
209 transformModelData();
232 dict.
lookup(
"cellZone") >> zoneName_;
233 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.
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.
void size(const label)
Override size to be inconsistent with allocated storage.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
const Type & value() const
Return const reference to value.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
virtual bool writeData(Ostream &os) const
Write.
static const direction nComponents
Number of components in this vector space.
A class for handling words, derived from string.
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(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil)-psi)*pSat, rhoMin);#1"/home/ubuntu/OpenFOAM-4.1/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.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Mesh data needed to do the Finite Volume discretisation.
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.
T & ref() const
Return non-const reference or generate a fatal error.
virtual void addResistance(fvVectorMatrix &UEqn)
Add resistance.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
label fieldIndex(const label index) const
Return label index.
const Time & time() const
Return the top-level database.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.