39#ifndef Foam_porosityModel_H
40#define Foam_porosityModel_H
128 inline label
fieldIndex(
const label index)
const;
149 const word& modelName,
153 const wordRe& cellZoneName
162 const word& modelType,
225 inline bool active()
const;
273 virtual bool global()
const
fileName globalFilePath(const word &typeName, const bool search=true) const
Helper for filePath that searches up if in parallel.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
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,...
A class for handling file names.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
Return pointer to new porosityModel object created on the freestore.
autoPtr< porosityModel > operator()(Istream &is) const
iNew(const fvMesh &mesh, const word &name)
Top level model for porosity models.
virtual void addResistance(fvVectorMatrix &UEqn)
Add resistance.
virtual void correct(fvVectorMatrix &UEqn, const volScalarField &rho, const volScalarField &mu) const =0
virtual void calcTransformModelData()=0
Transform the model data wrt mesh changes.
virtual void calcForce(const volVectorField &U, const volScalarField &rho, const volScalarField &mu, vectorField &force) const =0
Calculate the porosity force.
bool active_
Porosity active flag.
const fvMesh & mesh_
Reference to the mesh database.
void operator=(const porosityModel &)=delete
No copy assignment.
declareRunTimeSelectionTable(autoPtr, porosityModel, mesh,(const word &modelName, const word &name, const fvMesh &mesh, const dictionary &dict, const wordRe &cellZoneName),(modelName, name, mesh, dict, cellZoneName))
Selection table.
virtual bool writeData(Ostream &os) const
Write.
virtual bool global() const
Is object global.
const labelList & cellZoneIDs() const
Return const access to the cell zone IDs.
TypeName("porosityModel")
Runtime type information.
virtual ~porosityModel()=default
Destructor.
autoPtr< coordinateSystem > csysPtr_
Local coordinate system.
dictionary coeffs_
Model coefficients dictionary.
porosityModel(const porosityModel &)=delete
No copy construct.
virtual tmp< vectorField > force(const volVectorField &U, const volScalarField &rho, const volScalarField &mu)
Return the force over the cell zone(s)
virtual void transformModelData()
Transform the model data wrt mesh changes.
const dictionary dict_
Dictionary used for model construction.
virtual fileName filePath() const
Return complete path + object name if the file exists.
wordRe zoneName_
Name(s) of cell-zone.
virtual void correct(const fvVectorMatrix &UEqn, volTensorField &AU) const =0
const coordinateSystem & csys() const
Local coordinate system.
virtual void correct(fvVectorMatrix &UEqn) const =0
const dictionary & dict() const
Return dictionary used for model construction.
void adjustNegativeResistance(dimensionedVector &resist)
Adjust negative resistance values to be multiplier of max value.
static autoPtr< porosityModel > New(const word &name, const fvMesh &mesh, const dictionary &dict, const wordRe &cellZoneName=wordRe::null)
Selector.
bool active() const
Return const access to the porosity active flag.
const word & name() const
Return const access to the porosity model name.
labelList cellZoneIDs_
Cell zone IDs.
virtual bool read()
Inherit read from regIOobject.
label fieldIndex(const label index) const
Return label index.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool read()
Read object.
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.
const volScalarField & mu
OBJstream os(runTime.globalPath()/outputName)
Forward declarations of fvMatrix specializations.
bool typeGlobal< porosityModel >()
Template function for obtaining global status.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.