My Project
programmer's documentation
cs_physical_properties.h
Go to the documentation of this file.
1 #ifndef __CS_PHYSICAL_PROPERTIES_H__
2 #define __CS_PHYSICAL_PROPERTIES_H__
3 
4 /*============================================================================
5  * Functions dealing with parallelism
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2019 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  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 typedef enum {
41 
49 
51 
52 typedef enum {
53 
67 
69 
70 /*=============================================================================
71  * Public function prototypes
72  *============================================================================*/
73 
74 /*----------------------------------------------------------------------------
75  * Define thermal table.
76  *----------------------------------------------------------------------------*/
77 
78 void
79 cs_thermal_table_set(const char *material,
80  const char *method,
81  const char *reference,
83  int temp_scale);
84 
85 /*----------------------------------------------------------------------------
86  * Finalize thermal table
87  *----------------------------------------------------------------------------*/
88 
89 void
91 
92 /*----------------------------------------------------------------------------
93  * Compute a physical property.
94  *
95  * For values var1 and var2, we can use a stride so that accesses for a given
96  * element with id i will be of the form: var[i*stride]; this allows regular
97  * access with stride 1, and access to constant variables stored as a
98  * single-valued array with a stride of 0.
99  *
100  * parameters:
101  * property <-- property queried
102  * n_vals <-- number of values
103  * var1_stride <-- stride between successive values of var1
104  * var2_stride <-- stride between successive values of var2
105  * var1 <-- values on first plane axis
106  * var2 <-- values on second plane axis
107  * val --> resulting property values
108  *----------------------------------------------------------------------------*/
109 
110 void
112  cs_lnum_t n_vals,
113  cs_lnum_t var1_stride,
114  cs_lnum_t var2_stride,
115  const cs_real_t var1[],
116  const cs_real_t var2[],
117  cs_real_t val[]);
118 
119 /*----------------------------------------------------------------------------
120  * Compute properties with Freesteam in a defined thermal plane.
121  *
122  * parameters:
123  * thermo_plane <-- thermodynamic plane
124  * property <-- property queried
125  * n_vals <-- number of values
126  * var1 <-- values on first plane axis
127  * var2 <-- values on second plane axis
128  * val --> resulting property values
129  *
130  * returns:
131  * floating point value associated with the key id for this field
132  *----------------------------------------------------------------------------*/
133 
134 void
136  cs_phys_prop_type_t property,
137  const cs_lnum_t n_vals,
138  const cs_real_t var1[],
139  const cs_real_t var2[],
140  cs_real_t val[]);
141 
142 /*----------------------------------------------------------------------------*/
143 
145 
146 #endif /* __CS_PHYSICAL_PROPERTIES_H__ */
CS_PHYS_PROP_PLANE_PT
Definition: cs_physical_properties.h:43
cs_defs.h
CS_PHYS_PROP_ENTHALPY
Definition: cs_physical_properties.h:56
CS_PHYS_PROP_PLANE_TS
Definition: cs_physical_properties.h:47
cs_thermal_table_set
void cs_thermal_table_set(const char *material, const char *method, const char *reference, cs_phys_prop_thermo_plane_type_t thermo_plane, int temp_scale)
Define thermal table.
Definition: cs_physical_properties.c:202
CS_PHYS_PROP_PLANE_PU
Definition: cs_physical_properties.h:45
cs_phys_prop_compute
void cs_phys_prop_compute(cs_phys_prop_type_t property, cs_lnum_t n_vals, cs_lnum_t var1_stride, cs_lnum_t var2_stride, const cs_real_t var1[], const cs_real_t var2[], cs_real_t val[])
Compute a physical property.
Definition: cs_physical_properties.c:333
var2
void cs_real_t var2[]
Definition: cs_mesh.h:268
cs_phys_prop_type_t
cs_phys_prop_type_t
Definition: cs_physical_properties.h:52
CS_PHYS_PROP_PLANE_PV
Definition: cs_physical_properties.h:46
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
CS_PHYS_PROP_DENSITY
Definition: cs_physical_properties.h:61
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
CS_PHYS_PROP_PRESSURE
Definition: cs_physical_properties.h:54
CS_PHYS_PROP_ISOCHORIC_HEAT_CAPACITY
Definition: cs_physical_properties.h:59
CS_PHYS_PROP_PLANE_TX
Definition: cs_physical_properties.h:48
CS_PHYS_PROP_PLANE_PH
Definition: cs_physical_properties.h:42
CS_PHYS_PROP_ENTROPY
Definition: cs_physical_properties.h:57
CS_PHYS_PROP_QUALITY
Definition: cs_physical_properties.h:63
cs_phys_prop_freesteam
void cs_phys_prop_freesteam(cs_phys_prop_thermo_plane_type_t thermo_plane, cs_phys_prop_type_t property, const cs_lnum_t n_vals, const cs_real_t var1[], const cs_real_t var2[], cs_real_t val[])
Compute properties with Freesteam in a defined thermal plane.
Definition: cs_physical_properties.c:439
CS_PHYS_PROP_SPEED_OF_SOUND
Definition: cs_physical_properties.h:66
cs_phys_prop_thermo_plane_type_t
cs_phys_prop_thermo_plane_type_t
Definition: cs_physical_properties.h:40
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
CS_PHYS_PROP_SPECIFIC_VOLUME
Definition: cs_physical_properties.h:60
CS_PHYS_PROP_PLANE_PS
Definition: cs_physical_properties.h:44
cs_thermal_table_finalize
void cs_thermal_table_finalize(void)
finalize thermal table.
Definition: cs_physical_properties.c:289
CS_PHYS_PROP_INTERNAL_ENERGY
Definition: cs_physical_properties.h:62
CS_PHYS_PROP_DYNAMIC_VISCOSITY
Definition: cs_physical_properties.h:65
CS_PHYS_PROP_ISOBARIC_HEAT_CAPACITY
Definition: cs_physical_properties.h:58
CS_PHYS_PROP_THERMAL_CONDUCTIVITY
Definition: cs_physical_properties.h:64
CS_PHYS_PROP_TEMPERATURE
Definition: cs_physical_properties.h:55