53 void Foam::fv::meanVelocityForce::readCoeffs()
61 void Foam::fv::meanVelocityForce::writeProps
67 if (mesh().time().writeTime())
73 name() +
"Properties",
92 const word& modelType,
100 Ubar_(
vector::uniform(NaN)),
113 if (propsFile.
good())
115 Info<<
" Reading pressure gradient from file" <<
endl;
120 Info<<
" Initial pressure gradient = " << gradP0_ <<
nl <<
endl;
132 Foam::scalar Foam::fv::meanVelocityForce::magUbarAve
140 scalar magUbarAve = 0;
144 magUbarAve += (
normalised(Ubar_) &
U[celli])*cv[celli];
147 magUbarAve /= set_.V();
156 const word& fieldName
163 name() + fieldName +
"Sup",
164 mesh().time().
name(),
173 const scalar
gradP = gradP0_ + dGradP_;
188 mesh().time().
name(),
200 rAPtr_() = 1/eqn.
A();
222 rAUave +=
rAU[celli]*cv[celli];
227 const scalar magUbarAve = this->magUbarAve(
U);
231 dGradP_ = relaxation_*(
mag(Ubar_) - magUbarAve)/rAUave;
240 const scalar
gradP = gradP0_ + dGradP_;
242 Info<<
"Pressure gradient source: uncorrected Ubar = " << magUbarAve
243 <<
", pressure gradient = " <<
gradP <<
endl;
260 set_.topoChange(map);
272 set_.distribute(map);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
bool good() const
Return true if next operation might succeed.
fileName timePath() const
Return current time path.
A List with indirect addressing.
A list of keyword definitions, which are a keyword followed by any number of values (e....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
static const dictionary null
Null dictionary.
Finite volume options abstract base class.
const dictionary & coeffs() const
Return dictionary.
virtual bool read(const dictionary &dict)
Read source dictionary.
const fvMesh & mesh() const
Return const access to the mesh database.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
tmp< volScalarField > A() const
Return the central coefficient.
const dimensionSet & dimensions() const
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Calculates and applies the force necessary to maintain the specified mean velocity.
virtual bool movePoints()
Update for mesh motion.
virtual bool constrain(fvMatrix< vector > &eqn, const word &fieldName) const
Add the momentum source and set the 1/A coefficient.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool read(const dictionary &dict)
Read source dictionary.
meanVelocityForce(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual wordList constrainedFields() const
Return the list of fields constrained by the fvConstraint.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
volScalarField rAU(1.0/UEqn.A())
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
tmp< VolField< Type > > Su(const VolField< Type > &su, const VolField< Type > &vf)
List< word > wordList
A List of words.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
Vector< scalar > vector
A scalar version of the templated Vector.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
const dimensionSet dimVolume
dimensionSet normalised(const dimensionSet &)
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
dimensionedVector gradP("gradP", dimensionSet(0, 1, -2, 0, 0), Zero)
IOdictionary propsDict(systemDict("particleTracksDict", args, runTime))