File: N:\mfix\model\des\pic\calc_ps_pic.f

1     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
2     !  Subroutine: CALC_PS_PIC                                             !
3     !  Author: R. Garg                                                     !
4     !                                                                      !
5     !  Purpose: Calculate the particle stress.                             !
6     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
7           SUBROUTINE CALC_PS_PIC
8     
9     
10     ! Global Variables:
11     !---------------------------------------------------------------------//
12     ! Flag to use Snider's particle stress model
13           use mfix_pic, only: MPPIC_SOLID_STRESS_SNIDER
14     ! Particle stress
15           use mfix_pic, only: PIC_P_S
16     
17     ! Module procedures:
18     !---------------------------------------------------------------------//
19           use sendrecv, only: SEND_RECV
20     
21           IMPLICIT NONE
22     
23     !......................................................................!
24     
25     
26           IF(MPPIC_SOLID_STRESS_SNIDER) THEN
27              CALL CALC_PS_PIC_SNIDER
28           ELSE
29              CALL CALC_PS_PIC_GARG
30           ENDIF
31     
32           CALL SEND_RECV(PIC_P_S,1)
33     
34           RETURN
35           END SUBROUTINE CALC_PS_PIC
36     
37     
38     
39     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
40     !  Subroutine: CALC_PS_PIC                                             !
41     !  Author: R. Garg                                                     !
42     !                                                                      !
43     !  Purpose: Evaluate the particle stress model of Snider.              !
44     !                                                                      !
45     !  REF: D.M. Snider, "Three-Dimensional Multiphase Particle-in-Cell    !
46     !     Model for Dense Particle Flows," Journal of Computational        !
47     !     Physics, Vol. 170, No. 2, pp. 523-549, 2001.                     !
48     !                                                                      !
49     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
50           SUBROUTINE CALC_PS_PIC_SNIDER
51     
52     ! Global Variables:
53     !---------------------------------------------------------------------//
54     ! Model parameters for Snider particle stress model
55           use mfix_pic, only: FRIC_EXP_PIC
56           use mfix_pic, only: PSFAC_FRIC_PIC
57           use mfix_pic, only: FRIC_NON_SING_FAC
58     ! Calculated particle stress
59           use mfix_pic, only: PIC_P_S
60     ! Fluid phase volume fraction
61           use fldvar, only: EP_G
62     ! Fluid volume fraction at close-pack
63           use constant, only: EP_STAR
64     ! Domain bounds
65           use compar, only: IJKSTART3, IJKEND3
66     ! Double precision parameters
67           use param1, only: ONE
68     
69     ! Module procedures:
70     !---------------------------------------------------------------------//
71           use functions, only: FLUID_AT
72           use functions, only: WEST_OF, EAST_OF
73           use functions, only: SOUTH_OF, NORTH_OF
74           use functions, only: BOTTOM_OF, TOP_OF
75     
76           IMPLICIT NONE
77     
78     ! Local Variables:
79     !---------------------------------------------------------------------//
80     ! Loop counter
81           INTEGER :: IJK
82     ! Volume fraction of cell, modified for wall cells.
83           DOUBLE PRECISION :: lEPg
84     !......................................................................!
85     
86           DO IJK = IJKSTART3, IJKEND3
87     
88              IF(FLUID_AT(IJK)) THEN
89                 lEPg = EP_G(IJK)
90              ELSE
91     
92     ! Set the volume fraction in the wall to close pack.
93                 lEPg = EP_STAR
94      
95     ! Use the lowest value across all adjacent fluid cells. This is to keep
96     ! cells below close pack from pushing parcels through the walls.
97     !            lIJK = EAST_OF(IJK)
98     !            IF(FLUID_AT(lIJK))  lEPg = min(lEPg, EP_G(lIJK))
99     !!            lIJK = WEST_OF(IJK)
100     !            IF(FLUID_AT(lIJK))  lEPg = min(lEPg, EP_G(lIJK))
101     !            lIJK = NORTH_OF(IJK)
102     !            IF(FLUID_AT(lIJK))  lEPg = min(lEPg, EP_G(lIJK))
103     !!            lIJK = SOUTH_OF(IJK)
104     !            IF(FLUID_AT(lIJK))  lEPg = min(lEPg, EP_G(lIJK))
105     !            IF(DO_K) THEN
106     !               lIJK = TOP_OF(IJK)
107     !               IF(FLUID_AT(lIJK))  lEPg = min(lEPg, EP_G(lIJK))
108     !               lIJK = BOTTOM_OF(IJK)
109     !               IF(FLUID_AT(lIJK))  lEPg = min(lEPg, EP_G(lIJK))
110     !            ENDIF
111              ENDIF
112     
113     ! Particle stress :: Snider (Eq 33)
114              PIC_P_S(IJK,1) = PSFAC_FRIC_PIC *((ONE - lEPg)**FRIC_EXP_PIC)/&
115                 MAX(lEPg - EP_STAR, FRIC_NON_SING_FAC*lEPg)
116           ENDDO
117     
118     
119     
120           RETURN
121           END SUBROUTINE CALC_PS_PIC_SNIDER
122     
123     
124     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
125     !  Subroutine: CALC_PS_PIC                                             !
126     !  Author: R. Garg                                                     !
127     !                                                                      !
128     !  Purpose: Evaluate the particle stress as a coloring function:       !
129     !     X=0.0 :: cells below packing limit                               !
130     !     X=EPg :: cells above packing limit                               !
131     !     X=1.0 :: wall cells (far avobe max packing)                      !
132     !                                                                      !
133     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
134           SUBROUTINE CALC_PS_PIC_GARG
135     
136     
137     ! Global Variables:
138     !---------------------------------------------------------------------//
139     ! Calculated particle stress
140           use mfix_pic, only: PIC_P_S
141     ! Resulting particle stress force
142           use mfix_pic, only: PS_FORCE_PIC
143     ! Fluid phase volume fraction
144           use fldvar, only: EP_G
145     ! Fluid volume fraction at close-pack
146           use constant, only: EP_STAR
147     ! Domain bounds
148           use compar, only: IJKSTART3, IJKEND3
149     ! Double precision parameters
150           use param1, only: ZERO, ONE
151     
152     ! Module procedures:
153     !---------------------------------------------------------------------//
154           use functions, only: FLUID_AT
155     
156     
157           IMPLICIT NONE
158     
159     
160     ! Local Variables:
161     !---------------------------------------------------------------------//
162     ! Loop counter
163           INTEGER :: IJK
164     !......................................................................!
165     
166     
167     ! The Garg model uses a coloring function approach. 
168           DO IJK = IJKSTART3, IJKEND3
169              PS_FORCE_PIC(:,IJK) = ZERO
170              IF(FLUID_AT(IJK)) THEN
171                 IF(EP_G(IJK) < EP_STAR) THEN
172                    PIC_P_S(IJK,1) = (ONE - EP_G(IJK))
173                 ELSE
174                    PIC_P_S(IJK,1) = ZERO
175                 ENDIF
176              ELSE
177                 PIC_P_S(IJK,1) = ONE
178              ENDIF
179           ENDDO
180     
181           RETURN
182           END SUBROUTINE CALC_PS_PIC_GARG
183