My Project
programmer's documentation
Loading...
Searching...
No Matches
cs_ctwr.h
Go to the documentation of this file.
1#ifndef __CS_CTWR_H__
2#define __CS_CTWR_H__
3
4/*============================================================================
5 * Main for cooling towers related functions
6 *============================================================================*/
7
8/*
9 This file is part of Code_Saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2019 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 * PLE library headers
32 *----------------------------------------------------------------------------*/
33
34#include <ple_locator.h>
35
36/*----------------------------------------------------------------------------
37 * Local headers
38 *----------------------------------------------------------------------------*/
39
40#include "fvm_nodal.h"
41
42#include "cs_base.h"
43#include "cs_halo.h"
44#include "cs_mesh.h"
45#include "cs_mesh_quantities.h"
46
47/*----------------------------------------------------------------------------*/
48
50
51/*============================================================================
52 * Local Macro definitions
53 *============================================================================*/
54
55/*============================================================================
56 * Type definitions
57 *============================================================================*/
58
59/*============================================================================
60 * Type definitions
61 *============================================================================*/
62
72
81
82typedef struct _cs_ctwr_zone_t cs_ctwr_zone_t;
83
88/*----------------------------------------------------------------------------
89 * Cooling Tower model options descriptor
90 *----------------------------------------------------------------------------*/
91
92typedef struct {
96
97/*============================================================================
98 * Static global variables
99 *============================================================================*/
100
101/* Pointer to cooling tower model options structure */
103
104/*============================================================================
105 * Public function definitions
106 *============================================================================*/
107
108/*----------------------------------------------------------------------------
109 * Provide acces to cs_ctwr_option
110 *----------------------------------------------------------------------------*/
111
114
115/*----------------------------------------------------------------------------*/
131/*----------------------------------------------------------------------------*/
132
133void
134cs_ctwr_define(const char zone_criteria[],
135 cs_ctwr_zone_type_t zone_type,
136 cs_real_t delta_t,
137 cs_real_t relax,
138 cs_real_t t_l_bc,
139 cs_real_t q_l_bc,
140 cs_real_t xap,
141 cs_real_t xnp,
142 cs_real_t surface,
143 cs_real_t xleak_fac);
144
145/*----------------------------------------------------------------------------*/
149/*----------------------------------------------------------------------------*/
150
151void
153
154/*----------------------------------------------------------------------------*/
166/*----------------------------------------------------------------------------*/
167
168void
170 const cs_real_t molmassrat,
171 cs_real_t mass_source[]);
172
173/*----------------------------------------------------------------------------*/
178/*----------------------------------------------------------------------------*/
179
180void
182
183/*----------------------------------------------------------------------------*/
188/*----------------------------------------------------------------------------*/
189
190void
192
193/*----------------------------------------------------------------------------*/
197/*----------------------------------------------------------------------------*/
198
199void
201
202/*----------------------------------------------------------------------------*/
206/*----------------------------------------------------------------------------*/
207
208void
210
211/*----------------------------------------------------------------------------*/
215/*----------------------------------------------------------------------------*/
216
217void
219
220/*----------------------------------------------------------------------------*/
229/*----------------------------------------------------------------------------*/
230
231void
233 cs_real_t t0,
234 cs_real_t p0,
235 cs_real_t molmassrat);
236
237/*----------------------------------------------------------------------------*/
247/*----------------------------------------------------------------------------*/
248
249void
251 cs_real_t t0,
252 cs_real_t p0,
253 cs_real_t humidity0,
254 cs_real_t molmassrat);
255
256/*----------------------------------------------------------------------------*/
263/*----------------------------------------------------------------------------*/
264
265void
266cs_ctwr_init_flow_vars(cs_real_t liq_mass_flow[]);
267
268/*----------------------------------------------------------------------------*/
278/*----------------------------------------------------------------------------*/
279
280void
282 cs_real_t t0,
283 cs_real_t p0,
284 cs_real_t molmassrat);
285
286/*----------------------------------------------------------------------------*/
297/*----------------------------------------------------------------------------*/
298
299void
300cs_ctwr_source_term(int f_id,
301 const cs_real_t p0,
302 const cs_real_t molmassrat,
303 cs_real_t exp_st[],
304 cs_real_t imp_st[]);
305
306/*----------------------------------------------------------------------------*/
314/*----------------------------------------------------------------------------*/
315
316void
318
319/*----------------------------------------------------------------------------
320 * Get pointer to exchange area.
321 *
322 * parameters:
323 * ct_id <-- Id (0 to n-1) of exchange area
324 *
325 * returns:
326 * pointer to exchange area structure
327 *----------------------------------------------------------------------------*/
328
330cs_ctwr_by_id(int ct_id);
331
332/*----------------------------------------------------------------------------*/
333
335
336#endif /* __CS_CTWR_H__ */
cs_ctwr_option_t * cs_get_glob_ctwr_option(void)
Definition cs_ctwr.c:325
void cs_ctwr_log_balance(void)
Perform balances in packing zones.
Definition cs_ctwr.c:699
void cs_ctwr_bulk_mass_source_term(const cs_real_t p0, const cs_real_t molmassrat, cs_real_t mass_source[])
Phase change mass source term from the evaporating liquid to the bulk, humid air.
Definition cs_ctwr.c:2206
void cs_ctwr_init_flow_vars(cs_real_t liq_mass_flow[])
Initialize the flow variables relevant to the cooling tower scalars inside the packing zones.
Definition cs_ctwr.c:1061
cs_ctwr_zone_t * cs_ctwr_by_id(int ct_id)
Definition cs_ctwr.c:2242
void cs_ctwr_restart_field_vars(cs_real_t rho0, cs_real_t t0, cs_real_t p0, cs_real_t humidity0, cs_real_t molmassrat)
Reset the field variables based on the restart values.
Definition cs_ctwr.c:1285
void cs_ctwr_all_destroy(void)
Destroy cs_ctwr_t structures.
Definition cs_ctwr.c:595
void cs_ctwr_source_term(int f_id, const cs_real_t p0, const cs_real_t molmassrat, cs_real_t exp_st[], cs_real_t imp_st[])
Phase change source terms - Exchange terms between the injected liquid and the water vapor phase in t...
Definition cs_ctwr.c:1725
void cs_ctwr_init_field_vars(cs_real_t rho0, cs_real_t t0, cs_real_t p0, cs_real_t molmassrat)
Initialize the field variables.
Definition cs_ctwr.c:882
cs_ctwr_zone_type_t
Definition cs_ctwr.h:75
@ CS_CTWR_COUNTER_CURRENT
Definition cs_ctwr.h:77
@ CS_CTWR_CROSS_CURRENT
Definition cs_ctwr.h:78
cs_ctwr_model_t
Definition cs_ctwr.h:65
@ CS_CTWR_MERKEL
Definition cs_ctwr.h:69
@ CS_CTWR_NONE
Definition cs_ctwr.h:67
@ CS_CTWR_POPPE
Definition cs_ctwr.h:68
void cs_ctwr_field_pointer_map(void)
Map fields used by the cooling tower module to pointers.
Definition cs_ctwr.c:497
void cs_ctwr_define(const char zone_criteria[], cs_ctwr_zone_type_t zone_type, cs_real_t delta_t, cs_real_t relax, cs_real_t t_l_bc, cs_real_t q_l_bc, cs_real_t xap, cs_real_t xnp, cs_real_t surface, cs_real_t xleak_fac)
Define a cooling tower exchange zone.
Definition cs_ctwr.c:349
void cs_ctwr_phyvar_update(cs_real_t rho0, cs_real_t t0, cs_real_t p0, cs_real_t molmassrat)
Update the thermo physical properties fields for the humid air and the liquid.
Definition cs_ctwr.c:1523
void cs_ctwr_build_all(void)
Define the cells belonging to the different packing zones.
Definition cs_ctwr.c:565
void cs_ctwr_transport_vars(int iflag)
Convert injected liquid scalars from and to their transported form.
const cs_ctwr_option_t * cs_glob_ctwr_option
void cs_ctwr_log_setup(void)
Log Packing zone definition setup information.
Definition cs_ctwr.c:625
struct _cs_ctwr_zone_t cs_ctwr_zone_t
Definition cs_ctwr.h:82
void cs_ctwr_build_zones(void)
Define zones.
Definition cs_ctwr.c:520
#define BEGIN_C_DECLS
Definition cs_defs.h:467
double cs_real_t
Floating-point value.
Definition cs_defs.h:302
#define END_C_DECLS
Definition cs_defs.h:468
Definition cs_ctwr.h:92
int evap_model
Definition cs_ctwr.h:93
bool has_rain
Definition cs_ctwr.h:94