File: RELATIVE:/../../../mfix.git/model/des/usr_rates_des.f

1     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
2     !                                                                      !
3     !  Module name: USR_RATES                                              !
4     !                                                                      !
5     !  Purpose: Hook for user defined reaction rates.                      !
6     !                                                                      !
7     !  Author: J.Musser                                   Date: 10-Oct-12  !
8     !                                                                      !
9     !  Comments: Write reaction rates in units of moles/sec (cgs and SI).  !
10     !                                                                      !
11     !  WARNING: Only discrete phase reactions should be specifed here.     !
12     !  Homogeneous gas phase reactions in DEM simulations must be given    !
13     !  in the continuum reaction hook (usr_rates.f).                       !
14     !                                                                      !
15     !  The call to usr_rates_des is made from inside a particle loop which !
16     !  is nested inside an IJK loop. Fluid grid calculations independent   !
17     !  of particle properties can be carried out in des/usr4_des.f to      !
18     !  reduce redundant calculations.                                      !
19     !                                                                      !
20     !  Example: Evaporation                                                !
21     !                                                                      !
22     !  mfix.dat input:                                                     !
23     !``````````````````````````````````````````````````````````````````````!
24     !    @(DES_RXNS)                                                       !
25     !      Evap { chem_eq = "Liquid --> Vapor" }                           !
26     !    @(DES_END)                                                        !
27     !``````````````````````````````````````````````````````````````````````!
28     !                                                                      !
29     !  des/usr_rates_des.f input:                                          !
30     !``````````````````````````````````````````````````````````````````````!
31     !    Sa = Pi*(2.0d0*DES_RADIUS(NP))**2    ! Particle surface area      !
32     !    H2O_xfr = ...  ! An expression for mass transfer coefficient      !
33     !    Cmg_H2O = ...  ! Molar concentration grad of water vapor          !
34     !    DES_RATES(EVAP) = Sa * H2O_xfr * Cmg_H2O                          !
35     !``````````````````````````````````````````````````````````````````````!
36     !  * Species alias and reaction names given in the data file can be    !
37     !    used in reference to the reaction index in DES_RATES and a        !
38     !    species index in gas/solids phase variables.                      !
39     !                                                                      !
40     !  * Additional information is provided in section 4.11 of the code    !
41     !    Readme.                                                           !
42     !                                                                      !
43     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
44           SUBROUTINE USR_RATES_DES(NP, pM, IJK, DES_RATES)
45     
46           USE compar
47           USE constant
48           USE des_thermo
49           USE des_rxns
50           USE discretelement
51           USE energy
52           USE fldvar
53           USE funits
54           USE geometry
55           USE indices
56           USE param
57           USE param1
58           USE physprop
59           USE rxns
60           USE run
61           USE usr
62           USE fun_avg
63           USE functions
64     
65           IMPLICIT NONE
66     
67           INTEGER, INTENT(IN) :: NP  ! Global index of particle
68           INTEGER, INTENT(IN) :: pM  ! Solid phase index of particle NP
69           INTEGER, INTENT(IN) :: IJK ! Fluid cell index containing NP
70     
71     ! Calculated reaction rates. (reacted moles per sec)
72           DOUBLE PRECISION, INTENT(OUT) :: DES_RATES(NO_OF_DES_RXNS)
73     
74     
75     ! Reaction specific variables:
76     !`````````````````````````````````````````````````````````````````````//
77     
78           INCLUDE 'species.inc'
79           INCLUDE 'usrnlst.inc'
80     
81     ! Reaction rates:
82     !`````````````````````````````````````````````````````````````````````//
83     ! Include reaction rates here. Reaction rates should be stored in the
84     ! variable DES_RATES. The reaction name given in the data file can be
85     ! used to store the rate in the appropriate array location. Additional
86     ! input format parameters are given in Section 4.11 of the code Readme.
87     
88           DES_RATES(:) = ZERO
89     
90           RETURN
91     
92           END SUBROUTINE USR_RATES_DES
93