1
#ifndef __CS_CTWR_AIR_PROPS_H__
2
#define __CS_CTWR_AIR_PROPS_H__
4
/*============================================================================
5
* Specific laws for air properties (temperature, enthalpy)
6
*============================================================================*/
9
This file is part of Code_Saturne, a general-purpose CFD tool.
11
Copyright (C) 1998-2011 EDF S.A.
13
This program is free software; you can redistribute it and/or modify it under
14
the terms of the GNU General Public License as published by the Free Software
15
Foundation; either version 2 of the License, or (at your option) any later
18
This program is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23
You should have received a copy of the GNU General Public License along with
24
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25
Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
/*----------------------------------------------------------------------------*/
30
/*----------------------------------------------------------------------------
31
* Standard C library headers
32
*----------------------------------------------------------------------------*/
34
/*----------------------------------------------------------------------------
36
*----------------------------------------------------------------------------*/
38
/*----------------------------------------------------------------------------
40
*----------------------------------------------------------------------------*/
42
/*----------------------------------------------------------------------------
44
*----------------------------------------------------------------------------*/
48
/*----------------------------------------------------------------------------*/
52
/*============================================================================
53
* Structure definition
54
*============================================================================*/
56
/* Structure associated to general properties */
60
cs_real_t cpa; /* Capacite calorifique de l air */
61
cs_real_t cpv; /* Capacite calorifique de la vapeur */
62
cs_real_t cpe; /* Capacite calorifique de l eau */
63
cs_real_t hv0; /* Chaleur latente */
64
cs_real_t rhoe; /* Masse volumique de l eau*/
65
cs_real_t visc; /* Viscosite Dynamique */
66
cs_real_t cond; /* Conductivite */
67
cs_real_t gravx; /* Gravite x */
68
cs_real_t gravy; /* Gravite y */
69
cs_real_t gravz; /* Gravite z */
71
} cs_ctwr_fluid_props_t;
73
extern cs_ctwr_fluid_props_t *cs_glob_ctwr_props;
75
/* Structure associated to air properties */
79
cs_real_t rho_ref; /* Reference density */
80
cs_real_t p_ref; /* Reference pressure */
81
cs_real_t t_ref; /* Reference temperature */
84
cs_real_t g[3]; /* Gravity vector */
86
} cs_ctwr_air_props_t;
88
/*============================================================================
89
* Public function prototypes for Fortran API
90
*============================================================================*/
92
/*----------------------------------------------------------------------------
93
* Calculation of the air humidity at saturation for a given temperature
100
* DOUBLE PRECISION TH : <- : temperature in Celsius degree
101
* DOUBLE PRECISION XSAT : -> : absolute humidity of saturated air
102
*----------------------------------------------------------------------------*/
104
void CS_PROCF (xsath, XSATH)
110
/*----------------------------------------------------------------------------
111
* Calculation of the derivative of the absolute humidity at saturation
118
* DOUBLE PRECISION TH : <- : temperature in Celsius degree
119
* DOUBLE PRECISION DXSAT : -> : derivative of the humidity of saturated air
120
*----------------------------------------------------------------------------*/
122
void CS_PROCF (dxsath, DXSATH)
128
/*----------------------------------------------------------------------------
129
* Communication des proprietes physiques
135
*----------------------------------------------------------------------------*/
137
void CS_PROCF (ctprof, CTPROF)
139
const cs_real_t *cpa, /* Capacite calorifique de l air */
140
const cs_real_t *cpv, /* Capacite calorifique de la vapeur */
141
const cs_real_t *cpe, /* Capacite calorifique de l eau */
142
const cs_real_t *hv0, /* Chaleur latente */
143
const cs_real_t *rhoe, /* Masse volumique de l eau*/
144
const cs_real_t *visc, /* Viscosite Dynamique */
145
const cs_real_t *cond, /* Conductivite */
146
const cs_real_t *gravx, /* Gravite x */
147
const cs_real_t *gravy, /* Gravite y */
148
const cs_real_t *gravz /* Gravite z */
151
/*============================================================================
152
* Prototypes of public function
153
*============================================================================*/
155
/*----------------------------------------------------------------------------
156
* Calculation of the air humidity at saturation for a given temperature
159
* th <-- temperature in Celsius degree
162
* absolute humidity of saturated air
163
*----------------------------------------------------------------------------*/
166
cs_ctwr_xsath(const cs_real_t th);
168
/*----------------------------------------------------------------------------
169
* Calculation of moist air mass enthalpy
172
* xair <-- absolute humidity of saturated air
173
* tair <-- air temperature in Celsius degree
177
*----------------------------------------------------------------------------*/
180
cs_ctwr_enthair(const cs_real_t xair,
181
const cs_real_t tair);
183
/*----------------------------------------------------------------------------
184
* Calculation water mass enthalpy
187
* teau <-- water temperature in Celsius degree
190
* water mass enthalpy
191
*----------------------------------------------------------------------------*/
194
cs_ctwr_heau(const cs_real_t teau);
196
/*----------------------------------------------------------------------------
197
* Calculation of the derivate of the absolute humidity at saturation
200
* th <-- temperature in Celsius degree
203
* derivative of the humidity of saturated air
204
*----------------------------------------------------------------------------*/
207
cs_ctwr_dxsath(const cs_real_t th);
209
/*----------------------------------------------------------------------------*/
213
#endif /* __CS_CTWR_AIR_PROPERTIES_H__ */