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
base
cs_turbomachinery.h
Go to the documentation of this file.
1
#ifndef __CS_TURBOMACHINERY_H__
2
#define __CS_TURBOMACHINERY_H__
3
4
/*============================================================================
5
* Turbomachinery modeling features.
6
*============================================================================*/
7
8
/*
9
This file is part of Code_Saturne, a general-purpose CFD tool.
10
11
Copyright (C) 1998-2013 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
#include "
cs_defs.h
"
35
36
/*----------------------------------------------------------------------------*/
37
38
BEGIN_C_DECLS
39
40
/*=============================================================================
41
* Local Type Definitions
42
*============================================================================*/
43
44
/*----------------------------------------------------------------------------
45
* Local Structure Definitions
46
*----------------------------------------------------------------------------*/
47
48
/* Turbomachinery model type */
49
50
typedef
enum
{
51
52
CS_TURBOMACHINERY_NONE
,
/* No turbomachinery modeling */
53
CS_TURBOMACHINERY_FROZEN
,
/* Frozen rotor model */
54
CS_TURBOMACHINERY_TRANSIENT
/* full transient simulation */
55
56
}
cs_turbomachinery_model_t
;
57
58
/*============================================================================
59
* Static global variables
60
*============================================================================*/
61
62
/*============================================================================
63
* Public function prototypes
64
*============================================================================*/
65
66
/*----------------------------------------------------------------------------
67
* Define rotor/stator model.
68
*----------------------------------------------------------------------------*/
69
70
void
71
cs_turbomachinery_set_model
(
cs_turbomachinery_model_t
model);
72
73
/*----------------------------------------------------------------------------
74
* return rotor/stator model.
75
*----------------------------------------------------------------------------*/
76
cs_turbomachinery_model_t
77
cs_turbomachinery_get_model
(
void
);
78
79
/*----------------------------------------------------------------------------
80
* Define a rotor by its axis and cell selection criteria.
81
*
82
* parameters:
83
* cell_criteria <-- cell selection criteria string
84
* rotation_velocity <-- rotation velocity, in radians/second
85
* rotation_axis <-- rotation axis vector
86
*/
87
/*----------------------------------------------------------------------------*/
88
89
void
90
cs_turbomachinery_add_rotor
(
const
char
*cell_criteria,
91
double
rotation_velocity,
92
const
double
rotation_axis[3]);
93
94
/*----------------------------------------------------------------------------
95
* Add a cs_join_t structure to the list of rotor/stator joinings.
96
*
97
* parameters:
98
* sel_criteria <-- boundary face selection criteria
99
* fraction <-- value of the fraction parameter
100
* plane <-- value of the plane parameter
101
* verbosity <-- level of verbosity required
102
* visualization <-- level of visualization required
103
*
104
* returns:
105
* number (1 to n) associated with new joining
106
*----------------------------------------------------------------------------*/
107
108
int
109
cs_turbomachinery_join_add
(
const
char
*sel_criteria,
110
float
fraction,
111
float
plane,
112
int
verbosity,
113
int
visualization);
114
115
/*----------------------------------------------------------------------------
116
* Initializations for turbomachinery computation
117
*
118
* Note: this function should be called before once the mesh is built,
119
* but before cs_post_init_meshes() so that postprocessing meshes are
120
* updated correctly in the transient case.
121
*----------------------------------------------------------------------------*/
122
123
void
124
cs_turbomachinery_initialize
(
void
);
125
126
/*----------------------------------------------------------------------------
127
* Free turbomachinery info
128
*----------------------------------------------------------------------------*/
129
130
void
131
cs_turbomachinery_finalize
(
void
);
132
133
/*----------------------------------------------------------------------------
134
* Update mesh for unsteady rotor/stator computation
135
*
136
* parameters:
137
* t_cur_mob <-- current rotor time
138
* t_elapsed --> elapsed computation time
139
*----------------------------------------------------------------------------*/
140
141
void
142
cs_turbomachinery_update_mesh
(
double
t_cur_mob,
143
double
*t_elapsed);
144
145
/*----------------------------------------------------------------------------
146
* Reinitialize interior face-based fields.
147
*----------------------------------------------------------------------------*/
148
149
void
150
cs_turbomachinery_reinit_i_face_fields
(
void
);
151
152
/*----------------------------------------------------------------------------
153
* Resize cell-based fields.
154
*
155
* This function only handles fields owning their values.
156
*----------------------------------------------------------------------------*/
157
158
void
159
cs_turbomachinery_resize_cell_fields
(
void
);
160
161
/*----------------------------------------------------------------------------
162
* Rotation of vector and tensor fields.
163
*----------------------------------------------------------------------------*/
164
165
void
166
cs_turbomachinery_rotate_fields
(
const
cs_real_t
dt[]);
167
168
/*----------------------------------------------------------------------------*/
169
170
END_C_DECLS
171
172
#endif
/* __CS_TURBOMACHINERY_H__ */
173
Generated on Thu Feb 27 2014 19:21:34 by
1.8.3.1