Go to the documentation of this file.
91 midU +=
U[cellI] * mesh_.
V()[cellI];
93 volume += mesh_.
V()[cellI];
112 midT +=
T[cellI] * mesh_.
V()[cellI];
113 volume += mesh_.
V()[cellI];
117 return (midT/volume);
128 scalar PatchSumTemp(0), area(0);
135 const label curPatch = Patches_[patchI].index();
137 if (isType<wallFvPatch>( Patches_[patchI] ))
156 return PatchSumTemp / counter - 273.15;
167 int main(
int argc,
char *argv[])
176 #include "createMRF.H"
178 #include "initContinuityErrs.H"
184 Info<<
"\nStarting time loop\n" <<
endl;
185 #include "CourantNo.H"
188 Info<<
"Time = " << runTime.timeName() <<
nl <<
endl;
200 for (
label i =0;i<5 ;i++)
220 Info<<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
221 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
244 runTime.setTime(
timeDirs[timeI], timeI);
256 if ((
w.headerOk()==1) )
265 scalar PatchSumTemp(0);
269 const label curPatch = Patches_[patchI].index();
271 if (isType<wallFvPatch>( Patches_[patchI] ))
300 midAoA += AoA[cellI];
319 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);
320 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);
321 scalar p_w(0), p_ws(0.01);
332 if ((cellI%1000) == 1)
370 p_w = ((101325 +
p_rgh[cellI] ) *
w[cellI])/(0.62198 + 0.37802 *
w[cellI]);
379 RH[cellI] = p_w/p_ws*100;
380 PA =
RH[cellI] * 10 *
Foam::exp( 16.6563 - (4030.183 / (
T[cellI] - 273.15 + 235) ));
385 PA =
RH1 * 10 *
Foam::exp( 16.6563 - (4030.183 / (
T[cellI] - 273.15 + 235) ));
410 if (
mag(
U[cellI]) >= 0.05)
412 DR[cellI] = ( 34 - (
T[cellI] - 273.15) ) * (
Foam::pow(
mag(
U[cellI]) - 0.05 ,0.62 ) * ( (0.37 *
mag(
U[cellI]) * Tu) + 3.14) );
416 DR[cellI] = (34 -
T[cellI] - 273.15) *
Foam::pow( 0.05 ,0.6223) * ((0.37 * 0.05 * Tu) + 3.14);
438 { FCL = 1 + 1.29 * ICL; }
440 { FCL = 1.05 + 0.645 * ICL; };
444 TCLA =
T[cellI] + (35.5 - (
T[cellI] - 273.15)) / (3.5 * 6.45 * ( ICL + 0.1));
451 P5 = 308.7 - 0.028 * (
met*58.15 -
wme*58.15) + P2 *
Foam::pow( (STemp + 273.0)/100, 4);
468 if (HCF>HCN) { HC = HCF; }
else { HC = HCN; };
470 XN = (P5 + P4 * HC - P2 *
Foam::pow(XF,4.0) ) / (100 + P3 * HC);
472 if (
N>150) {
break; };
473 }
while (
mag(XN-XF)>EPS);
476 TCL = 100 * XN - 273;
479 HL1 = 3.05 * 0.001 * (5733 - (6.99 * (
met*58.15 -
wme*58.15)) - PA);
483 if ( (
met*58.15 -
wme*58.15) > 58.15) { HL2 = 0.42 * ( (
met*58.15 -
wme*58.15) - 58.15); }
488 HL3 = 1.7 * 0.00001 *
met * 58.15 * (5867 - PA);
492 HL4 = 0.0014 *
met * 58.15 * (34 - (
T[cellI] - 273.15) );
503 HL6 = FCL * HC * (TCL - (
T[cellI] - 273.15));
514 PMV[cellI] = TS * ((
met*58.15 -
wme*58.15) - HL1 - HL2 - HL3 - HL4 - HL5 - HL6);
520 scalar new_lamda=0.24;
529 APMV[cellI] =
PMV[cellI]/(1+new_lamda*
PMV[cellI]);
532 if (
mag(
U[cellI])<0.2) { a_korr=0.5; };
533 if ( (
mag(
U[cellI])>=0.2) || (
mag(
U[cellI])<=0.6) ) { a_korr=0.6; };
534 if (
mag(
U[cellI])>0.6) { a_korr=0.7; };
537 TOp[cellI] = a_korr *
T[cellI] + (1 - a_korr) * (STemp+273.15);
540 midPMV +=
PMV[cellI];
541 midPPD +=
PPD[cellI];
542 midAPMV +=
APMV[cellI];
546 volume +=
mesh.
V()[cellI];
581 if ( ((midPMV/cellsum > -0.2) || (midPMV/cellsum < 0.2)) && (midDR/cellsum < 10) && (midPPD/cellsum < 6))
586 if ( ((midPMV/cellsum > -0.5) || (midPMV/cellsum < 0.5)) && (midDR/cellsum < 20) && (midPPD/cellsum < 10))
591 if ( ((midPMV/cellsum > -0.7) || (midPMV/cellsum < 0.7)) && (midDR/cellsum < 30) && (midPPD/cellsum < 15))
int main(int argc, char *argv[])
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))
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
#define forAll(list, i)
Loop across all elements in list.
const cellList & cells() const
IOobject AoAHeader("AoA", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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)
Dimension set for the base types.
Foam::scalar radiationTemperature(const Foam::fvMesh &mesh_, const Foam::fvPatchList &Patches_)
dimensioned< scalar > mag(const dimensioned< Type > &)
const scalar wme(readScalar(comfortFoamDict.lookup("wme")))
Simple relative velocity model.
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
bool headerOk()
Read and check header info.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
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))
autoPtr< compressible::turbulenceModel > turbulence
const scalar RH1(readScalar(comfortFoamDict.lookup("RH")))
IOobject THeader("T", runTime.timeName(), mesh, IOobject::MUST_READ)
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
volScalarField Qr(IOobject("Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Foam::scalar Taverage(const Foam::fvMesh &mesh_)
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")))
Foam::vector Uaverage(const Foam::fvMesh &mesh_)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
static instantList timeDirs
singlePhaseTransportModel laminarTransport(U, phi)
const dictionary & simple
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)
A special matrix type and solver, designed for finite volume solutions of scalar equations....
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))
virtual void correct()
Correct the laminar viscosity.
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)
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)