45 Foam::dsmcFields::dsmcFields
50 const bool loadFromFiles
58 if (!isA<fvMesh>(obr_))
63 "dsmcFields::dsmcFields" 66 "const objectRegistry&, " 70 ) <<
"No fvMesh available, deactivating " << name_ <<
nl 117 word rhoNMeanName =
"rhoNMean";
118 word rhoMMeanName =
"rhoMMean";
119 word momentumMeanName =
"momentumMean";
120 word linearKEMeanName =
"linearKEMean";
121 word internalEMeanName =
"internalEMean";
122 word iDofMeanName =
"iDofMean";
123 word fDMeanName =
"fDMean";
160 if (
min(
mag(rhoNMean)).value() > VSMALL)
162 Info<<
"Calculating dsmcFields." <<
endl;
164 Info<<
" Calculating UMean field." <<
endl;
170 obr_.time().timeName(),
174 momentumMean/rhoMMean
177 Info<<
" Calculating translationalT field." <<
endl;
183 obr_.time().timeName(),
189 *(linearKEMean - 0.5*rhoMMean*(UMean & UMean))
192 Info<<
" Calculating internalT field." <<
endl;
198 obr_.time().timeName(),
205 Info<<
" Calculating overallT field." <<
endl;
211 obr_.time().timeName(),
216 *(linearKEMean - 0.5*rhoMMean*(UMean &
UMean) + internalEMean)
219 Info<<
" Calculating pressure field." <<
endl;
225 obr_.time().timeName(),
234 forAll(mesh.boundaryMesh(), i)
238 if (isA<wallPolyPatch>(patch))
240 p.boundaryField()[i] =
241 fDMean.boundaryField()[i]
246 Info<<
" mag(UMean) max/min : " 247 <<
max(
mag(UMean)).value() <<
" " 250 Info<<
" translationalT max/min : " 251 <<
max(translationalT).value() <<
" " 252 <<
min(translationalT).value() <<
endl;
254 Info<<
" internalT max/min : " 255 <<
max(internalT).value() <<
" " 256 <<
min(internalT).value() <<
endl;
258 Info<<
" overallT max/min : " 259 <<
max(overallT).value() <<
" " 260 <<
min(overallT).value() <<
endl;
262 Info<<
" p max/min : " 263 <<
max(
p).value() <<
" " 268 translationalT.
write();
281 <<
") found in rhoNMean field. " 282 <<
"Not calculating dsmcFields to avoid division by zero." virtual void read(const dictionary &)
Read the dsmcFields data.
Mesh data needed to do the Finite Volume discretisation.
const vectorField::subField faceAreas() const
Return face normals.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for handling words, derived from string.
virtual void execute()
Execute, currently does nothing.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void write()
Calculate the dsmcFields and write.
A patch is a list of labels that address the faces in the global face list.
virtual bool write() const
Write using setting from DB.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define WarningIn(functionName)
Report a warning using Foam::Warning.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual Ostream & write(const token &)=0
Write next token to stream.
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
virtual void end()
Execute at the final time-loop, currently does nothing.
Registry of regIOobjects.
bool read(const char *, int32_t &)
virtual ~dsmcFields()
Destructor.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
volVectorField UMean(UMeanHeader, mesh)
const dimensionedScalar k
Boltzmann constant.
defineTypeNameAndDebug(combustionModel, 0)