OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::BlockLatticeThermalComfort3D< T, DESCRIPTOR, TDESCRIPTOR > Class Template Referencefinal

BlockLatticeThermalComfort3D returns pointwise PMV and PPD on local lattice. More...

#include <latticeThermalComfort3D.h>

+ Inheritance diagram for olb::BlockLatticeThermalComfort3D< T, DESCRIPTOR, TDESCRIPTOR >:
+ Collaboration diagram for olb::BlockLatticeThermalComfort3D< T, DESCRIPTOR, TDESCRIPTOR >:

Public Member Functions

 BlockLatticeThermalComfort3D (BlockLattice< T, TDESCRIPTOR > &blockLattice, ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > const &converter)
 
bool operator() (T output[], const int input[])
 has to be implemented for 'every' derived class
 
- Public Member Functions inherited from olb::BlockLatticeF3D< T, TDESCRIPTOR >
BlockLattice< T, TDESCRIPTOR > & getBlock ()
 Copy Constructor.
 
- Public Member Functions inherited from olb::BlockF3D< T >
 ~BlockF3D () override
 virtual destructor for defined behaviour
 
virtual BlockStructureD< 3 > & getBlockStructure () const
 
BlockF3D< T > & operator- (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator+ (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator* (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator/ (BlockF3D< T > &rhs)
 
- Public Member Functions inherited from olb::GenericF< T, int >
virtual ~GenericF ()=default
 
int getSourceDim () const
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
bool operator() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], int input0)
 
bool operator() (T output[], int input0, int input1)
 
bool operator() (T output[], int input0, int input1, int input2)
 
bool operator() (T output[], int input0, int input1, int input2, int input3)
 

Additional Inherited Members

- Public Types inherited from olb::GenericF< T, int >
using targetType
 
using sourceType
 
- Public Attributes inherited from olb::GenericF< T, int >
std::shared_ptr< GenericF< T, int > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Protected Member Functions inherited from olb::BlockLatticeThermalPhysF3D< T, DESCRIPTOR, TDESCRIPTOR >
 BlockLatticeThermalPhysF3D (BlockLattice< T, TDESCRIPTOR > &blockLattice, const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > &converter, int targetDim)
 
- Protected Member Functions inherited from olb::BlockLatticeF3D< T, TDESCRIPTOR >
 BlockLatticeF3D (BlockLattice< T, TDESCRIPTOR > &blockLattice, int targetDim)
 
- Protected Member Functions inherited from olb::BlockF3D< T >
 BlockF3D (BlockStructureD< 3 > &blockStructure, int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, int >
 GenericF (int targetDim, int sourceDim)
 
- Protected Attributes inherited from olb::BlockLatticeThermalPhysF3D< T, DESCRIPTOR, TDESCRIPTOR >
const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > & _converter
 
- Protected Attributes inherited from olb::BlockLatticeF3D< T, TDESCRIPTOR >
BlockLattice< T, TDESCRIPTOR > & _blockLattice
 
- Protected Attributes inherited from olb::BlockF3D< T >
BlockStructureD< 3 > & _blockStructure
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename TDESCRIPTOR>
class olb::BlockLatticeThermalComfort3D< T, DESCRIPTOR, TDESCRIPTOR >

BlockLatticeThermalComfort3D returns pointwise PMV and PPD on local lattice.

Definition at line 59 of file latticeThermalComfort3D.h.

Constructor & Destructor Documentation

◆ BlockLatticeThermalComfort3D()

template<typename T , typename DESCRIPTOR , typename TDESCRIPTOR >
olb::BlockLatticeThermalComfort3D< T, DESCRIPTOR, TDESCRIPTOR >::BlockLatticeThermalComfort3D ( BlockLattice< T, TDESCRIPTOR > & blockLattice,
ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > const & converter )

Definition at line 58 of file latticeThermalComfort3D.hh.

60 : BlockLatticeThermalPhysF3D<T,DESCRIPTOR,TDESCRIPTOR>(blockLattice,converter,2)
61{
62 this->getName() = "thermalComfort";
63}
std::string & getName()
read and write access to name
Definition genericF.hh:51

References olb::GenericF< T, int >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<typename T , typename DESCRIPTOR , typename TDESCRIPTOR >
bool olb::BlockLatticeThermalComfort3D< T, DESCRIPTOR, TDESCRIPTOR >::operator() ( T output[],
const int input[] )
virtual

has to be implemented for 'every' derived class

calculation of f_clo

calculation of press_Vapor with multiple equations to choose from

iterative calculation of h_c and t_cl

Implements olb::GenericF< T, int >.

Definition at line 67 of file latticeThermalComfort3D.hh.

68{
69 OstreamManager clout(std::cout,"thermalComfort");
70
71 // importing the local velocity and temperature for one specific lattice
72 T latticeTemp = this->_blockLattice.get( input[0], input[1], input[2]).computeRho();
73 T physTemp = this->_converter.getPhysTemperature(latticeTemp);
74
75 auto latticeVel = this->_blockLattice.get(input[0], input[1], input[2]).template getFieldPointer<descriptors::VELOCITY>();
76 T physVel[3];
77 physVel[0]= this->_converter.getPhysVelocity(latticeVel[0]);
78 physVel[1]= this->_converter.getPhysVelocity(latticeVel[1]);
79 physVel[2]= this->_converter.getPhysVelocity(latticeVel[2]);
80
81 T pmv; // Predicted Mean Vote
82 T ppd; // Predicted Percantage of Dissatisfied
83
84 T temp_Air; // air temperature [°C]
85 T vel_Air; // local relative air velocity [m/s]
86 T press_Vapor; // pressure of water vapour in ambient air [Pa]
87 T h_c; // convective heat transfer coefficient [W/(m² K)]
88 T f_clo; // ratio of surface area clothed/nude [-]
89 T temp_Clo = temp_Bod; // clothing temperature [°C]
90 T temp_Clo_old = temp_Clo;
91
92 // calculation of the air temperature in °C and the magnitude of the velocity
93 temp_Air = physTemp - 273.15;
94 vel_Air = util::sqrt(physVel[0]*physVel[0] + physVel[1]*physVel[1] + physVel[2]*physVel[2]);
95
97 // ratio of surface area clothed/nude [-]
98 // 1.15 = typical business suit
99 if (i_clo <= 0.078) {
100 f_clo = 1.0 + 1.290 * i_clo;
101 }
102 else {
103 f_clo = 1.05 + 0.645 * i_clo;
104 }
105
107 // however, there is no significant difference between these equations
108 // calculation with simplified equation from a comparable algorithm
109 T ppk = 673.4 - 1.8 * temp_Air;
110 T ppa = (3.2437814 + 0.00326014*ppk) + (2.00658 * 0.000000001 * ppk * ppk * ppk);
111 T ppb = (1165.09 - ppk) * (1.0 + 0.00121547 * ppk);
112 press_Vapor = rel_Hum/100.0 * 22105.8416/util::exp(2.302585 * ppk * ppa / ppb) * 1000.0;
113
114 // calculation like EN ISO 7730
115 //press_Vapor = rel_Hum * 10 * util::exp(16.6536 - 4030.183/(temp_Air+235.0));
116 // calculation with Magnus Equation
117 //press_Vapor = rel_Hum/100.0 * 6.112 * 100 * util::exp((17.62*temp_Air)/(243.12+temp_Air));
118
120 for (int iter = 0; iter < iterMax; iter++) {
121 temp_Clo = 0.8 * temp_Clo_old + 0.2 * temp_Clo;
122
123 h_c = 12.1 * util::sqrt(vel_Air); // pure forced convection
124
125 if (2.38 * util::pow(util::fabs(temp_Clo - temp_Air), 0.25) > h_c) {
126 h_c = 2.38 * util::pow(util::fabs(temp_Clo - temp_Air), 0.25); // pure free convection
127 }
128
129 temp_Clo_old = temp_Clo;
130 temp_Clo = 35.7 - 0.028 * mw -
131 i_clo * (3.96e-8 * f_clo * (util::pow(temp_Clo + 273.0, 4) - util::pow(temp_Mrt + 273.0, 4)) +
132 f_clo * h_c * (temp_Clo - temp_Air));
133
134 if ((util::fabs((temp_Clo_old - temp_Clo) / temp_Clo)) < eps) {
135 break;
136 }
137 if (iter == (iterMax-1)) {
138 clout << "WARNING: Maximal iteration step limit: PMV calculation not possible!" << std::endl;
139 }
140 }
141
142 // calculation of PMV
143 pmv = (0.303 * util::exp(-0.036 * mw) + 0.028) * (mw // heat gain by internal metabolic process
144 -3.05e-3*(5733.0 - 6.99*mw - press_Vapor) // heat loss by skin diffusion
145 -0.42*(mw - 58.15) // heat loss by evaporation of sweat secretion
146 -1.7e-5 * mw * (5867.0 - press_Vapor) - 0.0014 * mw * (34.0 - temp_Air) // heat loss by latent respiration and dry respiration
147 -3.96e-8 * f_clo *(util::pow(temp_Clo + 273.0, 4) - util::pow(temp_Mrt + 273.0, 4)) // heat loss by radiation
148 -f_clo * h_c * (temp_Clo - temp_Air)); // heat loss by convection
149
150 // calculation of PPD
151 ppd = 100.0 - 95.0*util::exp(-0.03353* util::pow(pmv,4.0) - 0.2179*util::pow(pmv,2.0));
152
153 // return of PMV and PPD
154 output[0] = pmv;
155 output[1] = ppd;
156
157 return true;
158}
BlockLattice< T, TDESCRIPTOR > & _blockLattice
const ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > & _converter
Cell< T, DESCRIPTOR > get(CellID iCell)
Get Cell interface for index iCell.
constexpr T getPhysTemperature(T latticeTemperature) const
conversion from lattice to physical temperature
constexpr T getPhysVelocity(T latticeVelocity) const
conversion from lattice to physical velocity
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Definition pack.h:112
cpu::simd::Pack< T > fabs(cpu::simd::Pack< T > value)
Definition pack.h:106
ADf< T, DIM > exp(const ADf< T, DIM > &a)
Definition aDiff.h:455

References olb::util::exp(), olb::util::fabs(), olb::util::pow(), and olb::util::sqrt().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: