9.1
general documentation
cs_mobile_structures.h
Go to the documentation of this file.
1#ifndef __CS_MOBILE_STRUCTURES_H__
2#define __CS_MOBILE_STRUCTURES_H__
3
4/*============================================================================
5 * Mobile structures management.
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_defs.h"
35
36#include "base/cs_restart.h"
38#include "base/cs_time_plot.h"
39
40/*----------------------------------------------------------------------------*/
41
43
44/* Bit values for mobile boundary
45 ----------------------------- */
46
47typedef enum {
48 CS_STRUCTURE_NONE = 1 << 0, /* No structure*/
53
55/*-------------------------*/
56
57typedef struct {
58
59 /* Base structure definitions and input */
60
78 /* Output (plotting) control */
79
80 int plot;
89 /* Computed structure values */
90
111 /* Association with mesh */
112
113 int *idfstr;
115 cs_mobile_structure_type_t *idftype; /* structure type associated to each
116 * boundary face */
117
118 /* Plotting */
119
122 cs_time_plot_t **plot_files[2];
125
126/*=============================================================================
127 * Macro definitions
128 *============================================================================*/
129
130/*============================================================================
131 * Type definitions
132 *============================================================================*/
133
134/*============================================================================
135 * Global variables
136 *============================================================================*/
137
140
143
145
146/*=============================================================================
147 * Public function prototypes
148 *============================================================================*/
149
150/*----------------------------------------------------------------------------*/
154/*----------------------------------------------------------------------------*/
155
156void
158
159/*----------------------------------------------------------------------------*/
163/*----------------------------------------------------------------------------*/
164
165void
167
168/*----------------------------------------------------------------------------*/
172/*----------------------------------------------------------------------------*/
173
174void
176
177/*----------------------------------------------------------------------------*/
181/*----------------------------------------------------------------------------*/
182
183void
185
186/*----------------------------------------------------------------------------*/
192/*----------------------------------------------------------------------------*/
193
194int
196
197/*----------------------------------------------------------------------------*/
203/*----------------------------------------------------------------------------*/
204
205int
207
208/*----------------------------------------------------------------------------*/
214/*----------------------------------------------------------------------------*/
215
216int
218
219/*----------------------------------------------------------------------------*/
228/*----------------------------------------------------------------------------*/
229
230void
231cs_mobile_structures_add_n_int_structures(const int n_structures);
232
233/*----------------------------------------------------------------------------*/
242/*----------------------------------------------------------------------------*/
243
244void
245cs_mobile_structures_add_n_ext_structures(const int n_structures);
246
247/*----------------------------------------------------------------------------*/
256/*----------------------------------------------------------------------------*/
257
258void
259cs_mobile_structures_add_n_ast_structures(const int n_structures);
260
261/*----------------------------------------------------------------------------*/
269/*----------------------------------------------------------------------------*/
270
271void
273 cs_real_t beta,
275
276/*----------------------------------------------------------------------------*/
277/*
278 * \brief Predict displacement of mobile structures with ALE.
279 *
280 * \param[in] itrfin indicator for last iteration of implicit coupling
281 */
282/*----------------------------------------------------------------------------*/
283
284void
286
287/*----------------------------------------------------------------------------*/
297/*----------------------------------------------------------------------------*/
298
299void
301 int itrale,
302 int italim,
303 int ineefl,
304 int impale[]);
305
306/*----------------------------------------------------------------------------*/
314/*----------------------------------------------------------------------------*/
315
316void
318 int italim,
319 int *itrfin);
320
321/*----------------------------------------------------------------------------*/
327/*----------------------------------------------------------------------------*/
328
329void
331
332/*----------------------------------------------------------------------------*/
338/*----------------------------------------------------------------------------*/
339
340void
342
343/*----------------------------------------------------------------------------*/
344
346
347#endif /* __CS_MOBILE_STRUCTURES_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:554
double cs_real_t
Floating-point value.
Definition: cs_defs.h:357
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:374
#define END_C_DECLS
Definition: cs_defs.h:555
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:383
@ gamma
Definition: cs_field_pointer.h:201
cs_mobile_structures_t * _mobile_structures
void cs_mobile_structures_initialize(void)
Initialize mobile structures with ALE for internal coupling.
Definition: cs_mobile_structures.cpp:724
void cs_mobile_structures_log_setup(void)
Log structures and coupling information.
Definition: cs_mobile_structures.cpp:893
void cs_mobile_structures_displacement(int itrale, int italim, int *itrfin)
Displacement of mobile structures with ALE for internal coupling.
Definition: cs_mobile_structures.cpp:1551
int cs_mobile_structures_get_n_ext_structures(void)
Query number of external mobile structures defined.
Definition: cs_mobile_structures.cpp:1049
void cs_mobile_structures_finalize(void)
Finalize mobile structures with ALE for internal coupling.
Definition: cs_mobile_structures.cpp:877
int cs_mobile_structures_get_n_ast_structures(void)
Query number of aster mobile structures defined.
Definition: cs_mobile_structures.cpp:1069
void cs_mobile_structures_restart_write(cs_restart_t *r)
Write mobile structures data to checkpoint.
Definition: cs_mobile_structures.cpp:1951
double cs_glob_mobile_structures_i_eps
void cs_mobile_structures_restart_read(cs_restart_t *r)
Read mobile structures data to checkpoint.
Definition: cs_mobile_structures.cpp:1821
cs_mobile_structure_type_t
Definition: cs_mobile_structures.h:47
@ CS_STRUCTURE_EXTERNAL_USER
Definition: cs_mobile_structures.h:51
@ CS_STRUCTURE_NONE
Definition: cs_mobile_structures.h:48
@ CS_STRUCTURE_INTERNAL_0D
Definition: cs_mobile_structures.h:49
@ CS_STRUCTURE_EXTERNAL_CODE_ASTER
Definition: cs_mobile_structures.h:50
void cs_mobile_structures_set_newmark_coefficients(cs_real_t alpha, cs_real_t beta, cs_real_t gamma)
Set Newmark coefficients for internal mobile structures.
Definition: cs_mobile_structures.cpp:1165
void cs_mobile_structures_restore_previous_values(int itrfin)
Restore previous values in case of implicit coupling.
Definition: cs_mobile_structures.cpp:1207
int cs_glob_mobile_structures_n_iter_max
void cs_mobile_structures_add_n_int_structures(const int n_structures)
Add internal mobile structures.
Definition: cs_mobile_structures.cpp:1092
int cs_mobile_structures_get_n_int_structures(void)
Query number of internal mobile structures defined.
Definition: cs_mobile_structures.cpp:1030
void cs_mobile_structures_add_n_ext_structures(const int n_structures)
Add external mobile structures.
Definition: cs_mobile_structures.cpp:1118
void cs_mobile_structures_add_n_ast_structures(const int n_structures)
Add aster mobile structures.
Definition: cs_mobile_structures.cpp:1142
void cs_mobile_structures_setup(void)
Initialize mobile structures with ALE for internal coupling.
Definition: cs_mobile_structures.cpp:669
void cs_mobile_structures_prediction(cs_field_bc_coeffs_t *bc_coeffs_vel, int itrale, int italim, int ineefl, int impale[])
Predict displacement of mobile structures with ALE.
Definition: cs_mobile_structures.cpp:1331
struct _cs_restart_t cs_restart_t
Definition: cs_restart.h:95
struct _cs_time_plot_t cs_time_plot_t
Definition: cs_time_plot.h:48
Field boundary condition descriptor (for variables)
Definition: cs_field.h:120
Definition: cs_mobile_structures.h:57
cs_real_3_t * xsta
Definition: cs_mobile_structures.h:93
cs_real_t aexxst
Definition: cs_mobile_structures.h:65
cs_real_33_t * xmstru
Definition: cs_mobile_structures.h:74
cs_real_t gamnmk
Definition: cs_mobile_structures.h:72
int plot
Definition: cs_mobile_structures.h:80
cs_real_t * dtsta
Definition: cs_mobile_structures.h:109
cs_real_3_t * xstr
Definition: cs_mobile_structures.h:91
cs_mobile_structure_type_t * idftype
Definition: cs_mobile_structures.h:115
cs_real_3_t * xstp
Definition: cs_mobile_structures.h:94
int n_ast_structs
Definition: cs_mobile_structures.h:63
cs_real_3_t * forsta
Definition: cs_mobile_structures.h:105
int n_plots
Definition: cs_mobile_structures.h:120
cs_real_3_t * forstr
Definition: cs_mobile_structures.h:104
cs_real_t * dtstr
Definition: cs_mobile_structures.h:108
int n_int_structs
Definition: cs_mobile_structures.h:61
cs_real_t bexxst
Definition: cs_mobile_structures.h:66
int * idfstr
Definition: cs_mobile_structures.h:113
int n_ext_structs
Definition: cs_mobile_structures.h:62
cs_real_33_t * xcstru
Definition: cs_mobile_structures.h:75
cs_real_3_t * xppsta
Definition: cs_mobile_structures.h:101
cs_time_control_t plot_time_control
Definition: cs_mobile_structures.h:86
cs_real_3_t * xpsta
Definition: cs_mobile_structures.h:98
cs_real_3_t * xstreq
Definition: cs_mobile_structures.h:95
cs_real_t alpnmk
Definition: cs_mobile_structures.h:70
cs_real_t cfopre
Definition: cs_mobile_structures.h:68
cs_real_t betnmk
Definition: cs_mobile_structures.h:71
cs_real_3_t * xpstr
Definition: cs_mobile_structures.h:97
cs_real_3_t * forstp
Definition: cs_mobile_structures.h:106
cs_real_3_t * xppstr
Definition: cs_mobile_structures.h:100
cs_real_33_t * xkstru
Definition: cs_mobile_structures.h:76
char * plot_dir_name
Definition: cs_mobile_structures.h:87
Definition: cs_time_control.h:96