20 #include "version.inc" 27 CHARACTER(len=142) ::
therm =
'BURCAT.THR' 35 DOUBLE PRECISION Ahigh(7), Alow(7)
36 DOUBLE PRECISION Thigh, Tlow, Tcom, MW
37 DOUBLE PRECISION Cp1, h1, h2, Hf298oR
38 CHARACTER(LEN=132) :: PATH
39 CHARACTER(LEN=18) :: SPECIES
41 CHARACTER(len=255) FILENAME
48 INQUIRE(file=trim(
therm),exist=localcopy)
50 OPEN(convert=
'BIG_ENDIAN',unit=funit,file=trim(
therm))
52 filename =
'./BURCAT.THR' 53 OPEN(convert=
'BIG_ENDIAN',unit=funit,file=trim(filename), err=500)
57 Call read_therm(funit, species, thigh, tlow, tcom, mw, ahigh, &
62 print *, thigh, tlow, tcom, mw, hf298or*1.987207
78 200 print *,
'READ_Therm_tester: Species ', &
79 trim(species),
' not found in Database!' 81 500 print *,
'READ_Therm_tester: Cannot Open file ', trim(
therm),
'!' 82 print *,
'Check path or copy mfix/model/thermochemical/', &
83 trim(
therm),
' into run directory' 95 SUBROUTINE read_therm(funit, Sp, Thigh, Tlow, Tcom, MW, Ahigh, &
107 CHARACTER(len=80) :: LINE_STRING
109 CHARACTER(len=18) :: SPECIES, ss
110 INTEGER i, funit, IER
111 DOUBLE PRECISION Ahigh(7), Alow(7), Hf298oR
112 DOUBLE PRECISION Thigh, Tlow, Tcom, MW
116 INTEGER,
PARAMETER :: Max = 3
117 CHARACTER(LEN=18),
DIMENSION(2,Max) :: SPECIES_ALIAS
118 species_alias = reshape( (/ &
121 'O2 ',
'O2 REF ELEMENT ', &
122 'N2 ',
'N2 REF ELEMENT ', &
123 'CH4 ',
'CH4 ANHARMONIC ' &
130 IF(trim(sp) == trim(species_alias(1,i)))
THEN 131 species = species_alias(2,i)
137 DO WHILE(line_string(1:11) /=
'THERMO DATA')
138 READ(unit=funit, fmt=
'(A)',err=100,end=100)line_string
143 DO WHILE(trim(ss) /= trim(species))
144 READ(unit=funit, fmt=
'(A)',err=100,end=100)line_string
145 ss = line_string(1:18)
157 tcom = min(1.0d3, thigh)
158 READ(unit=funit, fmt=
'(5E15.0)',err=300,end=300)ahigh(1:5)
159 READ(unit=funit, fmt=
'(5E15.0)',err=300,end=300)ahigh(6:7), alow(1:3)
160 READ(unit=funit, fmt=
'(5E15.0)',err=300,end=300)alow(4:7), hf298or
169 300 print *,
'READ_Therm: Error reading coefficients for Species ', &
170 trim(line_string(1:18))
180 PURE DOUBLE PRECISION FUNCTION calc_cpor(T, M, N)
194 DOUBLE PRECISION,
intent(in) :: T
196 INTEGER,
intent(in) :: M
198 INTEGER,
intent(in) :: N
203 DOUBLE PRECISION :: xT
206 xt = max(min(t,thigh(m,n)),tlow(m,n))
209 IF(t <
tcom(m,n))
THEN 224 PURE DOUBLE PRECISION FUNCTION calc_cpor0(T, A)
231 DOUBLE PRECISION,
intent(in) :: T
233 DOUBLE PRECISION,
intent(in) :: A(1:5)
236 calc_cpor0 = (((a(5)*t +a(4))*t + a(3))*t + a(2))*t + a(1)
247 DOUBLE PRECISION FUNCTION calc_icpor(T, M, N, IER)
262 DOUBLE PRECISION,
intent(in) :: T
264 INTEGER,
intent(in) :: M
266 INTEGER,
intent(in) :: N
268 INTEGER,
intent(inout) :: IER
272 DOUBLE PRECISION :: xT
280 if(t > thigh(m,n))
THEN 283 elseif(t < tlow(m,n))
THEN 289 if (xt <
tcom(m,n))
then 304 PURE DOUBLE PRECISION FUNCTION calc_icpor0(T, A, REF_ICpoR)
311 DOUBLE PRECISION,
intent(in) :: T
313 DOUBLE PRECISION,
intent(in) :: A(1:5)
315 DOUBLE PRECISION,
intent(in) :: REF_ICpoR
320 DOUBLE PRECISION ICpoRT
324 icport = (((a(5)*t/5.0d0 + a(4)/4.0d0)*t + a(3)/3.0d0)*t + &
342 PURE DOUBLE PRECISION FUNCTION calc_h0or(T, Th, Tl, Tc, Ah, Al)
349 DOUBLE PRECISION,
intent(in) :: Ah(7), Al(7)
351 DOUBLE PRECISION,
intent(in) :: Th
352 DOUBLE PRECISION,
intent(in) :: Tl
353 DOUBLE PRECISION,
intent(in) :: Tc
355 DOUBLE PRECISION,
intent(in) :: T
384 CHARACTER(len=*) :: C
392 IF(c(i:i) == char(9)) c(i:i)=
' ' 412 CHARACTER(len=*) :: C
427 IF(c(i:i) == char(9) ) tabfound = .true.
428 if(tabfound) c(i:i)=
' ' double precision, dimension(0:dim_m, dim_n) icpor_l
double precision, dimension(0:dim_m, dim_n) thigh
double precision function calc_icpor(T, M, N, IER)
double precision, dimension(0:dim_m, dim_n) tcom
subroutine read_therm(funit, Sp, Thigh, Tlow, Tcom, MW, Ahigh, Alow, Hf298oR, IER)
double precision, dimension(7, 0:dim_m, dim_n) alow
subroutine read_therm_tester
pure double precision function calc_cpor(T, M, N)
subroutine get_values(line, value1, value2, value3)
double precision, dimension(7, 0:dim_m, dim_n) ahigh
double precision, dimension(0:dim_m, dim_n) tlow
double precision, dimension(0:dim_m, dim_n) icpor_h
pure double precision function calc_icpor0(T, A, REF_ICpoR)
pure double precision function calc_h0or(T, Th, Tl, Tc, Ah, Al)
pure double precision function calc_cpor0(T, A)