8.3
general documentation
cs_gui.h
Go to the documentation of this file.
1#ifndef __CS_GUI_H__
2#define __CS_GUI_H__
3
4/*============================================================================
5 * Management of the GUI parameters file: main parameters
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "cs_base.h"
35#include "cs_equation_param.h"
36#include "cs_field.h"
37#include "cs_zone.h"
38
39/*----------------------------------------------------------------------------*/
40
42
43/*============================================================================
44 * Type definitions
45 *============================================================================*/
46
49typedef struct {
50
51 const cs_zone_t *zone; /*<! Pointer to zone */
52 const cs_field_t **fields; /*<! Array of field pointers (NULL-terminated) */
53
55
56/*============================================================================
57 * Public function prototypes
58 *============================================================================*/
59
60/*----------------------------------------------------------------------------
61 * Specific heat variable or constant indicator.
62 *----------------------------------------------------------------------------*/
63
64void
65cs_gui_cp_params (void);
66
67/*----------------------------------------------------------------------------
68 * Constant or variable indicator for the user scalar laminar viscosity.
69 *----------------------------------------------------------------------------*/
70
71void
73
74/*----------------------------------------------------------------------------
75 * Time passing parameter.
76 *----------------------------------------------------------------------------*/
77
78void
79cs_gui_dt(void);
80
81/*----------------------------------------------------------------------------
82 * Hydrostatic pressure parameter.
83 *----------------------------------------------------------------------------*/
84
85void
87
88/*----------------------------------------------------------------------------
89 * Hydrostatic equilibrium parameter.
90 *----------------------------------------------------------------------------*/
91
92void
94
95/*----------------------------------------------------------------------------
96 * Time passing parameters.
97 *----------------------------------------------------------------------------*/
98
99void
100cs_gui_dt_param(void);
101
102/*----------------------------------------------------------------------------
103 * Define porosity.
104 *----------------------------------------------------------------------------*/
105
106void
107cs_gui_porosity(void);
108
109/*----------------------------------------------------------------------------*/
113/*----------------------------------------------------------------------------*/
114
115void
117
118/*----------------------------------------------------------------------------
119 * Space scheme options, linear solver precision and time step factor
120 *----------------------------------------------------------------------------*/
121
122void
124
125/*-----------------------------------------------------------------------------
126 * Free memory: clean global private variables.
127 *----------------------------------------------------------------------------*/
128
129void
130cs_gui_finalize(void);
131
132/*----------------------------------------------------------------------------
133 * Return a pointer to equation parameters based on a field or equation name.
134 *
135 * parameters:
136 * name <-- field or equation name
137 *
138 * return:
139 * pointer to matching child string
140 *----------------------------------------------------------------------------*/
141
143cs_gui_get_equation_param(const char *name);
144
145/*-----------------------------------------------------------------------------
146 * Get value of reference fluid properties parameter.
147 *
148 * parameters:
149 * name <-- parameter name
150 * value --> parameter value
151 *----------------------------------------------------------------------------*/
152
153void
154cs_gui_fluid_properties_value(const char *param,
155 double *value);
156
157/*----------------------------------------------------------------------------
158 * Groundwater model : read laws for capacity, saturation and permeability
159 *
160 * parameters:
161 * permeability <-- permeability type
162 * diffusion <-- diffusion type
163 * unsaturated <-- unsaturated zone taken into account
164 *----------------------------------------------------------------------------*/
165
166void
167cs_gui_groundwater_property_laws(int permeability,
168 int diffusion,
169 int unsaturated);
170
171/*----------------------------------------------------------------------------*/
182/*----------------------------------------------------------------------------*/
183
184void
185cs_gui_head_losses(const cs_zone_t *zone,
186 const cs_real_3_t *cvara_vel,
187 cs_real_t cku[][6]);
188
189/*----------------------------------------------------------------------------*/
193/*----------------------------------------------------------------------------*/
194
195void
197
198/*-----------------------------------------------------------------------------
199 * Selection of linear solvers.
200 *----------------------------------------------------------------------------*/
201
202void
204
205/*----------------------------------------------------------------------------
206 * User momentum source terms.
207 *
208 * parameters:
209 * vel <-- fluid velocity
210 * tsexp --> explicit source terms
211 * tsimp --> implicit source terms
212 *----------------------------------------------------------------------------*/
213
214void
216 cs_real_3_t *tsexp,
217 cs_real_33_t *tsimp);
218
219/*-----------------------------------------------------------------------------
220 * Define global numerical options.
221 *----------------------------------------------------------------------------*/
222
223void
225
226/*-----------------------------------------------------------------------------
227 * Define parallel IO settings.
228 *----------------------------------------------------------------------------*/
229
230void
232
233/*-----------------------------------------------------------------------------
234 * Set partitioning options.
235 *----------------------------------------------------------------------------*/
236
237void
238cs_gui_partition(void);
239
240/*-----------------------------------------------------------------------------
241 * Set MPI related algorithm options
242 *----------------------------------------------------------------------------*/
243
244void
246
247/*----------------------------------------------------------------------------
248 * Treatment of physical constants (gravity and Coriolis).
249 *----------------------------------------------------------------------------*/
250
251void
253
254/*----------------------------------------------------------------------------
255 * Treatment of gravity and fluid physical properties
256 * Initialize reference pressure and temperature if present
257 *----------------------------------------------------------------------------*/
258
259void
261
262/*----------------------------------------------------------------------------
263 * User law for material properties
264 *----------------------------------------------------------------------------*/
265
266void
268
269/*----------------------------------------------------------------------------
270 * Determine porosity model type
271 *----------------------------------------------------------------------------*/
272
273void
275
276/*-----------------------------------------------------------------------------
277 * Get initial value from property markup.
278 *
279 * parameters:
280 * property_name <-- name of the property
281 * value --> new initial value of the property
282 *----------------------------------------------------------------------------*/
283
284void
285cs_gui_properties_value(const char *property_name,
286 double *value);
287
288/*-----------------------------------------------------------------------------
289 * Get value of property markup for fluid of given id
290 *
291 * parameters:
292 * fluid_id <-- fluid index
293 * property_name <-- name of the property
294 * value --> new initial value of the property
295 *----------------------------------------------------------------------------*/
296
297void
298cs_gui_properties_value_by_fluid_id(const int fluid_id,
299 const char *property_name,
300 double *value);
301
302/*----------------------------------------------------------------------------
303 * Read minimum / maximum values (used in clipping) and turbulent flux model
304 * for additional user or model variables.
305 *
306 * Also read reference dynamic and user scalar viscosity
307 *----------------------------------------------------------------------------*/
308
309void
311
312/*----------------------------------------------------------------------------
313 * Thermal model.
314 *----------------------------------------------------------------------------*/
315
316void
318
319/*----------------------------------------------------------------------------
320 * Get thermal scalar model.
321 *
322 * return:
323 * value of itherm*10 + (temperature variant flag), or -1 if not defined
324 *----------------------------------------------------------------------------*/
325
326int
328
329/*----------------------------------------------------------------------------
330 * Time moments definition
331 *----------------------------------------------------------------------------*/
332
333void
335
336/*-----------------------------------------------------------------------------
337 * Set turbomachinery model
338 *----------------------------------------------------------------------------*/
339
340void
342
343/*-----------------------------------------------------------------------------
344 * Set turbomachinery options.
345 *----------------------------------------------------------------------------*/
346
347void
349
350/*----------------------------------------------------------------------------
351 * Turbulence model
352 *----------------------------------------------------------------------------*/
353
354void
356
357/*----------------------------------------------------------------------------
358 * Define reference length and reference velocity for the initialization of
359 * the turbulence variables
360 *----------------------------------------------------------------------------*/
361
362void
364
365/*----------------------------------------------------------------------------
366 * Logging output for MEI usage.
367 *----------------------------------------------------------------------------*/
368
369void
370cs_gui_usage_log(void);
371
372/*----------------------------------------------------------------------------
373 * Define user variables through the GUI.
374 *----------------------------------------------------------------------------*/
375
376void
378
379/*----------------------------------------------------------------------------
380 * Define user arrays through the GUI.
381 *----------------------------------------------------------------------------*/
382
383void
385
386/*----------------------------------------------------------------------------
387 * Define user calculator functions through the GUI
388 *----------------------------------------------------------------------------*/
389
390void
392
393/*----------------------------------------------------------------------------
394 * Define balance by zone through the GUI.
395 *----------------------------------------------------------------------------*/
396
397void
399
400/*----------------------------------------------------------------------------
401 * Define pressure drop through the GUI.
402 *----------------------------------------------------------------------------*/
403
404void
406
407/*----------------------------------------------------------------------------
408 * Define fans through the GUI.
409 *----------------------------------------------------------------------------*/
410
411void
413
414/*----------------------------------------------------------------------------
415 * Define error estimator through the GUI.
416 *----------------------------------------------------------------------------*/
417
418void
420
421/*----------------------------------------------------------------------------
422 * Define volume and boundary zones through the GUI.
423 *----------------------------------------------------------------------------*/
424
425void
426cs_gui_zones(void);
427
428/*----------------------------------------------------------------------------
429 * Define internal coupling through the GUI.
430 *----------------------------------------------------------------------------*/
431
432void
434
435/*----------------------------------------------------------------------------*/
445/*----------------------------------------------------------------------------*/
446
449 const cs_field_t *fields[],
450 const int n_fields);
451
452/*----------------------------------------------------------------------------
453 * Define user scalar source terms.
454 *----------------------------------------------------------------------------*/
455
456void
458 const cs_real_t *pvar,
459 cs_real_t *tsexp,
460 cs_real_t *tsimp);
461
462/*----------------------------------------------------------------------------
463 * Define user thermal scalar source terms
464 *----------------------------------------------------------------------------*/
465
466void
468 const cs_real_t *pvar,
469 cs_real_t *tsexp,
470 cs_real_t *tsimp);
471
472/*----------------------------------------------------------------------------*/
476/*----------------------------------------------------------------------------*/
477
478void
480
481/*----------------------------------------------------------------------------*/
482
484
485#endif /* __CS_GUI_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:359
#define END_C_DECLS
Definition: cs_defs.h:543
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:368
@ vel
Definition: cs_field_pointer.h:70
void cs_gui_porous_model(void)
Definition: cs_gui.cpp:4283
void cs_gui_initial_conditions(void)
Apply initial conditions based on GUI-defined settings.
Definition: cs_gui.cpp:2790
void cs_gui_equation_parameters(void)
Definition: cs_gui.cpp:2157
void cs_gui_time_tables(void)
Read GUI defined time tables.
Definition: cs_gui.cpp:5675
void cs_gui_scalar_source_terms(cs_field_t *f, const cs_real_t *pvar, cs_real_t *tsexp, cs_real_t *tsimp)
void cs_gui_pressure_drop_by_zone(void)
Definition: cs_gui.cpp:5241
void cs_gui_checkpoint_parameters(void)
Read GUi-defined Checkpoint parameters.
Definition: cs_gui.cpp:2114
void cs_gui_parallel_io(void)
Definition: cs_gui.cpp:3804
void cs_gui_momentum_source_terms(const cs_real_3_t *vel, cs_real_3_t *tsexp, cs_real_33_t *tsimp)
void cs_gui_finalize(void)
Definition: cs_gui.cpp:2269
void cs_gui_dt(void)
Definition: cs_gui.cpp:1883
cs_equation_param_t * cs_gui_get_equation_param(const char *name)
Definition: cs_gui.cpp:2292
void cs_gui_thermal_source_terms(cs_field_t *f, const cs_real_t *pvar, cs_real_t *tsexp, cs_real_t *tsimp)
void cs_gui_internal_coupling(void)
Definition: cs_gui.cpp:5381
void cs_gui_properties_value(const char *property_name, double *value)
Definition: cs_gui.cpp:4319
void cs_gui_physical_variable(void)
Definition: cs_gui.cpp:5792
void cs_gui_turb_model(void)
Definition: cs_gui.cpp:4738
void cs_gui_time_moments(void)
Definition: cs_gui.cpp:4532
void cs_gui_porosity(void)
Definition: cs_gui.cpp:2036
void cs_gui_properties_value_by_fluid_id(const int fluid_id, const char *property_name, double *value)
Definition: cs_gui.cpp:4345
void cs_gui_physical_properties(void)
Definition: cs_gui.cpp:4031
void cs_gui_hydrostatic_equ_param(void)
Definition: cs_gui.cpp:1926
void cs_gui_user_variables(void)
Definition: cs_gui.cpp:4931
void cs_gui_linear_solvers(void)
Definition: cs_gui.cpp:3396
void cs_gui_scalar_model_settings(void)
Definition: cs_gui.cpp:4380
void cs_gui_fluid_properties_value(const char *param, double *value)
Definition: cs_gui.cpp:2315
void cs_gui_hydrostatic_pressure(void)
Definition: cs_gui.cpp:1904
void cs_gui_calculator_functions(void)
Definition: cs_gui.cpp:5020
void cs_gui_turbomachinery(void)
Definition: cs_gui.cpp:4632
void cs_gui_numerical_options(void)
Definition: cs_gui.cpp:3679
void cs_gui_user_arrays(void)
Definition: cs_gui.cpp:4992
int cs_gui_thermal_model_code(void)
Definition: cs_gui.cpp:4495
void cs_gui_dt_param(void)
Definition: cs_gui.cpp:1949
void cs_gui_zones(void)
Definition: cs_gui.cpp:5067
void cs_gui_define_fans(void)
Definition: cs_gui.cpp:5263
void cs_gui_balance_by_zone(void)
Definition: cs_gui.cpp:5212
void cs_gui_error_estimator(void)
Definition: cs_gui.cpp:5329
void cs_gui_usage_log(void)
Definition: cs_gui.cpp:4903
void cs_gui_cp_params(void)
Definition: cs_gui.cpp:1791
void cs_gui_turb_ref_values(void)
Definition: cs_gui.cpp:4864
void cs_gui_turbomachinery_rotor(void)
Definition: cs_gui.cpp:4647
void cs_gui_laminar_viscosity(void)
Definition: cs_gui.cpp:1814
void cs_gui_partition(void)
Definition: cs_gui.cpp:3871
void cs_gui_head_losses(const cs_zone_t *zone, const cs_real_3_t *cvara_vel, cs_real_t cku[][6])
Compute GUI-defined head losses for a given volume zone.
Definition: cs_gui.cpp:2719
void cs_gui_mpi_algorithms(void)
Definition: cs_gui.cpp:3967
void cs_gui_physical_constants(void)
Definition: cs_gui.cpp:3992
void cs_gui_thermal_model(void)
Definition: cs_gui.cpp:4450
void cs_gui_groundwater_property_laws(int permeability, int diffusion, int unsaturated)
Definition: cs_gui.cpp:2335
const cs_gui_volume_meg_context_t * cs_gui_add_volume_meg_context(const cs_zone_t *zone, const cs_field_t *fields[], const int n_fields)
Add new volume MEG function context info.
Definition: cs_gui.cpp:5466
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:192
Field descriptor.
Definition: cs_field.h:131
Definition: cs_gui.h:49
const cs_zone_t * zone
Definition: cs_gui.h:51
const cs_field_t ** fields
Definition: cs_gui.h:52
Definition: cs_zone.h:55