indoorFoam.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7  -------------------------------------------------------------------------------
8  License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24  Application
25  simpleFoam
26 
27  Group
28  grpIncompressibleSolvers
29 
30  Description
31  Steady-state solver for incompressible flows with turbulence modelling.
32 
33  \heading Solver details
34  The solver uses the SIMPLE algorithm to solve the continuity equation:
35 
36  \f[
37  \div \vec{U} = 0
38  \f]
39 
40  and momentum equation:
41 
42  \f[
43  \div \left( \vec{U} \vec{U} \right) - \div \gvec{R}
44  = - \grad p + \vec{S}_U
45  \f]
46 
47 Where:
48 \vartable
49 \vec{U} | Velocity
50 p | Pressure
51 \vec{R} | Stress tensor
52 \vec{S}_U | Momentum source
53 \endvartable
54 
55 \heading Required fields
56 \plaintable
57 U | Velocity [m/s]
58 p | Kinematic pressure, p/rho [m2/s2]
59 <turbulence fields> | As required by user selection
60 \endplaintable
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #include "fvCFD.H"
67 #include "simpleControl.H"
68 #include "fvOptions.H"
69 
71 #include "wallFvPatch.H"
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
74 
75 
76 
77 
78 //计算平均风速
80 {
81  //获取体向量U
82  const volVectorField& U = mesh_.lookupObject<volVectorField>("U");
83  vector midU(0,0,0);
84  scalar cellsum(0);
85  scalar volume(0);
86 
87  //所有网格loop
88  forAll (mesh_.cells(), cellI)
89  {
90  //sum 累加所有单个cell的速度*体积
91  midU += U[cellI] * mesh_.V()[cellI];
92  //累加每个cel的体积
93  volume += mesh_.V()[cellI];
94  };
95 
96  //将累加速度/累加体积,然后取标量获取大小值,获取速度大小.也就是使用提平均来计算风速平均值
97  // Info<< "Average velocity = "<< mag(midU/volume) << " m/s" << nl;
98  //但是这里返回的居然还是平均风速的三个矢量
99  return midU/(volume);
100 }
101 
102 //计算平均温度
103 Foam::scalar Taverage(const Foam::fvMesh& mesh_)
104 {
105  const volScalarField& T = mesh_.lookupObject<volScalarField>("T");
106  scalar midT(0);
107  scalar cellsum(0);
108  scalar volume(0);
109 
110  forAll (mesh_.cells(), cellI)
111  {
112  midT += T[cellI] * mesh_.V()[cellI];
113  volume += mesh_.V()[cellI];
114  };
115  // Info<< "Average Temperature = "<< (midT/volume)-273.15 << " °C" << nl;
116 
117  return (midT/volume);
118 }
119 
120 Foam::scalar radiationTemperature(const Foam::fvMesh& mesh_, const Foam::fvPatchList& Patches_)
121 {
122  // Berechnet die Strahlungstemperatur der Umgebung
123  // radiationTemperatur = Sum(Mittlere Wandoberflächentemperaturen / Anzahl Flächen)
124  // Rückgabe: Temperatur in Kelvin
125  //获取环境温度,是个标量
126  const volScalarField& T = mesh_.lookupObject<volScalarField>("T");
127  // 边界温度累计值,面积值
128  scalar PatchSumTemp(0), area(0);
129  //计数器
130  int counter = 0;
131  //循环所有的边界,每一个小的patch
132  forAll (Patches_, patchI)
133  {
134  //当前patch的索引,是个整型数
135  const label curPatch = Patches_[patchI].index();
136  //如果类型是wall的patch
137  if (isType<wallFvPatch>( Patches_[patchI] ))
138  {
139  //mesh_.magSf() 返回一个面face的面积标量大小
140  //boundaryField()
141  area = gSum(mesh_.magSf().boundaryField()[curPatch]);
142  //如果面积不等于0
143  if (area != 0)
144  {
145  PatchSumTemp +=
146  gSum
147  (
148  mesh_.magSf().boundaryField()[curPatch]
149  * T.boundaryField()[curPatch]
150  ) / area;
151 
152  counter++;
153  }
154  }
155  }
156  return PatchSumTemp / counter - 273.15;
157 }
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 int main(int argc, char *argv[])
168 {
169 #include "setRootCase.H"
170 #include "createTime.H"
171 #include "createMesh.H"
172 
174 
175 #include "createFields.H"
176 #include "createMRF.H"
177 #include "createFvOptions.H"
178 #include "initContinuityErrs.H"
179 
180  turbulence->validate();
181 
182  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184  Info<< "\nStarting time loop\n" << endl;
185 #include "CourantNo.H"
186  while (simple.loop())
187  {
188  Info<< "Time = " << runTime.timeName() << nl << endl;
189 
190  // --- Pressure-velocity SIMPLE corrector
191  {
192 
193 #include "UEqn.H"
194 #include "pEqn.H"
195 #include "TEqn.H"
196 
197  // Copy - no reference
198  const volScalarField nuEff = turbulence->nuEff();
199  // while (simple.correctNonOrthogonal())
200  for (label i =0;i<5 ;i++)
201  {
202  fvScalarMatrix airAgeEqn
203  (
204  // fvm::ddt(airAge)
205  //+ fvm::div(phi, airAge)
206  fvm::div(phi, airAge)
207  - fvm::laplacian(nuEff, airAge)
208  ==
209  dimensionedScalar("ageSource", airAge.dimensions()*dimensionSet(0,0,-1,0,0), 1) // fvOptions(AoA)
210  );
211 
212  airAgeEqn.relax();
213  airAgeEqn.solve();
214  }
215  }
217  turbulence->correct();
218  runTime.write();
219 
220  Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
221  << " ClockTime = " << runTime.elapsedClockTime() << " s"
222  << nl << endl;
223  }
224  // Info<< "End\n" << endl;
225 
226 
227  //如果需要计算室内热舒适性
228  // Info << "need PMV or not?" << solveComfort << endl;
229  if (solveComfort)
230  {
231  // Get times list
232  instantList Times = runTime.times();
233 
234  // set startTime and endTime depending on -time and -latestTime options
235 # include "checkTimeOptions.H"
236 
237  runTime.setTime(Times[startTime], startTime);
239 
240 # include "createMesh.H"
241 
242  forAll(timeDirs, timeI) //每一个时间步里面都要计算舒适性数值
243  {
244  runTime.setTime(timeDirs[timeI], timeI);
245 
246  // Info<< "Time = " << runTime.timeName() << endl;
247 
248 #include "createFieldsForPMV.H"
249 
250  // 室内最高操作温度
252  const fvPatchList& Patches = T.mesh().boundary();
253 
254  scalar STemp(20);
255 
256  if ((w.headerOk()==1) ) //如果有w,相对湿度开关就打开
257  {
258  RHswitch = true;
259  }
260 
261  if (QrHeader.headerOk()==1 ) //如果有Qr,就算所有的热流
262  {
264  const fvPatchList& Patches_ = Qr.mesh().boundary();
265  scalar PatchSumTemp(0);
266 
267  forAll (Patches_, patchI)
268  {
269  const label curPatch = Patches_[patchI].index();
270 
271  if (isType<wallFvPatch>( Patches_[patchI] ))
272  {
273  PatchSumTemp +=
274  gSum
275  (
276  mesh.magSf().boundaryField()[curPatch]
277  * Qr.boundaryField()[curPatch]
278  );
279  }
280  }
281  // Info<< "Sum of all heat flows: "<< PatchSumTemp-273.15 << " oC" << endl;
282  }
283  else
284  {
285  STemp = radiationTemperature(mesh, Patches);
286  // Info << "Average Radiation Temperature: " << STemp << " oC" << endl;
287  };
288 
289 
290  //计算空气龄的平均值和最大值
291  if (AoAHeader.headerOk()==1 ) //如果有空气龄,就计算平均空气龄和最大空气龄
292  {
293 
295  scalar cellsum(0);//网格单元计数器
296  scalar midAoA(0);//空气龄取和
297 
298  forAll (mesh.cells(), cellI)
299  {
300  midAoA += AoA[cellI];
301  cellsum++;
302  };
303 
304  scalar maxValue = max(AoA).value(); //取最大值
305  // Info << "Average age of air " << (midAoA/cellsum) << " s" << endl;
306  // Info << "Maximum age of air " << maxValue << " s" << endl;
307  // 通风效率 AE = (Tn/2TM) x 100 %
308  // Info << "Room volume " << gSum( mesh.V() ) << " m3" << endl;
309  // Info << "Ventilation efficiency AE = " << ( gSum( mesh.V() ) / sumZuluft ) / (2 * ( maxValue / 3600) ) << " %" << endl;
310  };
311 
312  volVectorField U(UHeader,mesh); //速度场
313  vector wl = Uaverage(mesh); //平均速度场
314  scalar Tr = Taverage(mesh); //平均温度场
315  // volScalarField p_rgh(p_rghHeader,mesh); //读取参考压力场
316 
317  //初始化所有变量
318  scalar cellsum(0);
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);
322 
323  scalar volume(0);
324 
325  int N;
326  double a_korr; // Korrekturfaktor a nach DIN EN 7730;
327 
328  // FANGER - Gleichungen (PMV)
329 
330  forAll (mesh.cells(), cellI)
331  {
332  if ((cellI%1000) == 1)
333  {
334 // Info << "current cell Velocity is : " << nl;
335 // Info <<"x " << U[cellI].x() << nl;
336 // Info <<"y " << U[cellI].y() << nl;
337 // Info <<"x " << U[cellI].z() << nl;
338 //
339 //
340 // Info << "current cell Temperature is : " << nl;
341 // Info <<"T " << T[cellI] << nl;
342 //
343 //
344 // Info << "current cell pressure is : " << nl;
345 // Info <<"p " << p[cellI] << nl;
346  }
347 
348  // Zum Testen
349  /*
350  STemp= 21;
351  Tr = 23.0+273.15;
352  T[cellI] = Tr;
353  U[cellI].x() = 0.3;
354  U[cellI].y() = 0;
355  U[cellI].z() = 0;
356  */
357 
358  //给温度取上下限
359  if (T[cellI] < 0)
360  T[cellI] = 273;
361 
362  if (T[cellI] > 350)
363  T[cellI] = 350;
364 
365 
366  //打开湿度开关
367  if (RHswitch) //如果有含湿量,就根据含湿量计算水蒸气分压力
368  {
369  // Berechne die Raumluftfeuchte
370  p_w = ((101325 + p_rgh[cellI] ) * w[cellI])/(0.62198 + 0.37802 * w[cellI]); //单位体积空气,水蒸气的分压力,含湿量,w为含湿量,
371 
372  p_ws = Foam::exp(-0.58002206*Foam::pow(10.0,4)*Foam::pow(T[cellI],-1)
373  +0.13914993*10
374  -0.48640239*Foam::pow(10.0,-1)*T[cellI]
375  +0.41764768*Foam::pow(10.0,-4)*Foam::pow(T[cellI],2)
376  -0.14452093*Foam::pow(10.0,-7)*Foam::pow(T[cellI],3)
377  +0.65459673*10*Foam::log(T[cellI]) ); //某一温度下,湿空气饱和水蒸气分压力
378 
379  RH[cellI] = p_w/p_ws*100; //相对湿度 RH是计算出来
380  PA = RH[cellI] * 10 * Foam::exp( 16.6563 - (4030.183 / (T[cellI] - 273.15 + 235) )); // water vapour pressure, Pa 水蒸气分压力 ,通常使用这个计算.PA 在后面计算潜热有需要
381  midRH += RH[cellI];
382  }
383  else//如果没有,就根据提供的相对湿度的常数计算水蒸气分压力
384  {
385  PA = RH1 * 10 * Foam::exp( 16.6563 - (4030.183 / (T[cellI] - 273.15 + 235) )); // water vapour pressure, Pa 水蒸气分压力 //RH1 这个实在特殊情况下的一种计算
386  //进行累加,这个累加暂时没用
387  midRH += RH1;//相对湿度的所有网格的累计,暂时没用
388  }
389 
390  //接下来是计算DR的,计算风险等级
391  // Berechne den Turbulenzgrad %
392  // Tu = Wurzel ( 1/3 * (Ux'² + Uy'² + Uz'²) ) / Mittelwert U
393  if ( mag(wl) >0 )
394  {
395  Tu = (Foam::sqrt(scalar(1)/scalar(3) * (
396  Foam::pow( U[cellI].x() ,2) +
397  Foam::pow( U[cellI].y() ,2) +
398  Foam::pow( U[cellI].z() ,2)
399  )) / mag(wl)) * 100;
400  // ToDo!!!!
401  Tu = 40;
402  }
403  else
404  {
405  Tu = 0;
406  };
407 
408  // Berechne DR-Wert
409  // bei wl<0,05 m/s ist wl=0,05 m/s einzusetzen!
410  if (mag(U[cellI]) >= 0.05)
411  {
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) );
413  }
414  else
415  {
416  DR[cellI] = (34 - T[cellI] - 273.15) * Foam::pow( 0.05 ,0.6223) * ((0.37 * 0.05 * Tu) + 3.14);
417  };
418  if (DR[cellI] > 100)
419  {
420  DR[cellI] = 100;
421  };
422  if (DR[cellI] < 0)
423  {
424  DR[cellI] = 0;
425  };
426  //========================================风险等级计算结束===========================================
427 
428 
429 
430 
431 
432 
433 
434  //接下来为了计算XN,为TCL服装表面温度的计算做准备
435  ICL = 0.155 * clo; //ICL 服装热阻, clo 服装系数
436 
437  if (ICL < 0.078) // ok
438  { FCL = 1 + 1.29 * ICL; } // ok
439  else
440  { FCL = 1.05 + 0.645 * ICL; }; //FCL: clothing area factor 穿衣表面积比
441 
442  HCF = 12.1 * Foam::sqrt(mag( U[cellI] )); // heat transf. coeff. by forced convection 强迫对流换热系数
443 
444  TCLA = T[cellI] + (35.5 - (T[cellI] - 273.15)) / (3.5 * 6.45 * ( ICL + 0.1));//服装外表面平均空气温度
445  XN = TCLA / 100; // ok
446 
447  P1 = ICL * FCL; // ok
448  P2 = P1 * 3.96; // ok
449  P3 = P1 * 100; // ok
450  P4 = P1 * T[cellI]; // ok
451  P5 = 308.7 - 0.028 * (met*58.15 - wme*58.15) + P2 * Foam::pow( (STemp + 273.0)/100, 4);
452 
453  // geändert Tian 06.10.2012
454  // XF = XN;
455  XF = TCLA / 50;
456  EPS = 0.0015;
457 
458  N=0;// 迭代计数器
459 
460  //迭代求解服装表面温度
461  do
462  {
463  N++;
464  XF = (XF + XN)/2; // stop criteria by iteration //迭代收敛法则
465  HCF = 12.1 * Foam::sqrt(mag( U[cellI] ));
466  HCN = 2.38 * Foam::pow( mag( 100 * XF - T[cellI] ), 0.25); // heat transf. coeff. by natural convection; //自然对流换热系数
467  //两个换热系数中取较大的值作为计算适用的换热系数
468  if (HCF>HCN) { HC = HCF; } else { HC = HCN; }; // ok
469 
470  XN = (P5 + P4 * HC - P2 * Foam::pow(XF,4.0) ) / (100 + P3 * HC);
471  //防止迭代次数过多,通常150次也足够了,超过150以后就立马停止
472  if (N>150) { break; };
473  } while (mag(XN-XF)>EPS);
474 
475  //在XN这个系数计算出来后,就能计算出TCL的值了(衣服表面温度)
476  TCL = 100 * XN - 273; // surface temperature of clothing
477 
478  //热流1
479  HL1 = 3.05 * 0.001 * (5733 - (6.99 * (met*58.15 - wme*58.15)) - PA); // 通过皮肤产生的热损失
480 
481  // Info <<"HL1="<< HL1 << endl;
482  //热流2
483  if ( (met*58.15 - wme*58.15) > 58.15) { HL2 = 0.42 * ( (met*58.15 - wme*58.15) - 58.15); }
484  else { HL2 = 0; }; // 出汗造成的热损失 heat loss by sweating (comfort)
485 
486  // Info <<"HL2="<< HL2 << endl;
487  //热量3
488  HL3 = 1.7 * 0.00001 * met * 58.15 * (5867 - PA); //呼吸造成的潜热损失 latent respiration heat loss
489 
490  // Info <<"HL3-"<< HL3 << endl;
491  //热量4
492  HL4 = 0.0014 * met * 58.15 * (34 - (T[cellI] - 273.15) ); // 呼吸造成的显热损失 dry respiration heat loss
493 
494  // Info <<"HL4="<< HL4 << endl;
495  //热量5
497  //HL5 = 3.96 * FCL * (Foam::pow(XN,4) - Foam::pow( ((STemp + 273.0)/100),4)) ; //热辐射造成的热损失 heat lose by radiation
499  HL5 = 3.96 * FCL * (Foam::pow(XN,4) - Foam::pow( ((T[cellI])/100),4)) ; //热辐射造成的热损失 heat lose by radiation
500 
501  // Info <<"HL5="<< HL5 << endl;
502  //热量6
503  HL6 = FCL * HC * (TCL - (T[cellI] - 273.15)); // heat lose by convection 对流散热造成的损失
504 
505  // Info <<"HL6="<< HL6 << endl;
506 
507  //PMV公式中的系数Ts
508  TS = 0.303 * Foam::exp(-0.036 * met * 58.15) + 0.028; //热感传递系数 thermal sensation trans coeff
509 
510  // Info <<"TS=" << TS <<endl;
511  //计算PMV 值: (新陈代谢 - 做功) ,
512  //皮肤热损失,出汗热损失,呼吸的潜热和显热的损失,热辐射的热损失,对流散热的热损失
513  //
514  PMV[cellI] = TS * ((met*58.15 - wme*58.15) - HL1 - HL2 - HL3 - HL4 - HL5 - HL6);
515 
516  //计算PPD 值
517  PPD[cellI] = 100 - 95 * Foam::exp( -0.03353*pow(PMV[cellI],4) - 0.2179 * pow(PMV[cellI],2) );
518 
519  //开始计算APMV
520  scalar new_lamda=0.24;
521  if (PMV[cellI]>= 0)
522  {
523  new_lamda=0.24;
524  }
525  else
526  {
527  new_lamda=-0.5;
528  }
529  APMV[cellI] =PMV[cellI]/(1+new_lamda*PMV[cellI]);
530 
531  //开始计算操作温度
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; };
535  // 计算室内操作温度
536  // a_korr 室内操作温度的矫正系数
537  TOp[cellI] = a_korr * T[cellI] + (1 - a_korr) * (STemp+273.15);
538 
539  //开始计算累计值
540  midPMV += PMV[cellI];
541  midPPD += PPD[cellI];
542  midAPMV += APMV[cellI];
543  midDR += DR[cellI];
544  midTO += TOp[cellI];
545 
546  volume += mesh.V()[cellI];
547  cellsum++;
548 
549 //输出一个具体的数值供参考
550  if (cellI == 1000)
551  {
552  // Info << "current cell PMV is : " << nl;
553  // Info <<"PMV " << PMV[cellI] << nl;
554 
555 
556  // Info << "current cell PPD is : " << nl;
557  // Info <<"PPD " << PPD[cellI] << nl;
558  }
559 
560  };
561 
562  // DR.write();
563  PMV.write();
564  PPD.write();
565  // APMV.write();
566  // TOp.write();
567  // RH.write();
568 
569  // Info<< "Mean Radiation temperature "<< STemp << " °C" << endl;
570  // Info<< "Water vapour pressure "<< PA << " Pa" <<nl;
571  // Info << "Average PMV-Value = " << (midPMV/cellsum) << nl;
572  // Info << "Average PPD-Value = " << (midPPD/cellsum) << " %" << nl;
573  // Info << "Average APMV-Value = " << (midAPMV/cellsum) << " %" << nl;
574  // Info << "Average DR-Value = " << (midDR/cellsum) << " %" << nl;
575  // Info<< "Average air velocity = "<< mag(wl) << " m/s" << nl;
576  // Info<< "Average room temperature = "<< mag(Tr)-273.15 << " °C" << nl;
577  // Info<< "Average relative room humidity = "<< mag(midRH/cellsum) << " %" << nl;
578  // Info << "Average operative temperature = " << (midTO/cellsum)-273.15 << " °C" << endl;
579 
580  //计算结果属于什么范围
581  if ( ((midPMV/cellsum > -0.2) || (midPMV/cellsum < 0.2)) && (midDR/cellsum < 10) && (midPPD/cellsum < 6))
582  {
583  // Info << "Analysis: Category A" << endl;
584  }
585  else {
586  if ( ((midPMV/cellsum > -0.5) || (midPMV/cellsum < 0.5)) && (midDR/cellsum < 20) && (midPPD/cellsum < 10))
587  {
588  // Info << "Analysis: Category B" << endl;
589  }
590  else {
591  if ( ((midPMV/cellsum > -0.7) || (midPMV/cellsum < 0.7)) && (midDR/cellsum < 30) && (midPPD/cellsum < 15))
592  {
593  // Info << "Analysis: Category C" << endl;
594  }
595  else
596  {
597  // Info << "Analysis: Category D" << endl;
598  }
599  }
600  };
601 
602  // Info<< "Average Ux = "<< midUx / cellsum << endl;
603  // Info<< "Average Uy = "<< midUy / cellsum << endl;
604  // Info<< "Average Uz = "<< midUz / cellsum << endl;
605  }
606  Info<< "\nEnd\n" << endl;
607  }
608 
609  return 0;
610 }
611 
612 
613 // ************************************************************************* //
main
int main(int argc, char *argv[])
Definition: indoorFoam.C:195
w
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))
PMV
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))
fvOptions.H
RHswitch
bool RHswitch
Definition: createFields.H:177
Foam::simpleControl
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
Definition: simpleControl.H:46
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
singlePhaseTransportModel.H
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
turbulentTransportModel.H
Foam::primitiveMesh::cells
const cellList & cells() const
Definition: primitiveMeshCells.C:136
AoAHeader
IOobject AoAHeader("AoA", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE)
wallFvPatch.H
Foam::fvc::div
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
Foam::GeometricField::boundaryField
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Definition: GeometricField.C:735
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
Foam::gSum
Type gSum(const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:564
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:252
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:116
radiationTemperature
Foam::scalar radiationTemperature(const Foam::fvMesh &mesh_, const Foam::fvPatchList &Patches_)
Definition: indoorFoam.C:148
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
wme
const scalar wme(readScalar(comfortFoamDict.lookup("wme")))
simple
Simple relative velocity model.
U
U
Definition: pEqn.H:46
Foam::fvMesh::magSf
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
Definition: fvMeshGeometry.C:358
createFvOptions.H
Foam::IOobject::headerOk
bool headerOk()
Read and check header info.
Definition: IOobject.C:439
Foam::fvc::laplacian
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
Foam::fvMatrix::solve
SolverPerformance< Type > solve(const dictionary &)
Solve segregated or coupled returning the solution statistics.
createFieldsForPMV.H
APMV
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))
UHeader
IOobject UHeader("U", runTime.timeName(), mesh, IOobject::MUST_READ)
Foam::fvMesh::V
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Definition: fvMeshGeometry.C:199
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
RH
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))
turbulence
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
RH1
const scalar RH1(readScalar(comfortFoamDict.lookup("RH")))
THeader
IOobject THeader("T", runTime.timeName(), mesh, IOobject::MUST_READ)
Foam::fvMatrix::relax
void relax(const scalar alpha)
Relax matrix (for steady-state solution).
Definition: fvMatrix.C:519
pEqn.H
Qr
volScalarField Qr(IOobject("Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0))
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
simpleControl.H
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:73
Taverage
Foam::scalar Taverage(const Foam::fvMesh &mesh_)
Definition: indoorFoam.C:131
Foam::log
dimensionedScalar log(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:253
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
met
const scalar met(readScalar(comfortFoamDict.lookup("met")))
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
TEqn.H
checkTimeOptions.H
clo
const scalar clo(readScalar(comfortFoamDict.lookup("clo")))
Uaverage
Foam::vector Uaverage(const Foam::fvMesh &mesh_)
Definition: indoorFoam.C:107
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
setRootCase.H
timeDirs
static instantList timeDirs
Definition: globalFoam.H:44
laminarTransport
singlePhaseTransportModel laminarTransport(U, phi)
T
const volScalarField & T
Definition: createFields.H:25
simple
const dictionary & simple
Definition: readFluidMultiRegionSIMPLEControls.H:1
Foam::Vector
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:57
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:142
createMesh.H
createTime.H
x
x
Definition: LISASMDCalcMethod2.H:52
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
TOp
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))
UEqn.H
Foam::singlePhaseTransportModel::correct
virtual void correct()
Correct the laminar viscosity.
Definition: singlePhaseTransportModel.C:76
createFields.H
fvCFD.H
startTime
Foam::label startTime
Definition: checkTimeOptions.H:5
DR
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))
Foam::objectRegistry::lookupObject
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Definition: objectRegistryTemplates.C:165
Foam::timeSelector::select0
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
Definition: timeSelector.C:253
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
args
Foam::argList args(argc, argv)
p_rgh
volScalarField & p_rgh
Definition: setRegionFluidFields.H:31
y
scalar y
Definition: LISASMDCalcMethod1.H:14
maxValue
scalar maxValue
Definition: LISASMDCalcMethod1.H:5
PPD
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))
QrHeader
IOobject QrHeader("Qr", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE)
N
label N
Definition: createFields.H:22