ADflow  v1.0
ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
CpCurveFits.f90
Go to the documentation of this file.
1 module cpcurvefits
2 !
3 ! This module contains the curve fit data for Cp, or better
4 ! Cp/R, as a function of the temperature. The temperature is
5 ! assumed to be in Kelvin.
6 !
7  use constants, only: inttype, realtype
8  implicit none
9  save
10 !
11 ! The definition of the derived data type CpTempFitType, which
12 ! stores the curve fit data for a certain temperature range.
13 !
15 
16  ! nterm: Number of terms in the polynomial expansion.
17  ! exponents: The powers of the polynomial fit.
18  ! constants: The constants in front of each term.
19 
20  integer(kind=intType) :: nterm
21  integer(kind=intType), dimension(:), pointer :: exponents
22  real(kind=realtype), dimension(:), pointer :: constants
23 
24  ! Additional constant to compute the internal energy.
25 
26  real(kind=realtype) :: eint0
27 
28  ! Values of the integrand of Cp/(R*T) at the lower (_1) and
29  ! upper (_2) curve fit boundary. Needed to compute the total
30  ! pressure.
31 
32  real(kind=realtype) :: intcpovrt_1, intcpovrt_2
33 
34  end type cptempfittype
35 
36  ! CpNParts: Number of temperature ranges.
37  ! CpTRange(0:CpNParts): The temperature ranges.
38  ! CpEint(0:CpNParts): Internal energies at the curve fit
39  ! boundaries.
40  ! CpHint(0:CpNParts): Internal enthalpies at the curve fit
41  ! boundaries.
42  ! CpTempFit(CpNParts): The actual curve fit data.
43 
44  integer(kind=intType) :: cpnparts
45 
46  real(kind=realtype), dimension(:), allocatable :: cptrange
47  real(kind=realtype), dimension(:), allocatable :: cpeint
48  real(kind=realtype), dimension(:), allocatable :: cphint
49  type(cptempfittype), dimension(:), allocatable :: cptempfit
50 
51  ! cv0: The cv value at the the temperature CpTRange(0). If the
52  ! temperature is lower than the lowest curve fit boundary
53  ! this value is needed to extrapolate the energy (assuming
54  ! constant cv).
55  ! cvn: Idem, but than at CpTRange(CpNParts). Used when the
56  ! temperature is higher than the highest curve fit boundary.
57 
58  real(kind=realtype) :: cv0, cvn
59 
60 end module cpcurvefits
real(kind=realtype) cvn
Definition: CpCurveFits.f90:58
real(kind=realtype), dimension(:), allocatable cptrange
Definition: CpCurveFits.f90:46
integer(kind=inttype) cpnparts
Definition: CpCurveFits.f90:44
real(kind=realtype), dimension(:), allocatable cphint
Definition: CpCurveFits.f90:48
real(kind=realtype) cv0
Definition: CpCurveFits.f90:58
type(cptempfittype), dimension(:), allocatable cptempfit
Definition: CpCurveFits.f90:49
real(kind=realtype), dimension(:), allocatable cpeint
Definition: CpCurveFits.f90:47