File size: 6,758 Bytes
5a600cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::functionObjects::comfort
Description
Calculates the thermal comfort quantities predicted mean vote (PMV),
predicted percentage of dissatisfaction (PPD) and the draught rate (DR)
based on DIN ISO EN 7730:2005.
The draught rate is defined for velocities between 0 m/s and 0.5 m/s. Values
larger than 0.5 m/s will be set to 0.5 m/s. Furthermore, the draught rate is
defined between 20 degC and 26 degC. A temperature limitation is not
implemented. The draught rate is mainly used for HVAC analysis in rooms.
Usage
\table
Property | Description | Required | Default value
clothing | The insulation value of the cloth | no | 0
metabolicRate | The metabolic rate | no | 0.8
extWork | The external work | no | 0
Trad | Radiation temperature | no | 0
relHumidity | Relative humidity of the air | no | 0.5
pSat | Saturation pressure of water | no | -1
tolerance | Residual control for the cloth temperature | no | 1e-4
maxClothIter | Maximum number of iterations | no | 100
meanVelocity | Use a constant mean velocity in the whole domain | no |\
false
\endtable
\table
Predicted Mean Vote (PMV) | evaluation
+ 3 | hot
+ 2 | warm
+ 1 | slightly warm
+ 0 | neutral
- 1 | slightly cool
- 2 | cool
- 3 | cold
\endtable
\verbatim
comfortAnalysis
{
type comfort;
libs ("libfieldFunctionObjects.so");
executeControl writeTime;
writeControl writeTime;
}
\endverbatim
SourceFiles
comfort.C
\*---------------------------------------------------------------------------*/
#ifndef comfort_H
#define comfort_H
#include "fvMeshFunctionObject.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class comfort Declaration
\*---------------------------------------------------------------------------*/
class comfort
:
public fvMeshFunctionObject
{
// Private Data
//- Clothing [-]
dimensionedScalar clothing_;
//- Metabolic rate [kg/s^3]
dimensionedScalar metabolicRate_;
//- External work [kg/s^3]
dimensionedScalar extWork_;
//- Switch set to true if the radiation temperature is provided
Switch TradSet_;
//- Mean radiation temperature [K]
dimensionedScalar Trad_;
//- Relative humidity [percentage]
dimensionedScalar relHumidity_;
//- Saturation pressure of water [Pa]
dimensionedScalar pSat_;
//- Thermal insulation of clothing [W/m^2/K]
dimensionedScalar Icl_;
//- Prefactor of cloth area [-]
dimensionedScalar fcl_;
//- Tolerance criteria for iterative process to find Tcl
scalar tolerance_;
//- Maximum number of correctors for cloth temperature
int maxClothIter_;
//- Switch to use volume weighted velocity field for calculation
Switch meanVelocity_;
// Private Member Functions
// Calculate the magnitude of the velocity [m/s]
tmp<volScalarField> magU() const;
// Calculate the radiation temperature in the domain using a simple
// approach [K]
dimensionedScalar Trad() const;
// Calculate the saturation pressure based on 7730:2006
// Possible options: adding different calculation methods such as
// the formulation based on Magnus or others [Pa]
tmp<volScalarField> pSat() const;
// Calculate and return the surface temperature of the cloth [K]
// and the heat transfer coefficient hc [W/m^2/K]
tmp<volScalarField> Tcloth
(
volScalarField& hc,
const dimensionedScalar& metabolicRateSI,
const dimensionedScalar& extWorkSI,
const volScalarField& TdegC,
const dimensionedScalar& Trad
);
// Return true if the cloth temperature iteration has converged
bool converged(const volScalarField&) const;
public:
//- Runtime type information
TypeName("comfort");
// Constructors
//- Construct from Time and dictionary
comfort
(
const word& name,
const Time& runTime,
const dictionary& dict
);
//- Destructor
virtual ~comfort();
// Member Functions
//- Read the data needed for the comfort calculation
virtual bool read(const dictionary&);
//- Return the list of fields required
virtual wordList fields() const;
//- Calculate the predicted mean vote (PMV)
// and predicted percentage dissatisfaction (PPD) fields
virtual bool execute();
//- Write the PPD and PMV fields
virtual bool write();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
|