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