MFIX  2016-1
calc_h.f
Go to the documentation of this file.
1 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvC
2 ! C
3 ! Function name: CALC_H C
4 ! Purpose: Calculate specific enthalpy of species N in phase M C
5 ! C
6 ! Author: M. Syamlal Date: 27-DEC-2007 C
7 ! C
8 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C
9  DOUBLE PRECISION FUNCTION calc_h(refT, M, NN)
10 
11 ! Modules
12 !---------------------------------------------------------------------//
13  USE physprop, only: mw_g, mw_s, hfrefor
14  USE constant, only: rgas => gas_const_cal
16  IMPLICIT NONE
17 
18 ! Dummy arguments
19 !---------------------------------------------------------------------//
20 ! cell, phase and species indices
21  DOUBLE PRECISION, INTENT(IN) :: refT ! Temperature
22  INTEGER, INTENT(IN) :: M ! Phase index
23  INTEGER, INTENT(IN) :: NN ! Species index
24 
25 ! Local variables
26 !---------------------------------------------------------------------//
27  DOUBLE PRECISION :: ICpoR
28  DOUBLE PRECISION :: lMW
29  INTEGER :: IER
30 !---------------------------------------------------------------------//
31 
32  ier = 0
33 
34  if(m == 0)then
35  lmw = mw_g(nn)
36  else
37  lmw = mw_s(m,nn)
38  endif
39 
40 ! Integrate the specific heat from zero to refT
41  icpor = calc_icpor(reft, m, nn, ier)
42 
43 ! Evaluate the enthalpy of species N at refT
44  calc_h = (hfrefor(m,nn) + icpor) * (rgas / lmw)
45 
46  RETURN
47  END FUNCTION calc_h
double precision function calc_icpor(T, M, N, IER)
double precision, dimension(dim_n_g) mw_g
Definition: physprop_mod.f:124
double precision, dimension(0:dim_m, dim_n) hfrefor
Definition: physprop_mod.f:145
double precision function calc_h(refT, M, NN)
Definition: calc_h.f:10
double precision, dimension(dim_m, dim_n_s) mw_s
Definition: physprop_mod.f:127
double precision, parameter gas_const_cal
Definition: constant_mod.f:155