MFIX  2016-1
usr_rates_des.f
Go to the documentation of this file.
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 
80 ! Reaction rates:
81 !`````````````````````````````````````````````````````````````````````//
82 ! Include reaction rates here. Reaction rates should be stored in the
83 ! variable DES_RATES. The reaction name given in the data file can be
84 ! used to store the rate in the appropriate array location. Additional
85 ! input format parameters are given in Section 4.11 of the code Readme.
86 
87  des_rates(:) = zero
88 
89  RETURN
90 
91  END SUBROUTINE usr_rates_des
Definition: rxns_mod.f:1
integer no_of_des_rxns
Definition: des_rxns_mod.f:51
Definition: run_mod.f:13
Definition: param_mod.f:2
Definition: usr_mod.f:1
subroutine usr_rates_des(NP, pM, IJK, DES_RATES)
Definition: usr_rates_des.f:45
double precision, parameter zero
Definition: param1_mod.f:27