Go to the documentation of this file.
76 midU +=
U[cellI] * mesh_.
V()[cellI];
78 volume += mesh_.
V()[cellI];
82 Info<<
"Average velocity = "<<
mag(midU/volume) <<
" m/s" <<
nl;
98 midT +=
T[cellI] * mesh_.
V()[cellI];
99 volume += mesh_.
V()[cellI];
103 Info<<
"Average Temperature = "<< (midT/volume)-273.15 <<
" °C" <<
nl;
105 return (midT/volume);
116 scalar PatchSumTemp(0), area(0);
123 const label curPatch = Patches_[patchI].index();
126 if (isType<wallFvPatch>( Patches_[patchI] ))
146 return PatchSumTemp / counter - 273.15;
149 int main(
int argc,
char *argv[])
171 runTime.setTime(
timeDirs[timeI], timeI);
173 Info<<
"Time = " << runTime.timeName() <<
endl;
183 if ((
w.headerOk()==1) )
192 scalar PatchSumTemp(0);
196 const label curPatch = Patches_[patchI].index();
198 if (isType<wallFvPatch>( Patches_[patchI] ))
208 Info<<
"Sum of all heat flows: "<< PatchSumTemp-273.15 <<
" oC" <<
endl;
213 Info <<
"function for Average Radiation Temperature: " << STemp <<
" oC" <<
endl;
225 midAoA += AoA[cellI];
231 Info <<
"Average age of air " << (midAoA/cellsum) <<
" s" <<
endl;
246 scalar P1(0), P2(0), P3(0), P4(0), P5(0), XN(0), XF(0), HCN(0), HCF(0), HC(0), PA(0), FCL(0), EPS(0), ICL(0);
247 scalar Tu(0), HL1(0), HL2(0), HL3(0), HL4(0), HL5(0), HL6(0), TCL(0), TS(0), TCLA(0), midPMV(0), midPPD(0),midAPMV(0), midDR(0), midTO(0), midRH(0);
248 scalar p_w(0), p_ws(0.01);
280 p_w = ((101325 +
p_rgh[cellI] ) *
w[cellI])/(0.62198 + 0.37802 *
w[cellI]);
289 RH[cellI] = p_w/p_ws*100;
290 PA =
RH[cellI] * 10 *
Foam::exp( 16.6563 - (4030.183 / (
T[cellI] - 273.15 + 235) ));
293 PA =
RH1 * 10 *
Foam::exp( 16.6563 - (4030.183 / (
T[cellI] - 273.15 + 235) ));
317 if (
mag(
U[cellI]) >= 0.05)
319 DR[cellI] = ( 34 - (
T[cellI] - 273.15) ) * (
Foam::pow(
mag(
U[cellI]) - 0.05 ,0.62 ) * ( (0.37 *
mag(
U[cellI]) * Tu) + 3.14) );
323 DR[cellI] = (34 -
T[cellI] - 273.15) *
Foam::pow( 0.05 ,0.6223) * ((0.37 * 0.05 * Tu) + 3.14);
339 { FCL = 1 + 1.29 * ICL; }
341 { FCL = 1.05 + 0.645 * ICL; };
345 TCLA =
T[cellI] + (35.5 - (
T[cellI] - 273.15)) / (3.5 * 6.45 * ( ICL + 0.1));
352 P5 = 308.7 - 0.028 * (
met*58.15 -
wme*58.15) + P2 *
Foam::pow( (STemp + 273.0)/100, 4);
369 if (HCF>HCN) { HC = HCF; }
else { HC = HCN; };
370 XN = (P5 + P4 * HC - P2 *
Foam::pow(XF,4.0) ) / (100 + P3 * HC);
371 if (
N>150) {
break; };
372 }
while (
mag(XN-XF)>EPS);
375 TCL = 100 * XN - 273;
376 HL1 = 3.05 * 0.001 * (5733 - (6.99 * (
met*58.15 -
wme*58.15)) - PA);
377 if ( (
met*58.15 -
wme*58.15) > 58.15) { HL2 = 0.42 * ( (
met*58.15 -
wme*58.15) - 58.15); }
379 HL3 = 1.7 * 0.00001 *
met * 58.15 * (5867 - PA);
380 HL4 = 0.0014 *
met * 58.15 * (34 - (
T[cellI] - 273.15) );
382 HL6 = FCL * HC * (TCL - (
T[cellI] - 273.15));
386 PMV[cellI] = TS * ( (
met*58.15 -
wme*58.15) - HL1 - HL2 - HL3 - HL4 - HL5 - HL6 );
411 scalar new_lamda=0.24;
420 APMV[cellI] =
PMV[cellI]/(1+new_lamda*
PMV[cellI]);
422 if (
mag(
U[cellI])<0.2) { a_korr=0.5; };
423 if ( (
mag(
U[cellI])>=0.2) || (
mag(
U[cellI])<=0.6) ) { a_korr=0.6; };
424 if (
mag(
U[cellI])>0.6) { a_korr=0.7; };
426 TOp[cellI] = a_korr *
T[cellI] + (1 - a_korr) * (STemp+273.15);
428 midPMV +=
PMV[cellI];
429 midPPD +=
PPD[cellI];
430 midAPMV +=
APMV[cellI];
434 volume +=
mesh.
V()[cellI];
447 Info<<
"Mean Radiation temperature "<< STemp <<
" °C" <<
endl;
448 Info<<
"Water vapour pressure "<< PA <<
" Pa" <<
nl;
449 Info <<
"Average PMV-Value = " << (midPMV/cellsum) <<
nl;
450 Info <<
"Average PPD-Value = " << (midPPD/cellsum) <<
" %" <<
nl;
451 Info <<
"Average APMV-Value = " << (midAPMV/cellsum) <<
" %" <<
nl;
452 Info <<
"Average DR-Value = " << (midDR/cellsum) <<
" %" <<
nl;
453 Info<<
"Average air velocity = "<<
mag(wl) <<
" m/s" <<
nl;
454 Info<<
"Average room temperature = "<<
mag(Tr)-273.15 <<
" °C" <<
nl;
455 Info<<
"Average relative room humidity = "<<
mag(midRH/cellsum) <<
" %" <<
nl;
456 Info <<
"Average operative temperature = " << (midTO/cellsum)-273.15 <<
" °C" <<
endl;
458 if ( ((midPMV/cellsum > -0.2) || (midPMV/cellsum < 0.2)) && (midDR/cellsum < 10) && (midPPD/cellsum < 6))
460 Info <<
"Analysis: Category A" <<
endl;
462 if ( ((midPMV/cellsum > -0.5) || (midPMV/cellsum < 0.5)) && (midDR/cellsum < 20) && (midPPD/cellsum < 10))
464 Info <<
"Analysis: Category B" <<
endl;
466 if ( ((midPMV/cellsum > -0.7) || (midPMV/cellsum < 0.7)) && (midDR/cellsum < 30) && (midPPD/cellsum < 15))
468 Info <<
"Analysis: Category C" <<
endl;
471 Info <<
"Analysis: Category D" <<
endl;
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
volScalarField PMV(IOobject("PMV", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("PMV", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
#define forAll(list, i)
Loop across all elements in list.
Foam::vector Uaverage(const Foam::fvMesh &mesh_)
const cellList & cells() const
IOobject AoAHeader("AoA", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE)
int main(int argc, char *argv[])
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
Type gSum(const FieldField< Field, Type > &f)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
const scalar wme(readScalar(comfortFoamDict.lookup("wme")))
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
bool headerOk()
Read and check header info.
volScalarField APMV(IOobject("APMV", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("APMV", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
IOobject UHeader("U", runTime.timeName(), mesh, IOobject::MUST_READ)
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
volScalarField RH(IOobject("RH", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("RH", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
const scalar RH1(readScalar(comfortFoamDict.lookup("RH")))
Foam::scalar Taverage(const Foam::fvMesh &mesh_)
IOobject THeader("T", runTime.timeName(), mesh, IOobject::MUST_READ)
Foam::scalar radiationTemperature(const Foam::fvMesh &mesh_, const Foam::fvPatchList &Patches_)
volScalarField Qr(IOobject("Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0))
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
IOobject p_rghHeader("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const scalar Troom(readScalar(comfortFoamDict.lookup("Troom")))
dimensionedScalar log(const dimensionedScalar &ds)
const scalar met(readScalar(comfortFoamDict.lookup("met")))
Mesh data needed to do the Finite Volume discretisation.
const scalar clo(readScalar(comfortFoamDict.lookup("clo")))
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
static instantList timeDirs
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
volScalarField TOp(IOobject("TOp", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("TOp", dimensionSet(0, 0, 0, 1, 0, 0, 0), 0.0))
volScalarField DR(IOobject("DR", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("DR", dimensionSet(0, 1,-1, 0, 0, 0, 0), 0.0))
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
Generic GeometricField class.
Foam::argList args(argc, argv)
const scalar sumZuluft(readScalar(comfortFoamDict.lookup("Zuluft")))
volScalarField PPD(IOobject("PPD", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("PPD", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
IOobject QrHeader("Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE)