48 void Foam::fv::verticalDamping::add
51 fvMatrix<vector>& eqn,
60 const DimensionedField<scalar, volMesh>& V = mesh_.V();
64 - V.dimensions()*(lgg.dimensions() & alphaRhoU.dimensions());
70 const label c = cells_[i];
71 force[i] = V[
c]*(lgg.value() & alphaRhoU[
c]);
76 const label c = cells_[i];
77 eqn.source()[
c] += force[i];
87 const word& modelType,
107 add(eqn.
psi(), eqn, fieldi);
118 add(rho*eqn.
psi(), eqn, fieldi);
130 add(alpha*rho*eqn.
psi(), eqn, fieldi);
142 lambda_.dimensions(),
143 coeffs_.lookup(lambda_.name())
146 fieldNames_ =
wordList(1, coeffs_.lookupOrDefault<
word>(
"U",
"U"));
148 applied_.setSize(1,
false);
defineTypeNameAndDebug(option, 0)
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Source term to momentum equation.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
UniformDimensionedField< vector > uniformDimensionedVectorField
A list of keyword definitions, which are a keyword followed by any number of values (e...
const GeometricField< Type, fvPatchField, volMesh > & psi() const
dimensionedSymmTensor sqr(const dimensionedVector &dv)
addToRunTimeSelectionTable(option, fixedTemperatureConstraint, dictionary)
virtual bool read(const dictionary &dict)
Read source dictionary.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Macros for easy insertion into run-time selection tables.
bool read(const char *, int32_t &)
A class for handling words, derived from string.
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.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
virtual bool read(const dictionary &dict)
Read dictionary.
List< word > wordList
A List of words.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
verticalDamping(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
const dimensionedScalar c
Speed of light in a vacuum.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Cell-set options abtract base class. Provides a base set of controls, e.g.: