My Project
programmer's documentation
Loading...
Searching...
No Matches
cs_navsto_system.h
Go to the documentation of this file.
1#ifndef __CS_NAVSTO_SYSTEM_H__
2#define __CS_NAVSTO_SYSTEM_H__
3
4/*============================================================================
5 * Routines to handle cs_navsto_system_t structure
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 * Local headers
30 *----------------------------------------------------------------------------*/
31
32#include "cs_advection_field.h"
33#include "cs_equation.h"
34#include "cs_field.h"
35#include "cs_param.h"
36#include "cs_property.h"
37#include "cs_mesh.h"
38#include "cs_navsto_param.h"
39#include "cs_time_step.h"
40#include "cs_xdef.h"
41
42/*----------------------------------------------------------------------------*/
43
45
52/*============================================================================
53 * Macro definitions
54 *============================================================================*/
55
56/*============================================================================
57 * Type definitions
58 *============================================================================*/
59
60/*----------------------------------------------------------------------------*/
73/*----------------------------------------------------------------------------*/
74
75typedef void *
77 cs_boundary_type_t *fb_type,
78 void *nscc);
79
80/*----------------------------------------------------------------------------*/
90/*----------------------------------------------------------------------------*/
91
92typedef void *
93(cs_navsto_free_scheme_context_t)(void *scheme_context);
94
95/*----------------------------------------------------------------------------*/
106/*----------------------------------------------------------------------------*/
107
108typedef void
110 const cs_cdo_quantities_t *quant,
111 const cs_time_step_t *ts,
113
114/*----------------------------------------------------------------------------*/
124/*----------------------------------------------------------------------------*/
125
126typedef void
128 const cs_navsto_param_t *nsp,
129 void *scheme_context);
130
131/*=============================================================================
132 * Local Macro definitions and structure definitions
133 *============================================================================*/
134
249
250/*============================================================================
251 * Public function prototypes
252 *============================================================================*/
253
254/*----------------------------------------------------------------------------*/
261/*----------------------------------------------------------------------------*/
262
263bool
265
266/*----------------------------------------------------------------------------*/
277/*----------------------------------------------------------------------------*/
278
283 cs_navsto_param_coupling_t algo_coupling);
284
285/*----------------------------------------------------------------------------*/
289/*----------------------------------------------------------------------------*/
290
291void
293
294/*----------------------------------------------------------------------------*/
301/*----------------------------------------------------------------------------*/
302
305
306/*----------------------------------------------------------------------------*/
312/*----------------------------------------------------------------------------*/
313
316
317/*----------------------------------------------------------------------------*/
323/*----------------------------------------------------------------------------*/
324
325void
327
328/*----------------------------------------------------------------------------*/
337/*----------------------------------------------------------------------------*/
338
339void
341 const cs_cdo_connect_t *connect,
342 const cs_cdo_quantities_t *quant,
343 const cs_time_step_t *time_step);
344
345/*----------------------------------------------------------------------------*/
349/*----------------------------------------------------------------------------*/
350
351void
353
354/*----------------------------------------------------------------------------*/
364/*----------------------------------------------------------------------------*/
365
366void
368 const cs_cdo_connect_t *connect,
369 const cs_cdo_quantities_t *quant,
370 const cs_time_step_t *ts);
371
372/*----------------------------------------------------------------------------*/
380/*----------------------------------------------------------------------------*/
381
382void
384 const cs_time_step_t *time_step);
385
386/*----------------------------------------------------------------------------*/
393/*----------------------------------------------------------------------------*/
394
395void
397 const cs_time_step_t *time_step);
398
399/*----------------------------------------------------------------------------*/
406/*----------------------------------------------------------------------------*/
407
408void
410 const cs_cdo_quantities_t *cdoq);
411
412/*----------------------------------------------------------------------------*/
434/*----------------------------------------------------------------------------*/
435
436void
438 int mesh_id,
439 int cat_id,
440 int ent_flag[5],
441 cs_lnum_t n_cells,
442 cs_lnum_t n_i_faces,
443 cs_lnum_t n_b_faces,
444 const cs_lnum_t cell_ids[],
445 const cs_lnum_t i_face_ids[],
446 const cs_lnum_t b_face_ids[],
447 const cs_time_step_t *time_step);
448
449/*----------------------------------------------------------------------------*/
453/*----------------------------------------------------------------------------*/
454
455void
457
458/*----------------------------------------------------------------------------*/
459
461
462#endif /* __CS_NAVSTO_SYSTEM_H__ */
cs_boundary_type_t
Definition cs_boundary.h:51
#define BEGIN_C_DECLS
Definition cs_defs.h:467
#define END_C_DECLS
Definition cs_defs.h:468
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:298
cs_navsto_param_time_state_t
Status of the time for the Navier-Stokes system of equations.
Definition cs_navsto_param.h:204
cs_navsto_param_coupling_t
Choice of algorithm for solving the system.
Definition cs_navsto_param.h:238
cs_navsto_param_model_t
Modelling related to the Navier-Stokes system of equations.
Definition cs_navsto_param.h:69
cs_equation_t * cs_navsto_system_get_momentum_eq(void)
Retrieve a pointer to the equation related to the momentum equation.
Definition cs_navsto_system.c:361
void *() cs_navsto_init_scheme_context_t(const cs_navsto_param_t *nsp, cs_boundary_type_t *fb_type, void *nscc)
Allocate and initialize the context structure related to a given discretization scheme for the resolu...
Definition cs_navsto_system.h:76
void cs_navsto_system_log_setup(void)
Summary of the main cs_navsto_system_t structure.
Definition cs_navsto_system.c:1100
void() cs_navsto_compute_t(const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, void *scheme_context)
Compute for the current time step the new state for the Navier-Stokes system. This means that equatio...
Definition cs_navsto_system.h:127
cs_navsto_param_t * cs_navsto_system_get_param(void)
Retrieve the structure storing the parameters for the Navier–Stokes system.
Definition cs_navsto_system.c:342
void cs_navsto_system_initialize(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts)
Initialize the context structure used to build the algebraic system This is done after the setup step...
Definition cs_navsto_system.c:798
void cs_navsto_system_destroy(void)
Free the main structure related to the Navier-Stokes system.
Definition cs_navsto_system.c:275
void cs_navsto_system_init_setup(void)
Start setting-up the Navier-Stokes system At this stage, numerical settings should be completely dete...
Definition cs_navsto_system.c:407
void cs_navsto_system_extra_op(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
Predefined extra-operations for the Navier-Stokes system.
Definition cs_navsto_system.c:965
void cs_navsto_system_compute(const cs_mesh_t *mesh, const cs_time_step_t *time_step)
Build, solve and update the Navier-Stokes system.
Definition cs_navsto_system.c:932
void cs_navsto_system_finalize_setup(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
Last step of the setup of the Navier-Stokes system.
Definition cs_navsto_system.c:567
bool cs_navsto_system_is_activated(void)
Check if the resolution of the Navier-Stokes system has been activated.
Definition cs_navsto_system.c:166
void cs_navsto_system_set_sles(void)
Define the settings for SLES related to the Navier-Stokes system.
Definition cs_navsto_system.c:511
void cs_navsto_system_extra_post(void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step)
Predefined post-processing output for the Navier-Stokes system. The prototype of this function is fix...
Definition cs_navsto_system.c:1013
void *() cs_navsto_free_scheme_context_t(void *scheme_context)
Free the context structure related to a given discretization scheme for the resolution of the Navier-...
Definition cs_navsto_system.h:93
void cs_navsto_system_compute_steady_state(const cs_mesh_t *mesh, const cs_time_step_t *time_step)
Build, solve and update the Navier-Stokes system in case of a steady-state approach.
Definition cs_navsto_system.c:898
cs_navsto_system_t * cs_navsto_system_activate(const cs_boundary_t *boundaries, cs_navsto_param_model_t model, cs_navsto_param_time_state_t time_state, cs_navsto_param_coupling_t algo_coupling)
Allocate and initialize the Navier-Stokes (NS) system.
Definition cs_navsto_system.c:188
void() cs_navsto_init_values_t(const cs_navsto_param_t *nsp, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, cs_field_t *field)
According to the model, coupling algorithm and the space discretization, initialize the field values ...
Definition cs_navsto_system.h:109
static int input(void)
Definition field.f90:27
Definition mesh.f90:26
Definition cs_advection_field.h:149
Structure storing information related to the "physical" boundaries that one want to set on the comput...
Definition cs_boundary.h:77
Definition cs_cdo_connect.h:74
Definition cs_cdo_quantities.h:94
Main structure to handle the discretization and the resolution of an equation.
Field descriptor.
Definition cs_field.h:124
Definition cs_mesh.h:63
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition cs_navsto_param.h:255
Structure managing the Navier-Stokes system.
Definition cs_navsto_system.h:140
void * scheme_context
Definition cs_navsto_system.h:202
cs_navsto_init_values_t * init_pressure
Definition cs_navsto_system.h:234
cs_navsto_init_values_t * init_velocity
Definition cs_navsto_system.h:228
cs_navsto_compute_t * compute_steady
Definition cs_navsto_system.h:240
cs_field_t * pressure
Definition cs_navsto_system.h:182
cs_navsto_param_t * param
Definition cs_navsto_system.h:145
cs_adv_field_t * adv_field
Definition cs_navsto_system.h:163
cs_navsto_free_scheme_context_t * free_scheme_context
Definition cs_navsto_system.h:222
cs_field_t * velocity_divergence
Definition cs_navsto_system.h:176
cs_navsto_compute_t * compute
Definition cs_navsto_system.h:246
void * coupling_context
Definition cs_navsto_system.h:195
cs_navsto_init_scheme_context_t * init_scheme_context
Definition cs_navsto_system.h:215
cs_field_t * temperature
Definition cs_navsto_system.h:189
cs_boundary_type_t * bf_type
Definition cs_navsto_system.h:150
cs_field_t * velocity
Definition cs_navsto_system.h:169
time step descriptor
Definition cs_time_step.h:51