programmer's documentation
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
src
ctwr
cs_ctwr_air_props.h
Go to the documentation of this file.
1
#ifndef __CS_CTWR_AIR_PROPS_H__
2
#define __CS_CTWR_AIR_PROPS_H__
3
4
/*============================================================================
5
* Specific laws for air properties (temperature, enthalpy)
6
*============================================================================*/
7
8
/*
9
This file is part of Code_Saturne, a general-purpose CFD tool.
10
11
Copyright (C) 1998-2013 EDF S.A.
12
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
16
version.
17
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
21
details.
22
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.
26
*/
27
28
/*----------------------------------------------------------------------------*/
29
30
/*----------------------------------------------------------------------------
31
* Standard C library headers
32
*----------------------------------------------------------------------------*/
33
34
/*----------------------------------------------------------------------------
35
* Local headers
36
*----------------------------------------------------------------------------*/
37
38
#include "
cs_base.h
"
39
40
/*----------------------------------------------------------------------------*/
41
42
BEGIN_C_DECLS
43
44
/*============================================================================
45
* Structure definition
46
*============================================================================*/
47
48
/* Structure associated to general properties */
49
50
typedef
struct
{
51
52
cs_real_t
cpa
;
/* Capacite calorifique de l air */
53
cs_real_t
cpv
;
/* Capacite calorifique de la vapeur */
54
cs_real_t
cpe
;
/* Capacite calorifique de l eau */
55
cs_real_t
hv0
;
/* Chaleur latente */
56
cs_real_t
rhoe
;
/* Masse volumique de l eau*/
57
cs_real_t
visc
;
/* Viscosite Dynamique */
58
cs_real_t
cond
;
/* Conductivite */
59
cs_real_t
gravx
;
/* Gravite x */
60
cs_real_t
gravy
;
/* Gravite y */
61
cs_real_t
gravz
;
/* Gravite z */
62
63
}
cs_ctwr_fluid_props_t
;
64
65
extern
cs_ctwr_fluid_props_t
*
cs_glob_ctwr_props
;
66
67
/* Structure associated to air properties */
68
69
typedef
struct
{
70
71
cs_real_t
rho_ref
;
/* Reference density */
72
cs_real_t
p_ref
;
/* Reference pressure */
73
cs_real_t
t_ref
;
/* Reference temperature */
74
cs_real_t
delta
;
75
76
cs_real_t
g[3];
/* Gravity vector */
77
78
}
cs_ctwr_air_props_t
;
79
80
/*============================================================================
81
* Public function prototypes for Fortran API
82
*============================================================================*/
83
84
/*----------------------------------------------------------------------------
85
* Calculation of the air humidity at saturation for a given temperature
86
*
87
* Fortran interface:
88
*
89
* SUBROUTINE XSATH
90
* ****************
91
*
92
* DOUBLE PRECISION TH : <- : temperature in Celsius degree
93
* DOUBLE PRECISION XSAT : -> : absolute humidity of saturated air
94
*----------------------------------------------------------------------------*/
95
96
void
CS_PROCF
(
xsath
, XSATH)
97
(
98
const
cs_real_t
*th,
99
cs_real_t
*xsat
100
);
101
102
/*----------------------------------------------------------------------------
103
* Calculation of the derivative of the absolute humidity at saturation
104
*
105
* Fortran interface:
106
*
107
* SUBROUTINE DXSATH
108
* *****************
109
*
110
* DOUBLE PRECISION TH : <- : temperature in Celsius degree
111
* DOUBLE PRECISION DXSAT : -> : derivative of the humidity of saturated air
112
*----------------------------------------------------------------------------*/
113
114
void
CS_PROCF
(
dxsath
, DXSATH)
115
(
116
const
cs_real_t
*th,
117
cs_real_t
*dxsat
118
);
119
120
/*----------------------------------------------------------------------------
121
* Communication des proprietes physiques
122
*
123
* Fortran interface:
124
*
125
* SUBROUTINE COMPPF
126
* *****************
127
*----------------------------------------------------------------------------*/
128
129
void
CS_PROCF
(
ctprof
, CTPROF)
130
(
131
const
cs_real_t
*cpa,
/* Capacite calorifique de l air */
132
const
cs_real_t
*cpv,
/* Capacite calorifique de la vapeur */
133
const
cs_real_t
*cpe,
/* Capacite calorifique de l eau */
134
const
cs_real_t
*hv0,
/* Chaleur latente */
135
const
cs_real_t
*rhoe,
/* Masse volumique de l eau*/
136
const
cs_real_t
*visc,
/* Viscosite Dynamique */
137
const
cs_real_t
*cond,
/* Conductivite */
138
const
cs_real_t
*gravx,
/* Gravite x */
139
const
cs_real_t
*gravy,
/* Gravite y */
140
const
cs_real_t
*gravz
/* Gravite z */
141
);
142
143
/*============================================================================
144
* Prototypes of public function
145
*============================================================================*/
146
147
/*----------------------------------------------------------------------------
148
* Calculation of the air humidity at saturation for a given temperature
149
*
150
* parameters:
151
* th <-- temperature in Celsius degree
152
*
153
* returns:
154
* absolute humidity of saturated air
155
*----------------------------------------------------------------------------*/
156
157
cs_real_t
158
cs_ctwr_xsath
(
const
cs_real_t
th);
159
160
/*----------------------------------------------------------------------------
161
* Calculation of moist air mass enthalpy
162
*
163
* parameters:
164
* xair <-- absolute humidity of saturated air
165
* tair <-- air temperature in Celsius degree
166
*
167
* returns:
168
* air mass enthalpy
169
*----------------------------------------------------------------------------*/
170
171
cs_real_t
172
cs_ctwr_enthair
(
const
cs_real_t
xair,
173
const
cs_real_t
tair);
174
175
/*----------------------------------------------------------------------------
176
* Calculation water mass enthalpy
177
*
178
* parameters:
179
* teau <-- water temperature in Celsius degree
180
*
181
* returns:
182
* water mass enthalpy
183
*----------------------------------------------------------------------------*/
184
185
cs_real_t
186
cs_ctwr_heau
(
const
cs_real_t
teau);
187
188
/*----------------------------------------------------------------------------
189
* Calculation of the derivate of the absolute humidity at saturation
190
*
191
* parameters:
192
* th <-- temperature in Celsius degree
193
*
194
* returns:
195
* derivative of the humidity of saturated air
196
*----------------------------------------------------------------------------*/
197
198
cs_real_t
199
cs_ctwr_dxsath
(
const
cs_real_t
th);
200
201
/*----------------------------------------------------------------------------*/
202
203
END_C_DECLS
204
205
#endif
/* __CS_CTWR_AIR_PROPERTIES_H__ */
Generated on Thu Feb 27 2014 19:21:34 by
1.8.3.1