9.0
general documentation
Loading...
Searching...
No Matches
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-2025 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 "base/cs_base.h"
36#include "base/cs_field.h"
37#include "base/cs_zone.h"
38
39/*----------------------------------------------------------------------------*/
40
42
43#define GUI_STR(str) #str
44
45/*============================================================================
46 * Type definitions
47 *============================================================================*/
48
50
51typedef struct {
52
53 const cs_zone_t *zone; /*<! Pointer to zone */
54 const cs_field_t **fields; /*<! Array of field pointers (NULL-terminated) */
55
57
58/*============================================================================
59 * Public function prototypes
60 *============================================================================*/
61
62/*----------------------------------------------------------------------------
63 * Specific heat variable or constant indicator.
64 *----------------------------------------------------------------------------*/
65
66void
67cs_gui_cp_params (void);
68
69/*----------------------------------------------------------------------------
70 * Constant or variable indicator for the user scalar laminar viscosity.
71 *----------------------------------------------------------------------------*/
72
73void
75
76/*----------------------------------------------------------------------------
77 * Time passing parameter.
78 *----------------------------------------------------------------------------*/
79
80void
81cs_gui_dt(void);
82
83/*----------------------------------------------------------------------------
84 * Hydrostatic pressure parameter.
85 *----------------------------------------------------------------------------*/
86
87void
89
90/*----------------------------------------------------------------------------
91 * Hydrostatic equilibrium parameter.
92 *----------------------------------------------------------------------------*/
93
94void
96
97/*----------------------------------------------------------------------------
98 * Time passing parameters.
99 *----------------------------------------------------------------------------*/
100
101void
102cs_gui_dt_param(void);
103
104/*----------------------------------------------------------------------------
105 * Define porosity.
106 *----------------------------------------------------------------------------*/
107
108void
109cs_gui_porosity(void);
110
111/*----------------------------------------------------------------------------*/
115/*----------------------------------------------------------------------------*/
116
117void
119
120/*----------------------------------------------------------------------------
121 * Space scheme options, linear solver precision and time step factor
122 *----------------------------------------------------------------------------*/
123
124void
126
127/*-----------------------------------------------------------------------------
128 * Free memory: clean global private variables.
129 *----------------------------------------------------------------------------*/
130
131void
132cs_gui_finalize(void);
133
134/*----------------------------------------------------------------------------
135 * Return a pointer to equation parameters based on a field or equation name.
136 *
137 * parameters:
138 * name <-- field or equation name
139 *
140 * return:
141 * pointer to matching child string
142 *----------------------------------------------------------------------------*/
143
145cs_gui_get_equation_param(const char *name);
146
147/*-----------------------------------------------------------------------------
148 * Get value of reference fluid properties parameter.
149 *
150 * parameters:
151 * name <-- parameter name
152 * value --> parameter value
153 *----------------------------------------------------------------------------*/
154
155void
156cs_gui_fluid_properties_value(const char *param,
157 double *value);
158
159/*----------------------------------------------------------------------------
160 * Groundwater model : read laws for capacity, saturation and permeability
161 *
162 * parameters:
163 * permeability <-- permeability type
164 * diffusion <-- diffusion type
165 * unsaturated <-- unsaturated zone taken into account
166 *----------------------------------------------------------------------------*/
167
168void
169cs_gui_groundwater_property_laws(int permeability,
170 int diffusion,
171 int unsaturated);
172
173/*----------------------------------------------------------------------------*/
184/*----------------------------------------------------------------------------*/
185
186void
187cs_gui_head_losses(const cs_zone_t *zone,
188 const cs_real_3_t *cvara_vel,
189 cs_real_t cku[][6]);
190
191/*----------------------------------------------------------------------------*/
195/*----------------------------------------------------------------------------*/
196
197void
199
200/*-----------------------------------------------------------------------------
201 * Selection of linear solvers.
202 *----------------------------------------------------------------------------*/
203
204void
206
207/*----------------------------------------------------------------------------
208 * User momentum source terms.
209 *
210 * parameters:
211 * vel <-- fluid velocity
212 * tsexp --> explicit source terms
213 * tsimp --> implicit source terms
214 *----------------------------------------------------------------------------*/
215
216void
218 cs_real_3_t *tsexp,
219 cs_real_33_t *tsimp);
220
221/*-----------------------------------------------------------------------------
222 * Define global numerical options.
223 *----------------------------------------------------------------------------*/
224
225void
227
228/*-----------------------------------------------------------------------------
229 * Define parallel IO settings.
230 *----------------------------------------------------------------------------*/
231
232void
234
235/*-----------------------------------------------------------------------------
236 * Set partitioning options.
237 *----------------------------------------------------------------------------*/
238
239void
240cs_gui_partition(void);
241
242/*-----------------------------------------------------------------------------
243 * Set MPI related algorithm options
244 *----------------------------------------------------------------------------*/
245
246void
248
249/*----------------------------------------------------------------------------
250 * Treatment of physical constants (gravity and Coriolis).
251 *----------------------------------------------------------------------------*/
252
253void
255
256/*----------------------------------------------------------------------------
257 * Treatment of gravity and fluid physical properties
258 * Initialize reference pressure and temperature if present
259 *----------------------------------------------------------------------------*/
260
261void
263
264/*----------------------------------------------------------------------------
265 * User law for material properties
266 *----------------------------------------------------------------------------*/
267
268void
270
271/*----------------------------------------------------------------------------
272 * Determine porosity model type
273 *----------------------------------------------------------------------------*/
274
275void
277
278/*-----------------------------------------------------------------------------
279 * Get initial value from property markup.
280 *
281 * parameters:
282 * property_name <-- name of the property
283 * value --> new initial value of the property
284 *----------------------------------------------------------------------------*/
285
286void
287cs_gui_properties_value(const char *property_name,
288 double *value);
289
290/*-----------------------------------------------------------------------------
291 * Get value of property markup for fluid of given id
292 *
293 * parameters:
294 * fluid_id <-- fluid index
295 * property_name <-- name of the property
296 * value --> new initial value of the property
297 *----------------------------------------------------------------------------*/
298
299void
300cs_gui_properties_value_by_fluid_id(const int fluid_id,
301 const char *property_name,
302 double *value);
303
304/*----------------------------------------------------------------------------
305 * Read minimum / maximum values (used in clipping) and turbulent flux model
306 * for additional user or model variables.
307 *
308 * Also read reference dynamic and user scalar viscosity
309 *----------------------------------------------------------------------------*/
310
311void
313
314/*----------------------------------------------------------------------------
315 * Thermal model.
316 *----------------------------------------------------------------------------*/
317
318void
320
321/*----------------------------------------------------------------------------
322 * Get thermal scalar model.
323 *
324 * return:
325 * value of itherm*10 + (temperature variant flag), or -1 if not defined
326 *----------------------------------------------------------------------------*/
327
328int
330
331/*----------------------------------------------------------------------------
332 * Time moments definition
333 *----------------------------------------------------------------------------*/
334
335void
337
338/*-----------------------------------------------------------------------------
339 * Set turbomachinery model
340 *----------------------------------------------------------------------------*/
341
342void
344
345/*-----------------------------------------------------------------------------
346 * Set turbomachinery options.
347 *----------------------------------------------------------------------------*/
348
349void
351
352/*----------------------------------------------------------------------------
353 * Turbulence model
354 *----------------------------------------------------------------------------*/
355
356void
358
359/*----------------------------------------------------------------------------
360 * Define reference length and reference velocity for the initialization of
361 * the turbulence variables
362 *----------------------------------------------------------------------------*/
363
364void
366
367/*----------------------------------------------------------------------------
368 * Logging output for MEI usage.
369 *----------------------------------------------------------------------------*/
370
371void
372cs_gui_usage_log(void);
373
374/*----------------------------------------------------------------------------
375 * Define user variables through the GUI.
376 *----------------------------------------------------------------------------*/
377
378void
380
381/*----------------------------------------------------------------------------
382 * Define user arrays through the GUI.
383 *----------------------------------------------------------------------------*/
384
385void
387
388/*----------------------------------------------------------------------------
389 * Define user calculator functions through the GUI
390 *----------------------------------------------------------------------------*/
391
392void
394
395/*----------------------------------------------------------------------------
396 * Define balance by zone through the GUI.
397 *----------------------------------------------------------------------------*/
398
399void
401
402/*----------------------------------------------------------------------------
403 * Define pressure drop through the GUI.
404 *----------------------------------------------------------------------------*/
405
406void
408
409/*----------------------------------------------------------------------------
410 * Define fans through the GUI.
411 *----------------------------------------------------------------------------*/
412
413void
415
416/*----------------------------------------------------------------------------
417 * Define error estimator through the GUI.
418 *----------------------------------------------------------------------------*/
419
420void
422
423/*----------------------------------------------------------------------------
424 * Define volume and boundary zones through the GUI.
425 *----------------------------------------------------------------------------*/
426
427void
428cs_gui_zones(void);
429
430/*----------------------------------------------------------------------------
431 * Define internal coupling through the GUI.
432 *----------------------------------------------------------------------------*/
433
434void
436
437/*----------------------------------------------------------------------------*/
447/*----------------------------------------------------------------------------*/
448
451 const cs_field_t *fields[],
452 const int n_fields);
453
454/*----------------------------------------------------------------------------
455 * Define user scalar source terms.
456 *----------------------------------------------------------------------------*/
457
458void
460 const cs_real_t *pvar,
461 cs_real_t *tsexp,
462 cs_real_t *tsimp);
463
464/*----------------------------------------------------------------------------
465 * Compute user defined thermal scalar source terms (GUI)
466 *----------------------------------------------------------------------------*/
467
468void
470 const cs_real_t *pvar,
471 cs_real_t *tsexp,
472 cs_real_t *tsimp);
473
474/*----------------------------------------------------------------------------*/
475/*
476 * Define thermal scalar source terms as xdef
477 */
478/*----------------------------------------------------------------------------*/
479
480void
482
483/*----------------------------------------------------------------------------*/
487/*----------------------------------------------------------------------------*/
488
489void
491
492/*----------------------------------------------------------------------------*/
493
495
496#endif /* __CS_GUI_H__ */
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition cs_defs.h:368
#define BEGIN_C_DECLS
Definition cs_defs.h:542
double cs_real_t
Floating-point value.
Definition cs_defs.h:342
#define END_C_DECLS
Definition cs_defs.h:543
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition cs_defs.h:359
@ vel
Definition cs_field_pointer.h:70
void cs_gui_porous_model(void)
Definition cs_gui.cpp:4295
void cs_gui_initial_conditions(void)
Apply initial conditions based on GUI-defined settings.
Definition cs_gui.cpp:2781
void cs_gui_equation_parameters(void)
Definition cs_gui.cpp:2149
void cs_gui_time_tables(void)
Read GUI defined time tables.
Definition cs_gui.cpp:5750
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:5254
void cs_gui_checkpoint_parameters(void)
Read GUi-defined Checkpoint parameters.
Definition cs_gui.cpp:2113
void cs_gui_parallel_io(void)
Definition cs_gui.cpp:3798
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:2261
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:2284
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:5394
void cs_gui_properties_value(const char *property_name, double *value)
Definition cs_gui.cpp:4331
void cs_gui_physical_variable(void)
Definition cs_gui.cpp:5867
void cs_gui_turb_model(void)
Definition cs_gui.cpp:4750
void cs_gui_time_moments(void)
Definition cs_gui.cpp:4544
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:4357
void cs_gui_physical_properties(void)
Definition cs_gui.cpp:4025
void cs_gui_hydrostatic_equ_param(void)
Definition cs_gui.cpp:1926
void cs_gui_user_variables(void)
Definition cs_gui.cpp:4943
void cs_gui_linear_solvers(void)
Definition cs_gui.cpp:3391
void cs_gui_scalar_model_settings(void)
Definition cs_gui.cpp:4392
void cs_gui_fluid_properties_value(const char *param, double *value)
Definition cs_gui.cpp:2307
void cs_gui_hydrostatic_pressure(void)
Definition cs_gui.cpp:1904
void cs_gui_calculator_functions(void)
Definition cs_gui.cpp:5032
void cs_gui_turbomachinery(void)
Definition cs_gui.cpp:4644
void cs_gui_numerical_options(void)
Definition cs_gui.cpp:3673
void cs_gui_user_arrays(void)
Definition cs_gui.cpp:5004
int cs_gui_thermal_model_code(void)
Definition cs_gui.cpp:4507
void cs_gui_dt_param(void)
Definition cs_gui.cpp:1949
void cs_gui_zones(void)
Definition cs_gui.cpp:5080
void cs_gui_define_fans(void)
Definition cs_gui.cpp:5276
void cs_gui_balance_by_zone(void)
Definition cs_gui.cpp:5225
void cs_gui_error_estimator(void)
Definition cs_gui.cpp:5342
void cs_gui_usage_log(void)
Definition cs_gui.cpp:4915
void cs_gui_cp_params(void)
Definition cs_gui.cpp:1791
void cs_gui_thermal_source_terms_setup(void)
Define thermal scalar source terms as xdef.
Definition cs_gui.cpp:5685
void cs_gui_turb_ref_values(void)
Definition cs_gui.cpp:4876
void cs_gui_turbomachinery_rotor(void)
Definition cs_gui.cpp:4659
void cs_gui_laminar_viscosity(void)
Definition cs_gui.cpp:1814
void cs_gui_partition(void)
Definition cs_gui.cpp:3865
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:2710
void cs_gui_mpi_algorithms(void)
Definition cs_gui.cpp:3961
void cs_gui_physical_constants(void)
Definition cs_gui.cpp:3986
void cs_gui_thermal_model(void)
Definition cs_gui.cpp:4462
void cs_gui_groundwater_property_laws(int permeability, int diffusion, int unsaturated)
Definition cs_gui.cpp:2327
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:5479
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition cs_equation_param.h:193
Field descriptor.
Definition cs_field.h:158
Definition cs_gui.h:51
const cs_zone_t * zone
Definition cs_gui.h:53
const cs_field_t ** fields
Definition cs_gui.h:54
Definition cs_zone.h:55