MFIX  2016-1
des_thermo_mod.f
Go to the documentation of this file.
1 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
2 ! !
3 ! Module name: DES_THERMO !
4 ! Author: J.Musser Date: 16-Jun-10 !
5 ! !
6 ! Purpose: Common elements for MFIX-DEM heat transfer. !
7 ! !
8 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
9  MODULE des_thermo
10 
11  USE param, only: dim_m
12 
13 ! Heat transfer correlation specified in mfix.dat
14 ! Default [RANZ_1952]
15  CHARACTER(LEN=24) :: des_conv_corr
16 
17  INTEGER :: des_conv_corr_enum
18  INTEGER, PARAMETER :: ranz_1952 = 0
19 
20 ! Run time flags for calculating the various modes of heat transfer
21  LOGICAL :: calc_conv_des = .false.
22  LOGICAL :: calc_cond_des(dim_m) = .false.
23  LOGICAL :: calc_radt_des(dim_m) = .false.
24 
25 ! Particle properties
26 !-----------------------------------------------------------------------
27 ! Particle temperature
28  DOUBLE PRECISION, ALLOCATABLE :: des_t_s(:)
29 
30 ! DES specific heat of particles by particle
31  DOUBLE PRECISION, ALLOCATABLE :: des_c_ps(:)
32 
33 ! Emissivity of particles
34  DOUBLE PRECISION :: des_em(dim_m)
35 ! Stefan-Boltzmann Constant
36  DOUBLE PRECISION :: sb_const
37 ! Bulk solids temperature for radiative heat transfer
38  DOUBLE PRECISION, ALLOCATABLE :: avgdes_t_s(:)
39 
40 ! Convective heat transfer coefficient TIMES particle surface area
41  DOUBLE PRECISION, ALLOCATABLE :: gammaxsa(:)
42 
43 
44 ! Thermodynamic Neighborhood
45 !-----------------------------------------------------------------------
46 ! Fluid Lens Proportion Constant used to calculate the radius of the
47 ! fluid lens that surrounds the particle for particle-fluid-particle
48 ! conduction. Default [ 0.2 ]
49  DOUBLE PRECISION :: flpc
50 
51 ! Mininum separation distance between the surface of two contacting
52 ! particles. This value is used to remove the singluarity that the
53 ! particle-fluid-particle conduciton model develops at the contact
54 ! interface. [4.0x10^(-10) meters]
55  DOUBLE PRECISION :: des_min_cond_dist
56 
57 
58 
59 ! Rates of heat transfer
60 !-----------------------------------------------------------------------
61 ! Generic heat transfer source to the particle.
62  DOUBLE PRECISION, ALLOCATABLE :: q_source(:), q_source0(:)
63 ! Convective heat transfer source
64  DOUBLE PRECISION, ALLOCATABLE :: conv_qs(:)
65 ! Heat source resulting from chemical reactions
66  DOUBLE PRECISION, ALLOCATABLE :: rxns_qs(:)
67 
68 
69 ! Fluid/Particle coupling
70 !---------------------------------------------------------------------//
71 ! Gas Phase Energy Eq source terms for gas-particle convection
72  DOUBLE PRECISION, ALLOCATABLE :: conv_sc(:), conv_sp(:)
73 
74  contains
75 
76 
77 !----------------------------------------------------------------------!
78 ! Function: CALC_Cp_DES !
79 ! Author: J.Musser Date: 11-DEC-15 !
80 ! !
81 ! Purpose: Calculate the specific heat of a particle. !
82 !----------------------------------------------------------------------!
83  PURE DOUBLE PRECISION FUNCTION calc_cp_des(pNP)
84 
85 ! Universal gas constant in cal/mol.K
86  use constant, only: rgas => gas_const_cal
87 ! Calculate the specific heat from polynomical data obtained from the
88 ! thermodynamic databases.
90 ! Number of species comprising species
91  use physprop, only: nmax_s
92  use physprop, only: c_ps0
93  use physprop, only: mw_s
94  use discretelement, only: pijk
95  use des_rxns, only: des_x_s
96  use run, only: units
97 
98  use param1, only: zero, undefined
99 
100  IMPLICIT NONE
101 
102 ! Dummy arguments
103 !---------------------------------------------------------------------//
104  INTEGER, INTENT(IN) :: pNP
105 ! DOUBLE PRECISION, INTENT(IN) :: pTs
106 ! Local Variables
107 !---------------------------------------------------------------------//
108 ! loop counter and error indicator
109  INTEGER :: NN, IER, MM
110  DOUBLE PRECISION :: lTs
111 !......................................................................!
112 
113 ! Temperature of particle
114  lts = des_t_s(pnp)
115 ! Phase of particle.
116  mm=pijk(pnp,5)
117 
118 ! Calculate the specific heat based on the species composition of the
119 ! particle and the data from the thermodynamic databases.
120  IF(c_ps0(mm) == undefined) THEN
121  calc_cp_des = zero
122  DO nn = 1, nmax_s(mm)
123  calc_cp_des = calc_cp_des + calc_cpor(lts, mm, nn) * &
124  des_x_s(pnp,nn)*rgas / mw_s(mm,nn)
125  ENDDO
126 ! Convert to SI units if needed.
127  IF (units == 'SI') calc_cp_des = 4183.925d0*calc_cp_des
128  ELSE
129 ! If a constant value specific heat has been assigned to the particle
130 ! in the mfix.dat file, use this value.
131  calc_cp_des = c_ps0(mm)
132  ENDIF
133  END FUNCTION calc_cp_des
134 
135  END MODULE des_thermo
double precision, dimension(:), allocatable gammaxsa
double precision, dimension(dim_m) c_ps0
Definition: physprop_mod.f:83
double precision, dimension(:), allocatable conv_sc
double precision sb_const
double precision, dimension(:), allocatable des_t_s
integer, parameter ranz_1952
logical, dimension(dim_m) calc_cond_des
double precision flpc
logical, dimension(dim_m) calc_radt_des
logical calc_conv_des
integer, parameter dim_m
Definition: param_mod.f:67
double precision, dimension(dim_m) des_em
double precision des_min_cond_dist
double precision, parameter undefined
Definition: param1_mod.f:18
double precision, dimension(:), allocatable q_source0
double precision, dimension(:), allocatable avgdes_t_s
integer des_conv_corr_enum
double precision, dimension(:,:), allocatable des_x_s
Definition: des_rxns_mod.f:21
pure double precision function calc_cpor(T, M, N)
pure double precision function calc_cp_des(pNP)
Definition: run_mod.f:13
double precision, dimension(:), allocatable conv_sp
Definition: param_mod.f:2
character(len=16) units
Definition: run_mod.f:30
double precision, dimension(:), allocatable conv_qs
double precision, dimension(dim_m, dim_n_s) mw_s
Definition: physprop_mod.f:127
double precision, dimension(:), allocatable q_source
double precision, dimension(:), allocatable rxns_qs
character(len=24) des_conv_corr
integer, dimension(dim_m) nmax_s
Definition: physprop_mod.f:121
double precision, parameter gas_const_cal
Definition: constant_mod.f:155
double precision, parameter zero
Definition: param1_mod.f:27
double precision, dimension(:), allocatable des_c_ps