programmer's documentation
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-2016 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 
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  * DOUBLE PRECISION QINC : <- : incident radiative flux at the boundary
85  * : : at the boundary
86  * DOUBLE PRECISION EPS : <- : emissivity (epsilon)
87  * DOUBLE PRECISION TET1D : <- : temperature on the exterior boundary
88  * : : (Dirichlet boundary condition)
89  * DOUBLE PRECISION HET1D : <- : exchange coefficient on the exterior wall
90  * DOUBLE PRECISION FET1D : <- : flux on the exterior wall
91  * : : (Neumann boundary condition)
92  * DOUBLE PRECISION LAMT1D : <- : conductivity (lambda)
93  * DOUBLE PRECISION RCPT1D : <- : rho*Cp product
94  * DOUBLE PRECISION DTPT1D : <-> : time-step for the solid resolution
95  * DOUBLE PRECISION TPPT1D : <-> : physical temperature at the fluid/solid
96  * : : interface
97  *----------------------------------------------------------------------------*/
98 
99 void CS_PROCF (tpar1d,TPAR1D)
100 (
101  cs_int_t *ii,
102  cs_int_t *icdcle,
103  cs_real_t *tf,
104  cs_real_t *hf,
105  cs_real_t *qinc,
106  cs_real_t *eps,
107  cs_real_t *te,
108  cs_real_t *he,
109  cs_real_t *fe,
110  cs_real_t *lb,
111  cs_real_t *rocp,
112  cs_real_t *dtf,
113  cs_real_t *tp
114 );
115 
116 /*----------------------------------------------------------------------------
117  * Read the restart file of the 1D-wall thermal module
118  *
119  * Fortran interface:
120  *
121  * SUBROUTINE LECT1D
122  * *****************
123  *
124  * CHARACTER NOMSUI : <-- : Name of the restart file
125  * INTEGER LNGNOM : <-- : Name length
126  * INTEGER NFPT1D : <-- : Number of coupled faces
127  * INTEGER NFPT1T : <-- : Total number of coupled faces
128  * INTEGER NMXT1D : <-- : Max number of points on the 1D meshes
129  * INTEGER NFABOR : <-- : Number of boundary faces
130  * INTEGER NPPT1D : <-- : Number of points of each face 1D-mesh
131  * INTEGER IFPT1D : <-- : Indirection array for 1D-module faces
132  * DOUBLE PRECISION EPPT1D : <-- : Wall thickness of each face
133  * DOUBLE PRECISION RGPT1D : <-- : Geometric reason associated to faces
134  * DOUBLE PRECISION TPPT1D : --> : Wall temperature
135  *----------------------------------------------------------------------------*/
136 
137 void CS_PROCF (lect1d, LECT1D)
138 (
139  const char *const nomsui,
140  const cs_int_t *const lngnom,
141  const cs_int_t *const nfpt1d,
142  const cs_int_t *const nfpt1t,
143  const cs_int_t *const nmxt1d,
144  const cs_int_t *const nfabor,
145  const cs_int_t *const nppt1d,
146  const cs_int_t *const ifpt1d,
147  const cs_real_t *const eppt1d,
148  const cs_real_t *const rgpt1d,
149  cs_real_t *const tppt1d
150  CS_ARGF_SUPP_CHAINE /* (possible 'length' arguments added
151  by many Fortran compilers) */
152 );
153 
154 /*----------------------------------------------------------------------------
155  * Write the restart file of the 1D-wall thermal module
156  *
157  * Fortran interface:
158  *
159  * SUBROUTINE LECT1D
160  * *****************
161  *
162  * CHARACTER NOMSUI : <-- : Name of the restart file
163  * INTEGER LNGNOM : <-- : Name length
164  * INTEGER NFPT1D : <-- : Number of coupled faces
165  * INTEGER NMXT1D : <-- : Max number of points on the 1D meshes
166  * INTEGER NFABOR : <-- : Number of boundary faces
167  * DOUBLE PRECISION TPPT1D : --> : Wall temperature
168  * INTEGER IFPT1D : <-- : Indirection array for 1D-module faces
169  *----------------------------------------------------------------------------*/
170 
171 void CS_PROCF (ecrt1d, ECRT1D)
172 (
173  const char *const nomsui,
174  const cs_int_t *const lngnom,
175  const cs_int_t *const nfpt1d,
176  const cs_int_t *const nmxt1d,
177  const cs_int_t *const nfabor,
178  const cs_real_t *const tppt1d,
179  const cs_int_t *const ifpt1d
180  CS_ARGF_SUPP_CHAINE /* (possible 'length' arguments added
181  by many Fortran compilers) */
182 );
183 
184 /*----------------------------------------------------------------------------
185  * Free allocated memory
186  *----------------------------------------------------------------------------*/
187 
188 void CS_PROCF (lbrt1d, LBRT1D)(void);
189 
190 /*----------------------------------------------------------------------------*/
191 
193 
194 #endif /* __CS_TPAR1D_H__ */
195 
integer, dimension(:), allocatable nppt1d
number of discretisation cells in the 1D wall for the nfpt1d boundary faces which are coupled with a ...
Definition: pointe.f90:181
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:1026
#define BEGIN_C_DECLS
Definition: cs_defs.h:448
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:295
integer, save nfabor
Definition: mesh.f90:58
integer, save nmxt1d
Definition: pointe.f90:171
#define CS_ARGF_SUPP_CHAINE
Definition: cs_defs.h:487
double precision, dimension(:), allocatable tppt1d
initialisation temperature of the wall (uniform in thickness). In the course of the calculation...
Definition: pointe.f90:208
double cs_real_t
Floating-point value.
Definition: cs_defs.h:296
integer, save nfpt1d
number of boundary faces which are coupled with a wall 1D thermal module. See the user subroutine usp...
Definition: pointe.f90:168
integer, dimension(:), allocatable ifpt1d
array allowing to mark out the numbers of the nfpt1d boundary faces which are coupled with a wall 1D ...
Definition: pointe.f90:188
void tpar1d(cs_int_t *ii, cs_int_t *icdcle, cs_real_t *tf, cs_real_t *hf, cs_real_t *qinc, cs_real_t *eps, 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:259
double precision, dimension(:), allocatable eppt1d
thickness of the 1D wall for the nfpt1d boundary faces which are coupled with a wall 1D thermal modul...
Definition: pointe.f90:199
integer, save nfpt1t
Indicateur module thermique 1d global (ie somme sur les processeurs de nfpt1d)
Definition: optcal.f90:846
#define END_C_DECLS
Definition: cs_defs.h:449
#define CS_PROCF(x, y)
Definition: cs_defs.h:472
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:799
double precision, dimension(:), allocatable rgpt1d
geometry of the pseudo wall mesh (refined as a fluid if rgt1d is smaller than 1
Definition: pointe.f90:203
Definition: cs_field_pointer.h:70
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:177