src/base/cs_tpar1d.h Source File

| 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
cs_tpar1d.h
Go to the documentation of this file.
1 #ifndef __CS_TPAR1D_H__
2 #define __CS_TPAR1D_H__
3
4 /*============================================================================
5 * Modelling the thermal wall with 1D approach
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 /*----------------------------------------------------------------------------
35 * Local headers
36 *----------------------------------------------------------------------------*/
37
38 #include "cs_base.h"
39
40 /*----------------------------------------------------------------------------*/
41
42 BEGIN_C_DECLS
43
44 /*============================================================================
45 * Public function prototypes for Fortran API
46 *============================================================================*/
47
48 /*----------------------------------------------------------------------------
49 * Create the 1D mesh for each face and initialize the temperature
50 *
51 * Fortran interface:
52 *
53 * SUBROUTINE MAIT1D
54 * ******************
55 *
56 * INTEGER NFPT1D : <- : number of coupled faces
57 * INTEGER NPPT1D(NFPT1D) : <- : number of mesh points for each face
58 * DOUBLE PRECISION EPPT1D(NFPT1D) : <- : wall thickness for each face
59 * DOUBLE PRECISION RGPT1D(NFPT1D) : <- : mesh geometric ratio for each face
60 * DOUBLE PRECISION TPPT1D(NFPT1D) : <- : temperature initizalition value
61 *----------------------------------------------------------------------------*/
62
63 void CS_PROCF (mait1d,MAIT1D)
64 (
65 cs_int_t *nf,
66 cs_int_t n[],
67 cs_real_t e[],
68 cs_real_t r[],
69 cs_real_t tp[]
70 );
71
72 /*----------------------------------------------------------------------------
73 * Solve the 1D equation for a given face
74 *
75 * Fortran interface:
76 *
77 * SUBROUTINE TPAR1D
78 * ******************
79 *
80 * INTEGER II : <- : face number
81 * INTEGER ICLT1D : <- : type of exterior boundary condition
82 * DOUBLE PRECISION TBORD : <- : fluid temperature at the boundary
83 * DOUBLE PRECISION HBORD : <- : exchange coefficient for the fluid
84 * : : at the boundary
85 * DOUBLE PRECISION TET1D : <- : temperature on the exterior boundary
86 * : : (Dirichlet boundary condition)
87 * DOUBLE PRECISION HET1D : <- : exchange coefficient on the exterior wall
88 * DOUBLE PRECISION FET1D : <- : flux on the exterior wall
89 * : : (Neumann boundary condition)
90 * DOUBLE PRECISION LAMT1D : <- : conductivity (lambda)
91 * DOUBLE PRECISION RCPT1D : <- : rho*Cp product
92 * DOUBLE PRECISION DTPT1D : <-> : time-step for the solid resolution
93 * DOUBLE PRECISION TPPT1D : <-> : physical temperature at the fluid/solid
94 * : : interface
95 *----------------------------------------------------------------------------*/
96
97 void CS_PROCF (tpar1d,TPAR1D)
98 (
99 cs_int_t *ii,
100 cs_int_t *icdcle,
101 cs_real_t *tf,
102 cs_real_t *hf,
103 cs_real_t *te,
104 cs_real_t *he,
105 cs_real_t *fe,
106 cs_real_t *lb,
107 cs_real_t *rocp,
108 cs_real_t *dtf,
109 cs_real_t *tp
110 );
111
112 /*----------------------------------------------------------------------------
113 * Read the restart file of the 1D-wall thermal module
114 *
115 * Fortran interface:
116 *
117 * SUBROUTINE LECT1D
118 * *****************
119 *
120 * CHARACTER NOMSUI : <-- : Name of the restart file
121 * INTEGER LNGNOM : <-- : Name length
122 * INTEGER NFPT1D : <-- : Number of coupled faces
123 * INTEGER NFPT1T : <-- : Total number of coupled faces
124 * INTEGER NMXT1D : <-- : Max number of points on the 1D meshes
125 * INTEGER NFABOR : <-- : Number of boundary faces
126 * INTEGER NPPT1D : <-- : Number of points of each face 1D-mesh
127 * INTEGER IFPT1D : <-- : Indirection array for 1D-module faces
128 * DOUBLE PRECISION EPPT1D : <-- : Wall thickness of each face
129 * DOUBLE PRECISION RGPT1D : <-- : Geometric reason associated to faces
130 * DOUBLE PRECISION TPPT1D : --> : Wall temperature
131 *----------------------------------------------------------------------------*/
132
133 void CS_PROCF (lect1d, LECT1D)
134 (
135 const char *const nomsui,
136 const cs_int_t *const lngnom,
137 const cs_int_t *const nfpt1d,
138 const cs_int_t *const nfpt1t,
139 const cs_int_t *const nmxt1d,
140 const cs_int_t *const nfabor,
141 const cs_int_t *const nppt1d,
142 const cs_int_t *const ifpt1d,
143 const cs_real_t *const eppt1d,
144 const cs_real_t *const rgpt1d,
145 cs_real_t *const tppt1d
146 CS_ARGF_SUPP_CHAINE /* (possible 'length' arguments added
147 by many Fortran compilers) */
148 );
149
150 /*----------------------------------------------------------------------------
151 * Write the restart file of the 1D-wall thermal module
152 *
153 * Fortran interface:
154 *
155 * SUBROUTINE LECT1D
156 * *****************
157 *
158 * CHARACTER NOMSUI : <-- : Name of the restart file
159 * INTEGER LNGNOM : <-- : Name length
160 * INTEGER NFPT1D : <-- : Number of coupled faces
161 * INTEGER NMXT1D : <-- : Max number of points on the 1D meshes
162 * INTEGER NFABOR : <-- : Number of boundary faces
163 * DOUBLE PRECISION TPPT1D : --> : Wall temperature
164 * INTEGER IFPT1D : <-- : Indirection array for 1D-module faces
165 *----------------------------------------------------------------------------*/
166
167 void CS_PROCF (ecrt1d, ECRT1D)
168 (
169 const char *const nomsui,
170 const cs_int_t *const lngnom,
171 const cs_int_t *const nfpt1d,
172 const cs_int_t *const nmxt1d,
173 const cs_int_t *const nfabor,
174 const cs_real_t *const tppt1d,
175 const cs_int_t *const ifpt1d
176 CS_ARGF_SUPP_CHAINE /* (possible 'length' arguments added
177 by many Fortran compilers) */
178 );
179
180 /*----------------------------------------------------------------------------
181 * Free allocated memory
182 *----------------------------------------------------------------------------*/
183
184 void CS_PROCF (lbrt1d, LBRT1D)(void);
185
186 /*----------------------------------------------------------------------------*/
187
188 END_C_DECLS
189
190 #endif /* __CS_TPAR1D_H__ */
191