My Project
programmer's documentation
cs_vof.h
Go to the documentation of this file.
1 #ifndef __CS_VOF_H__
2 #define __CS_VOF_H__
3 
4 /*============================================================================
5  * Functions associated to VOF model
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 
30 /*----------------------------------------------------------------------------
31  * Standard C library headers
32  *----------------------------------------------------------------------------*/
33 
34 /*----------------------------------------------------------------------------
35  * Local headers
36  *----------------------------------------------------------------------------*/
37 
38 #include "cs_base.h"
39 #include "cs_domain.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*=============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
60 #define CS_VOF_ENABLED (1 << 0)
61 
63 #define CS_VOF_FREE_SURFACE (1 << 1)
64 
66 #define CS_VOF_MERKLE_MASS_TRANSFER (1 << 2)
67 
74 /*============================================================================
75  * Type definitions
76  *============================================================================*/
77 
78 /* VOF model parameters */
79 /*----------------------*/
80 
81 typedef struct {
82 
83  unsigned vof_model; /* VoF model (sum of masks defining Volume of
84  Fluid model and submodels */
85 
86  double rho1; /* density */
87 
88  double rho2;
89 
90  double mu1; /* viscosity */
91 
92  double mu2;
93 
95 
96 /* Cavitation parameters */
97 /*-----------------------*/
98 
99 typedef struct {
100 
101  cs_real_t presat; /* reference saturation pressure */
102  cs_real_t uinf; /* reference velocity */
103  cs_real_t linf; /* reference length scale */
104  cs_real_t cdest; /* constant of condensation model (Merkle) */
105  cs_real_t cprod; /* constant of vaporization model (Merkle) */
106  int icvevm; /* eddy-viscosity correction indicator */
107  cs_real_t mcav; /* eddy-viscosity correction cstt (Reboud) */
108  int itscvi; /* eddy-viscosity correction indicator */
109 
111 
112 /*=============================================================================
113  * Global variables
114  *============================================================================*/
115 
116 /* pointer to VOF model parameters structure */
117 
119 
120 /*============================================================================
121  * Public function prototypes
122  *============================================================================*/
123 
124 /*----------------------------------------------------------------------------
125  *!
126  * \brief Provide access to VOF structure.
127  */
128 /*----------------------------------------------------------------------------*/
129 
132 
133 /*----------------------------------------------------------------------------*/
150 /*----------------------------------------------------------------------------*/
151 
152 void
154 
155 /*----------------------------------------------------------------------------*/
185 /*----------------------------------------------------------------------------*/
186 
187 void
188 cs_vof_update_phys_prop(const cs_domain_t *domain);
189 
190 /*----------------------------------------------------------------------------*/
200 /*----------------------------------------------------------------------------*/
201 
202 void
203 cs_vof_log_mass_budget(const cs_domain_t *domain);
204 
205 /*----------------------------------------------------------------------------
206  *!
207  * \brief Provide access to cavitation parameters structure.
208  */
209 /*----------------------------------------------------------------------------*/
210 
213 
214 /*----------------------------------------------------------------------------*/
215 
217 
218 #endif /* __CS_VOF_H__ */
cs_domain_t
Structure storing the main features of the computational domain and pointers to the main geometrical ...
Definition: cs_domain.h:87
cs_vof_parameters_t::rho2
double rho2
Definition: cs_vof.h:88
cs_cavitation_parameters_t::linf
cs_real_t linf
Definition: cs_vof.h:103
cs_domain.h
cs_cavitation_parameters_t::cdest
cs_real_t cdest
Definition: cs_vof.h:104
cs_cavitation_parameters_t::mcav
cs_real_t mcav
Definition: cs_vof.h:107
cs_cavitation_parameters_t::icvevm
int icvevm
Definition: cs_vof.h:106
cs_vof_compute_linear_rho_mu
void cs_vof_compute_linear_rho_mu(const cs_domain_t *domain)
Compute the mixture density, mixture dynamic viscosity given fluid volume fractions and the reference...
Definition: cs_vof.c:391
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_vof_parameters_t
VOF model parameters. Void fraction variable tracks fluid 2.
Definition: cs_vof.h:81
cs_cavitation_parameters_t::presat
cs_real_t presat
Definition: cs_vof.h:101
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
cs_vof_update_phys_prop
void cs_vof_update_phys_prop(const cs_domain_t *domain)
Compute the mixture density, mixture dynamic viscosity and mixture mass flux given the volumetric flu...
Definition: cs_vof.c:469
cs_cavitation_parameters_t::itscvi
int itscvi
Definition: cs_vof.h:108
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_cavitation_parameters_t::uinf
cs_real_t uinf
Definition: cs_vof.h:102
cs_get_glob_vof_parameters
cs_vof_parameters_t * cs_get_glob_vof_parameters(void)
Definition: cs_vof.c:366
cs_vof_parameters_t::rho1
double rho1
Definition: cs_vof.h:86
cs_vof_parameters_t::mu1
double mu1
Definition: cs_vof.h:90
cs_get_glob_cavitation_parameters
cs_cavitation_parameters_t * cs_get_glob_cavitation_parameters(void)
Definition: cs_vof.c:659
cs_cavitation_parameters_t
Cavitation model parameters.
Definition: cs_vof.h:99
cs_vof_parameters_t::vof_model
unsigned vof_model
Definition: cs_vof.h:83
cs_glob_vof_parameters
const cs_vof_parameters_t * cs_glob_vof_parameters
cs_vof_parameters_t::mu2
double mu2
Definition: cs_vof.h:92
cs_vof_log_mass_budget
void cs_vof_log_mass_budget(const cs_domain_t *domain)
Write in main log the global mixture mass budget:
Definition: cs_vof.c:525
cs_base.h
cs_cavitation_parameters_t::cprod
cs_real_t cprod
Definition: cs_vof.h:105