programmer's documentation
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
src
turb
cs_les_inflow.h
Go to the documentation of this file.
1
2
#ifndef __CS_LES_INFLOW_H__
3
#define __CS_LES_INFLOW_H__
4
5
/*============================================================================
6
* Turbulent inflow generation
7
*============================================================================*/
8
9
/*
10
This file is part of Code_Saturne, a general-purpose CFD tool.
11
12
Copyright (C) 1998-2013 EDF S.A.
13
14
This program is free software; you can redistribute it and/or modify it under
15
the terms of the GNU General Public License as published by the Free Software
16
Foundation; either version 2 of the License, or (at your option) any later
17
version.
18
19
This program is distributed in the hope that it will be useful, but WITHOUT
20
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22
details.
23
24
You should have received a copy of the GNU General Public License along with
25
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26
Street, Fifth Floor, Boston, MA 02110-1301, USA.
27
*/
28
29
/*----------------------------------------------------------------------------*/
30
31
#include "
cs_defs.h
"
32
33
/*----------------------------------------------------------------------------
34
* Local headers
35
*----------------------------------------------------------------------------*/
36
37
#include "
cs_base.h
"
38
39
/*----------------------------------------------------------------------------*/
40
41
BEGIN_C_DECLS
42
43
/*============================================================================
44
* Macro definitions
45
*============================================================================*/
46
47
/*============================================================================
48
* Type definitions
49
*============================================================================*/
50
51
/*----------------------------------------------------------------------------
52
* Type of synthetic turbulence generation
53
*----------------------------------------------------------------------------*/
54
55
typedef
enum
{
56
57
CS_INFLOW_LAMINAR
,
/* Laminar fluctuations (i.e no fluctuation) */
58
CS_INFLOW_RANDOM
,
/* Gaussian random fluctuation */
59
CS_INFLOW_BATTEN
,
/* Fluctuations generated by the Batten method */
60
CS_INFLOW_SEM
/* Fluctuations generated by the Synthetic Eddy Method */
61
62
}
cs_inflow_type_t
;
63
64
/*=============================================================================
65
* Local Structure Definitions
66
*============================================================================*/
67
68
/* Inlet definition */
69
/*------------------*/
70
71
typedef
struct
_cs_inlet_t cs_inlet_t;
72
73
/*=============================================================================
74
* Public function prototypes for Fortran API
75
*============================================================================*/
76
77
/*----------------------------------------------------------------------------
78
* Creation of a structure for the inlets
79
*----------------------------------------------------------------------------*/
80
81
void
CS_PROCF
(
defsyn
, DEFSYN)
82
(
83
cs_int_t
*n_inlets
/* <-- number of inlets */
84
CS_ARGF_SUPP_CHAINE
85
);
86
87
/*----------------------------------------------------------------------------
88
* General synthetic turbulence generation
89
*----------------------------------------------------------------------------*/
90
91
void
CS_PROCF
(
synthe
, SYNTHE)(
92
const
cs_int_t
*
const
nvar,
/* --> number of variables */
93
const
cs_int_t
*
const
nscal,
/* --> number of scalars */
94
const
cs_int_t
*
const
iu,
/* --> index of velocity component */
95
const
cs_int_t
*
const
iv,
/* --> index of velocity component */
96
const
cs_int_t
*
const
iw,
/* --> index of velocity component */
97
const
cs_real_t
*
const
ttcabs,
/* --> current physical time */
98
const
cs_real_t
dt[],
/* --> time step */
99
const
cs_real_t
rtpa[],
/* --> variables at cellules (previous) */
100
const
cs_real_t
rtp[],
/* --> variables at cellules */
101
const
cs_real_t
propce[],
/* --> physical properties at cells */
102
cs_real_t
rcodcl[]
/* <-> boundary conditions array */
103
CS_ARGF_SUPP_CHAINE
104
);
105
106
void
CS_PROCF
(
cs_user_les_inflow_init
, CS_USER_LES_INFLOW_INIT)(
107
cs_int_t
*nent
/* <-- number of LES inlets */
108
);
109
110
void
CS_PROCF
(
cs_user_les_inflow_define
, CS_USER_LES_INFLOW_DEFINE)(
111
const
cs_int_t
*
const
nument,
/* --> id of the inlet */
112
int
*typent,
/* <-- type of inflow method at the inlet */
113
int
*nelent,
/* <-- numb. of entities of the inflow meth*/
114
int
*iverbo,
/* <-- verbosity level */
115
cs_int_t
*nfbent,
/* <-- numb. of bound. faces of the inlet */
116
cs_int_t
lfbent[],
/* <-- list of bound. faces of the inlet */
117
cs_real_t
vitent[],
/* <-- ref. mean velocity at the inlet */
118
cs_real_t
*enrent,
/* <-- ref. turb. kin. ener. at the inlet */
119
cs_real_t
*dspent
/* <-- ref. turb. dissipation at the inlet */
120
);
121
122
void
CS_PROCF
(
cs_user_les_inflow_advanced
, CS_USER_LES_INFLOW_ADVANCED)(
123
const
cs_int_t
*
const
nument,
/* --> id of the inlet */
124
const
cs_int_t
*
const
nfbent,
/* --> numb. of bound. faces of the inlet */
125
const
cs_int_t
*
const
nvar,
/* --> number of variables */
126
const
cs_int_t
*
const
nscal,
/* --> number of scalars */
127
const
cs_int_t
lfbent[],
/* --> list of bound. faces of the inlet */
128
const
cs_real_t
dt[],
/* --> time step */
129
const
cs_real_t
rtpa[],
/* --> variables at cells (previous) */
130
const
cs_real_t
rtp[],
/* --> variables at cells */
131
const
cs_real_t
propce[],
/* --> physical properties at cells */
132
cs_real_t
uent[],
/* <-- mean velocity at the inlet faces */
133
cs_real_t
rijent[],
/* <-- turb. kin. ener. at the inlet faces */
134
cs_real_t
epsent[]
/* <-- turb. dissipation at the inlet faces*/
135
);
136
137
/*----------------------------------------------------------------------------
138
* Read the restart file of the LES inflow module
139
*----------------------------------------------------------------------------*/
140
141
void
CS_PROCF
(
lecsyn
, LECSYN)
142
(
143
const
char
*
const
filnam,
/* <- Name of the sequel file */
144
const
cs_int_t
*
const
lngnam
/* <- Length of the name */
145
CS_ARGF_SUPP_CHAINE
146
);
147
148
/*----------------------------------------------------------------------------
149
* Write the restart file of the LES inflow module
150
*----------------------------------------------------------------------------*/
151
152
void
CS_PROCF
(
ecrsyn
, ECRSYN)
153
(
154
const
char
*
const
filnam,
/* <- Name of the sequel file */
155
const
cs_int_t
*
const
lngnam
/* <- Length of the name */
156
CS_ARGF_SUPP_CHAINE
157
);
158
159
/*=============================================================================
160
* Public function prototypes
161
*============================================================================*/
162
163
/*----------------------------------------------------------------------------
164
* Finalize turbulent inflow generation API.
165
*----------------------------------------------------------------------------*/
166
167
void
168
cs_inflow_finalize
(
void
);
169
170
/*----------------------------------------------------------------------------*/
171
172
END_C_DECLS
173
174
#endif
/* __CS_LES_INFLOW_H__ */
Generated on Thu Feb 27 2014 19:21:34 by
1.8.3.1