8.2
general documentation
Loading...
Searching...
No Matches
cs_elec_model.h
Go to the documentation of this file.
1#ifndef __CS_ELEC_MODEL_H__
2#define __CS_ELEC_MODEL_H__
3
4/*============================================================================
5 * General parameters management.
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_defs.h"
35
36#include "cs_domain.h"
37#include "cs_mesh.h"
38#include "cs_mesh_quantities.h"
39
40/*----------------------------------------------------------------------------*/
41
43
44/*=============================================================================
45 * Macro definitions
46 *============================================================================*/
47
48/*============================================================================
49 * Type definitions
50 *============================================================================*/
51
52/*----------------------------------------------------------------------------
53 * Structure to read properties in dp_ELE
54 *----------------------------------------------------------------------------*/
55
70
71/*----------------------------------------------------------------------------
72 * Structure to read transformer parameters in dp_ELE
73 *----------------------------------------------------------------------------*/
74
93
94/*----------------------------------------------------------------------------
95 * Electrical model options descriptor
96 *----------------------------------------------------------------------------*/
97
117
118/*============================================================================
119 * Static global variables
120 *============================================================================*/
121
122/* Pointer to electrical model options structure */
123
127
128/* Constant for electrical models */
129
130extern const cs_real_t cs_elec_permvi;
131extern const cs_real_t cs_elec_epszer;
132
133/*=============================================================================
134 * Public function prototypes for Fortran API
135 *============================================================================*/
136
137void
138CS_PROCF (elini1, ELINI1) (void);
139
140void
141CS_PROCF (elthht, ELTHHT) (int *mode,
142 cs_real_t *ym,
143 cs_real_t *enthal,
144 cs_real_t *temp);
145
146void
147CS_PROCF (ellecd, ELLECD) (void);
148
149void
150CS_PROCF (elphyv, ELPHYV) (void);
151
152void
153CS_PROCF (eltssc, ELTSSC) (const int *isca,
154 cs_real_t *smbrs);
155
156void
157CS_PROCF (eliniv, ELINIV) (int *isuite);
158
159/*=============================================================================
160 * Public function prototypes
161 *============================================================================*/
162
163/*----------------------------------------------------------------------------
164 * Provide access to cs_elec_option
165 *----------------------------------------------------------------------------*/
166
169
170/*----------------------------------------------------------------------------
171 * Provide access to cs_glob_transformer
172 *----------------------------------------------------------------------------*/
173
176
177/*----------------------------------------------------------------------------
178 * Initialize structures for electrical model
179 *----------------------------------------------------------------------------*/
180
181void
183
184/*----------------------------------------------------------------------------
185 * Destroy structures for electrical model
186 *----------------------------------------------------------------------------*/
187
188void
190
191/*----------------------------------------------------------------------------
192 * Specific initialization for electric arc
193 *----------------------------------------------------------------------------*/
194
195void
197
198/*----------------------------------------------------------------------------
199 * Read properties file
200 *----------------------------------------------------------------------------*/
201
202void
204
205/*----------------------------------------------------------------------------
206 * compute specific electric arc fields
207 *----------------------------------------------------------------------------*/
208
209void
211 int call_id);
212
213/*----------------------------------------------------------------------------
214 * compute physical properties
215 *----------------------------------------------------------------------------*/
216
217void
219
220/*----------------------------------------------------------------------------
221 * compute source terms for energy
222 *----------------------------------------------------------------------------*/
223
224void
226 const cs_mesh_quantities_t *mesh_quantities,
227 int f_id,
228 cs_real_t *smbrs);
229
230/*----------------------------------------------------------------------------
231 * compute source terms for vector potential
232 *----------------------------------------------------------------------------*/
233
234void
236 const cs_mesh_quantities_t *mesh_quantities,
237 int f_id,
238 cs_real_3_t *smbrv);
239
240/*----------------------------------------------------------------------------
241 * add variables fields
242 *----------------------------------------------------------------------------*/
243
244void
246
247/*----------------------------------------------------------------------------
248 * add properties fields
249 *----------------------------------------------------------------------------*/
250
251void
253
254/*----------------------------------------------------------------------------
255 * initialize electric fields
256 *----------------------------------------------------------------------------*/
257
258void
260 int isuite);
261
262/*----------------------------------------------------------------------------
263 * scaling electric quantities
264 *----------------------------------------------------------------------------*/
265
266void
268 const cs_mesh_quantities_t *mesh_quantities,
269 cs_real_t *dt);
270
271/*----------------------------------------------------------------------------*/
281/*----------------------------------------------------------------------------*/
282
283void
285 cs_real_t t[]);
286
287/*----------------------------------------------------------------------------*/
296/*----------------------------------------------------------------------------*/
297
300 cs_real_t enthal);
301
302/*----------------------------------------------------------------------------*/
312/*----------------------------------------------------------------------------*/
313
314void
316 cs_real_t h[]);
317
318/*----------------------------------------------------------------------------*/
330/*----------------------------------------------------------------------------*/
331
332void
334 const cs_lnum_t face_ids[],
335 const cs_real_t t[],
336 cs_real_t h[]);
337
338/*----------------------------------------------------------------------------*/
347/*----------------------------------------------------------------------------*/
348
351 cs_real_t temp);
352
353/*----------------------------------------------------------------------------*/
358/*----------------------------------------------------------------------------*/
359
360void
362
363/*----------------------------------------------------------------------------*/
364
366
367#endif /* __CS_ELEC_MODEL_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:528
double cs_real_t
Floating-point value.
Definition cs_defs.h:332
#define CS_PROCF(x, y)
Definition cs_defs.h:560
#define END_C_DECLS
Definition cs_defs.h:529
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:325
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition cs_defs.h:347
void eliniv(int *isuite)
Definition cs_elec_model.c:719
void elini1(void)
Definition cs_elec_model.c:683
const cs_real_t cs_elec_epszer
Definition cs_elec_model.c:279
void elphyv(void)
Definition cs_elec_model.c:713
void ellecd(void)
Definition cs_elec_model.c:706
const cs_real_t cs_elec_permvi
Definition cs_elec_model.c:273
void elthht(int *mode, cs_real_t *ym, cs_real_t *enthal, cs_real_t *temp)
Definition cs_elec_model.c:689
void cs_elec_add_property_fields(void)
Definition cs_elec_model.c:1904
cs_elec_option_t * cs_get_glob_elec_option(void)
Definition cs_elec_model.c:733
void cs_elec_source_terms(const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities, int f_id, cs_real_t *smbrs)
Definition cs_elec_model.c:1717
void cs_electrical_properties_read(void)
Definition cs_elec_model.c:919
cs_real_t cs_elec_convert_t_to_h(const cs_real_t ym[], cs_real_t temp)
Convert single temperature value to enthalpy.
Definition cs_elec_model.c:2487
const cs_data_elec_t * cs_glob_elec_properties
void cs_electrical_model_initialize(void)
Definition cs_elec_model.c:753
void cs_elec_add_variable_fields(void)
Definition cs_elec_model.c:1810
void cs_elec_convert_t_to_h_cells(const cs_real_t t[], cs_real_t h[])
Convert temperature to enthalpy at all cells.
Definition cs_elec_model.c:2376
const cs_data_joule_effect_t * cs_glob_transformer
void cs_elec_define_functions(void)
Create or access function objects specific to electric arcs models.
Definition cs_elec_model.c:2535
void cs_electrical_model_finalize(void)
Definition cs_elec_model.c:797
void cs_elec_physical_properties(cs_domain_t *domain)
Definition cs_elec_model.c:1111
void cs_elec_convert_t_to_h_faces(const cs_lnum_t n_faces, const cs_lnum_t face_ids[], const cs_real_t t[], cs_real_t h[])
Convert temperature to enthalpy at selected boundary faces.
Definition cs_elec_model.c:2430
const cs_elec_option_t * cs_glob_elec_option
void cs_elec_compute_fields(const cs_mesh_t *mesh, int call_id)
Definition cs_elec_model.c:1437
cs_real_t cs_elec_convert_h_to_t(const cs_real_t ym[], cs_real_t enthal)
Convert single enthalpy value to temperature.
Definition cs_elec_model.c:2317
void eltssc(const int *isca, cs_real_t *smbrs)
void cs_electrical_model_specific_initialization(void)
Definition cs_elec_model.c:834
void cs_elec_fields_initialize(const cs_mesh_t *mesh, int isuite)
Definition cs_elec_model.c:2028
void cs_elec_convert_h_to_t_faces(const cs_real_t h[], cs_real_t t[])
Convert enthalpy to temperature at all boundary faces.
Definition cs_elec_model.c:2262
cs_data_joule_effect_t * cs_get_glob_transformer(void)
Definition cs_elec_model.c:743
void cs_elec_scaling_function(const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities, cs_real_t *dt)
Definition cs_elec_model.c:2075
void cs_elec_source_terms_v(const cs_mesh_t *mesh, const cs_mesh_quantities_t *mesh_quantities, int f_id, cs_real_3_t *smbrv)
Definition cs_elec_model.c:1778
@ t
Definition cs_field_pointer.h:92
@ h
Definition cs_field_pointer.h:91
@ dt
Definition cs_field_pointer.h:65
Definition mesh.f90:26
physical properties for electric model descriptor.
Definition cs_elec_model.h:56
cs_real_t * ehgaz
Definition cs_elec_model.h:61
cs_real_t * th
Definition cs_elec_model.h:60
cs_real_t * xkabel
Definition cs_elec_model.h:67
int ngaz
Definition cs_elec_model.h:58
cs_real_t * sigel
Definition cs_elec_model.h:64
cs_real_t * cpel
Definition cs_elec_model.h:63
cs_real_t * visel
Definition cs_elec_model.h:65
int npoint
Definition cs_elec_model.h:59
cs_real_t * xlabel
Definition cs_elec_model.h:66
cs_real_t * rhoel
Definition cs_elec_model.h:62
Structure to read transformer parameters in dp_ELE.
Definition cs_elec_model.h:75
cs_real_t * zr
Definition cs_elec_model.h:87
int * ielecb
Definition cs_elec_model.h:80
int * ibrsec
Definition cs_elec_model.h:84
int ntfref
Definition cs_elec_model.h:82
int * ielecc
Definition cs_elec_model.h:78
cs_real_t * tenspr
Definition cs_elec_model.h:85
int * ibrpr
Definition cs_elec_model.h:83
int * ielect
Definition cs_elec_model.h:79
cs_real_t * zi
Definition cs_elec_model.h:88
int nbtrf
Definition cs_elec_model.h:81
cs_real_t * uroff
Definition cs_elec_model.h:89
cs_real_t * uioff
Definition cs_elec_model.h:90
int nbelec
Definition cs_elec_model.h:77
cs_real_t * rnbs
Definition cs_elec_model.h:86
Structure storing the main features of the computational domain and pointers to the main geometrical ...
Definition cs_domain.h:138
option for electric model
Definition cs_elec_model.h:98
cs_real_t crit_reca[5]
Definition cs_elec_model.h:104
int * izreca
Definition cs_elec_model.h:108
int ntdcla
Definition cs_elec_model.h:101
cs_real_t srrom
Definition cs_elec_model.h:114
cs_real_t coejou
Definition cs_elec_model.h:112
int modrec
Definition cs_elec_model.h:106
int idreca
Definition cs_elec_model.h:107
int ixkabe
Definition cs_elec_model.h:100
int irestrike
Definition cs_elec_model.h:102
int ielcor
Definition cs_elec_model.h:105
cs_real_t puisim
Definition cs_elec_model.h:111
cs_real_t couimp
Definition cs_elec_model.h:109
cs_real_t pot_diff
Definition cs_elec_model.h:110
cs_real_t restrike_point[3]
Definition cs_elec_model.h:103
cs_real_t elcou
Definition cs_elec_model.h:113
Definition cs_mesh_quantities.h:92
Definition cs_mesh.h:85