39 namespace functionObjects
55 Foam::functionObjects::dsmcFields::dsmcFields
71 if (!isA<fvMesh>(obr_))
103 word rhoNMeanName =
"rhoNMean";
104 word rhoMMeanName =
"rhoMMean";
105 word momentumMeanName =
"momentumMean";
106 word linearKEMeanName =
"linearKEMean";
107 word internalEMeanName =
"internalEMean";
108 word iDofMeanName =
"iDofMean";
109 word fDMeanName =
"fDMean";
146 if (
min(
mag(rhoNMean)).value() > VSMALL)
148 Info<<
"Calculating dsmcFields." <<
endl;
150 Info<<
" Calculating UMean field." <<
endl;
156 obr_.time().timeName(),
160 momentumMean/rhoMMean
163 Info<<
" Calculating translationalT field." <<
endl;
169 obr_.time().timeName(),
175 *(linearKEMean - 0.5*rhoMMean*(UMean & UMean))
178 Info<<
" Calculating internalT field." <<
endl;
184 obr_.time().timeName(),
191 Info<<
" Calculating overallT field." <<
endl;
197 obr_.time().timeName(),
202 *(linearKEMean - 0.5*rhoMMean*(UMean &
UMean) + internalEMean)
205 Info<<
" Calculating pressure field." <<
endl;
211 obr_.time().timeName(),
220 volScalarField::Boundary& pBf =
p.boundaryFieldRef();
222 forAll(mesh.boundaryMesh(), i)
226 if (isA<wallPolyPatch>(patch))
229 fDMean.boundaryField()[i]
234 Info<<
" mag(UMean) max/min : " 235 <<
max(
mag(UMean)).value() <<
" " 238 Info<<
" translationalT max/min : " 239 <<
max(translationalT).value() <<
" " 240 <<
min(translationalT).value() <<
endl;
242 Info<<
" internalT max/min : " 243 <<
max(internalT).value() <<
" " 244 <<
min(internalT).value() <<
endl;
246 Info<<
" overallT max/min : " 247 <<
max(overallT).value() <<
" " 248 <<
min(overallT).value() <<
endl;
250 Info<<
" p max/min : " 251 <<
max(
p).value() <<
" " 256 translationalT.
write();
271 <<
") found in rhoNMean field. " 272 <<
"Not calculating dsmcFields to avoid division by zero."
const vectorField::subField faceAreas() const
Return face normals.
#define forAll(list, i)
Loop across all elements in list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
volVectorField UMean(UMeanHeader, mesh)
Abstract base-class for Time/database function objects.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool write()
Calculate and write the DSMC fields.
virtual ~dsmcFields()
Destructor.
Macros for easy insertion into run-time selection tables.
virtual bool execute()
Do nothing.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
bool read(const char *, int32_t &)
A class for handling words, derived from string.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionedScalar k
Boltzmann constant.
Mesh data needed to do the Finite Volume discretisation.
virtual bool write() const
Write using setting from DB.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual Ostream & write(const token &)=0
Write next token to stream.
Registry of regIOobjects.
A patch is a list of labels that address the faces in the global face list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
virtual bool read(const dictionary &)
Read the dsmcFields data.