MFIX  2016-1
solve_granular_energy.f
Go to the documentation of this file.
1 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvC
2 ! C
3 ! Subroutine: SOLVE_GRANULAR_ENERGY C
4 ! Purpose: Solve granular energy equations in matrix equation C
5 ! form Ax=b. The center coefficient (ap) and source vector (b) C
6 ! are negative. The off-diagonal coefficients are positive. C
7 ! C
8 ! Author: K. Agrawal Date: C
9 ! C
10 ! Literature/Document References: C
11 ! C
12 ! C
13 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C
14  SUBROUTINE solve_granular_energy(IER)
15 
16 ! Modules
17 !---------------------------------------------------------------------//
18  use ambm, only: a_m, b_m, lock_ambm, unlock_ambm
20  use compar, only: ijkstart3, ijkend3, mype, numpes
21  use constant, only: to_si, pi
22  use exit, only: mfix_exit
23  use fldvar, only: ep_g, theta_m, theta_mo
24  use fldvar, only: ep_s, u_s, v_s, w_s, rop_so
25  use fldvar, only: ro_s, d_p
26  use functions, only: fluid_at, wall_at, zmax
27  use geometry, only: ijkmax2, vol
29  use mflux, only: flux_se, flux_sn, flux_st
30  use mflux, only: flux_sse, flux_ssn, flux_sst
31  use mflux, only: flux_ne, flux_nn, flux_nt
32  use mms, only: use_mms, mms_theta_m_src
33  use mpi_utility, only: global_all_sum
34  use param, only: dimension_3, dimension_m
35  use param1, only: zero, one, dimension_lm
36  use physprop, only: kth_s
37  use physprop, only: smax, mmax
38  use residual, only: resid, max_resid, ijk_resid
39  use residual, only: num_resid, den_resid
40  use residual, only: resid_th
41  use run, only: discretize, odt, added_mass, m_am, schaeffer
42  use run, only: kt_type_enum, lun_1984, ahmadi_1995, simonin_1996
43  use run, only: kt_type, gd_1999, gtsh_2012, ghd_2007, ia_2005
44  use rxns, only: sum_r_s
45  use toleranc, only: zero_ep_s
46  use ur_facs, only: ur_fac
48  use usr_src, only: gran_energy
49  use visc_s, only: ep_g_blend_start
50  IMPLICIT NONE
51 
52 ! Dummy arguments
53 !---------------------------------------------------------------------//
54 ! Error index
55  INTEGER :: IER
56 
57 ! Local variables
58 !---------------------------------------------------------------------//
59 ! phase index
60  INTEGER :: M, L
61 ! Cp * Flux
62  DOUBLE PRECISION CpxFlux_E(dimension_3), CpxFlux_N(dimension_3), CpxFlux_T(dimension_3)
63 ! previous time step term
64  DOUBLE PRECISION :: apo
65 ! source terms which appear appear in the center coefficient (lhs) and
66 ! the rhs vector
67  DOUBLE PRECISION :: sourcelhs, sourcerhs
68 ! Indices
69  INTEGER :: IJK
70 ! linear equation solver method and iterations
71  INTEGER :: LEQM, LEQI
72 ! particle mass and diameter
73  DOUBLE PRECISION :: M_PM,D_PM
74 ! total solids volume fraction
75  DOUBLE PRECISION :: TOT_EPS(dimension_3)
76 ! net production of all solids phase
77  DOUBLE PRECISION :: TOT_SUM_RS(dimension_3)
78 ! old value of total solids number density
79  DOUBLE PRECISION :: TOT_NO(dimension_3)
80 ! small value of theta_m, 1 cm2/s2 = 1e-4 m2/s2
81  DOUBLE PRECISION :: smallTheta
82 ! temporary variable for volume x interphase transfer
83 ! coefficient between solids phases
84  DOUBLE PRECISION :: VxTC_ss(dimension_3,dimension_lm)
85 
86 ! Arrays for storing errors:
87 ! 140 - Linear Eq diverged
88 ! 141 - Unphysical values
89 ! 14x - Unclassified
90  INTEGER :: Err_l(0:numpes-1) ! local
91  INTEGER :: Err_g(0:numpes-1) ! global
92 
93 ! temporary use of global arrays:
94 ! array1 (locally s_p)
95 ! source vector: coefficient of dependent variable
96 ! becomes part of a_m matrix; must be positive
97  DOUBLE PRECISION :: S_P(dimension_3)
98 ! array2 (locally s_c)
99 ! source vector: constant part becomes part of b_m vector
100  DOUBLE PRECISION :: S_C(dimension_3)
101 ! array3 (locally eps)
102  DOUBLE PRECISION :: eps(dimension_3)
103 
104 ! Septadiagonal matrix A_m, vector b_m
105 ! DOUBLE PRECISION A_m(DIMENSION_3, -3:3, 0:DIMENSION_M)
106 ! DOUBLE PRECISION B_m(DIMENSION_3, 0:DIMENSION_M)
107 !---------------------------------------------------------------------//
108 
109  call lock_ambm ! locks arrays a_m and b_m
110 
111 ! Initialize error flags.
112  err_l = 0
113 
114  smalltheta = (to_si)**4 * zero_ep_s
115 
116  DO m = 0, mmax
117  CALL init_ab_m (a_m, b_m, ijkmax2, m)
118  ENDDO
119 
120  SELECT CASE (kt_type_enum)
121  CASE(lun_1984, ahmadi_1995, simonin_1996, gd_1999, gtsh_2012)
122 ! ---------------------------------------------------------------->>>
123  DO m = 1, smax
124 
125  DO ijk = ijkstart3, ijkend3
126 
127  IF(.NOT.added_mass .OR. m /= m_am) THEN
128  cpxflux_e(ijk) = 1.5d0 * flux_se(ijk,m)
129  cpxflux_n(ijk) = 1.5d0 * flux_sn(ijk,m)
130  cpxflux_t(ijk) = 1.5d0 * flux_st(ijk,m)
131  ELSE
132  cpxflux_e(ijk) = 1.5d0 * flux_sse(ijk)
133  cpxflux_n(ijk) = 1.5d0 * flux_ssn(ijk)
134  cpxflux_t(ijk) = 1.5d0 * flux_sst(ijk)
135  ENDIF
136 
137  IF (fluid_at(ijk)) THEN
138 ! calculate the source terms to be used in the a matrix and b vector
139  IF (kt_type_enum == gd_1999 .OR. &
140  kt_type_enum == gtsh_2012) THEN
141  CALL source_granular_energy_gd(sourcelhs, &
142  sourcerhs, ijk, m)
143  ELSE
144  CALL source_granular_energy(sourcelhs, &
145  sourcerhs, ijk, m)
146  ENDIF
147  apo = 1.5d0*rop_so(ijk,m)*vol(ijk)*odt
148  s_p(ijk) = apo + sourcelhs + 1.5d0* &
149  zmax(sum_r_s(ijk,m)) * vol(ijk)
150  s_c(ijk) = apo*theta_mo(ijk,m) + sourcerhs + 1.5d0* &
151  theta_m(ijk,m)*zmax((-sum_r_s(ijk,m))) * vol(ijk)
152  eps(ijk) = ep_s(ijk,m)
153 ! MMS Source term.
154  IF(use_mms) s_c(ijk) = s_c(ijk) + &
155  mms_theta_m_src(ijk)*vol(ijk)
156  ELSE
157  eps(ijk) = zero
158  s_p(ijk) = zero
159  s_c(ijk) = zero
160  IF(use_mms) eps(ijk) = ep_s(ijk,m)
161  ENDIF
162  ENDDO ! end do loop (ijk=ijkstart3,ijkend3)
163 
164 ! calculate the convection-diffusion terms
165  CALL conv_dif_phi (theta_m(1,m), kth_s(1,m), discretize(8), &
166  u_s(1,m), v_s(1,m), w_s(1,m), &
167  cpxflux_e, cpxflux_n, cpxflux_t, m, a_m, b_m)
168 
169 ! calculate standard bc
170  CALL bc_phi (theta_m(1,m), bc_theta_m(1,m), bc_thetaw_m(1,m), &
171  bc_hw_theta_m(1,m), bc_c_theta_m(1,m), m, a_m, b_m)
172 
173 ! override bc settings if Johnson-Jackson bcs are specified
174  CALL bc_theta (m, a_m, b_m)
175 
176 ! set the source terms in a and b matrix form
177  CALL source_phi (s_p, s_c, eps, theta_m(1,m), m, a_m, b_m)
178 
179 ! usr source
180  IF (call_usr_source(8)) CALL calc_usr_source(gran_energy,&
181  a_m, b_m, lm=m)
182 
183 ! Adjusting the values of theta_m to zero when Ep_g < EP_star
184 ! (Shaeffer, 1987). This is done here instead of calc_mu_s to
185 ! avoid convergence problems. (sof)
186  IF (schaeffer) THEN
187  DO ijk = ijkstart3, ijkend3
188  IF (fluid_at(ijk) .AND. &
189  ep_g(ijk) .LT. ep_g_blend_start(ijk)) THEN
190 
191  a_m(ijk,1,m) = zero
192  a_m(ijk,-1,m) = zero
193  a_m(ijk,2,m) = zero
194  a_m(ijk,-2,m) = zero
195  a_m(ijk,3,m) = zero
196  a_m(ijk,-3,m) = zero
197  a_m(ijk,0,m) = -one
198  b_m(ijk,m) = -smalltheta
199  ENDIF
200  ENDDO
201  ENDIF
202 
203  CALL calc_resid_s (theta_m(1,m), a_m, b_m, m, &
204  num_resid(resid_th,m), &
205  den_resid(resid_th,m), resid(resid_th,m), &
206  max_resid(resid_th,m), ijk_resid(resid_th,m), zero)
207 
208  CALL under_relax_s (theta_m(1,m), a_m, b_m, m, ur_fac(8))
209 
210 ! call check_ab_m(a_m, b_m, m, .true., ier)
211 ! write(*,*) resid(resid_th, m), max_resid(resid_th, m),&
212 ! ijk_resid(resid_th, m)
213 ! call write_ab_m(a_m, b_m, ijkmax2, m, ier)
214 
215 ! call test_lin_eq(ijkmax2, ijmax2, imax2, a_m(1, -3, M), &
216 ! 1, DO_K, ier)
217 
218  CALL adjust_leq (resid(resid_th,m), leq_it(8), leq_method(8),&
219  leqi, leqm)
220 
221  CALL solve_lin_eq ('Theta_m', 8, theta_m(1,m), a_m, b_m, m,&
222  leqi, leqm, leq_sweep(8), leq_tol(8), leq_pc(8), ier)
223 ! call out_array(Theta_m(1,m), 'Theta_m')
224 
225 ! Check for linear solver divergence.
226  IF(ier == -2) err_l(mype) = 140
227 
228 ! Remove very small negative values of theta caused by leq solvers
229  CALL adjust_theta (m, ier)
230 ! large negative granular temp -> divergence
231  IF (ier /= 0) err_l(mype) = 141
232 
233  ENDDO ! end do loop (m=1,smax)
234 ! end case(lun_1984, simonin_1996, ahmadi_1995, gd_1999, gtsh_2012)
235 ! ----------------------------------------------------------------<<<
236 
237  CASE(ia_2005)
238 ! ---------------------------------------------------------------->>>
239  DO m = 1, smax
240  DO ijk = ijkstart3, ijkend3
241 
242 ! Skip walls where some values are undefined.
243  IF(wall_at(ijk)) cycle
244 
245  d_pm = d_p(ijk,m)
246  m_pm = (pi/6.d0)*(d_pm**3)*ro_s(ijk,m)
247 
248 ! In Iddir & Arastoopour (2005) the granular temperature includes
249 ! mass of the particle in the definition.
250  IF(.NOT.added_mass .OR. m /= m_am) THEN
251  cpxflux_e(ijk) = (1.5d0/m_pm) * flux_se(ijk,m)
252  cpxflux_n(ijk) = (1.5d0/m_pm) * flux_sn(ijk,m)
253  cpxflux_t(ijk) = (1.5d0/m_pm) * flux_st(ijk,m)
254  ELSE ! in case added mass is used.
255  cpxflux_e(ijk) = (1.5d0/m_pm) * flux_sse(ijk)
256  cpxflux_n(ijk) = (1.5d0/m_pm) * flux_ssn(ijk)
257  cpxflux_t(ijk) = (1.5d0/m_pm) * flux_sst(ijk)
258  ENDIF
259 
260  IF (fluid_at(ijk)) THEN
261 ! calculate the source terms to be used in the a matrix and b vector
262  CALL source_granular_energy_ia(sourcelhs, &
263  sourcerhs, ijk, m)
264  apo = (1.5d0/m_pm)*rop_so(ijk,m)*vol(ijk)*odt
265  s_p(ijk) = apo + sourcelhs + (1.5d0/m_pm)*&
266  zmax(sum_r_s(ijk,m)) * vol(ijk)
267  s_c(ijk) = apo*theta_mo(ijk,m) + sourcerhs + &
268  (1.50d0/m_pm)*theta_m(ijk,m)*&
269  zmax((-sum_r_s(ijk,m))) * vol(ijk)
270  eps(ijk) = ep_s(ijk,m)
271  ELSE
272  eps(ijk) = zero
273  s_p(ijk) = zero
274  s_c(ijk) = zero
275  ENDIF
276  ENDDO ! end do loop (ijk=ijkstart3,ijkend3)
277 
278 ! calculate the convection-diffusion terms
279  CALL conv_dif_phi (theta_m(1,m), kth_s(1,m), discretize(8),&
280  u_s(1,m), v_s(1,m), w_s(1,m), &
281  cpxflux_e, cpxflux_n, cpxflux_t, m, a_m, b_m)
282 
283 ! calculate standard bc
284  CALL bc_phi (theta_m(1,m), bc_theta_m(1,m), bc_thetaw_m(1,m),&
285  bc_hw_theta_m(1,m),bc_c_theta_m(1,m), m, a_m, b_m)
286 
287 ! override bc settings if Johnson-Jackson bcs are specified
288  CALL bc_theta (m, a_m, b_m)
289 
290 ! set the source terms in a and b matrix form
291  CALL source_phi (s_p, s_c, eps, theta_m(1,m), m, a_m, b_m)
292 
293 ! usr source
294  IF (call_usr_source(8)) CALL calc_usr_source(gran_energy,&
295  a_m, b_m, lm=m)
296  ENDDO ! end do loop (m = 1, smax)
297 
298 ! use partial elimination on collisional dissipation term: SUM(Nip)
299 ! SUM( ED_s_ip* (Theta_p-Theta_i))
300  IF (smax > 1) THEN
301  CALL calc_vtc_ss (vxtc_ss)
302  CALL partial_elim_ia (theta_m, vxtc_ss, a_m, b_m)
303  ENDIF
304 
305 ! Adjusting the values of theta_m to zero when Ep_g < EP_star
306 ! (Shaeffer, 1987). This is done here instead of calc_mu_s to
307 ! avoid convergence problems. (sof)
308  IF (schaeffer) THEN
309  DO m = 1, smax
310  DO ijk = ijkstart3, ijkend3
311  IF (fluid_at(ijk) .AND. &
312  ep_g(ijk) .LT. ep_g_blend_start(ijk)) THEN
313 
314  d_pm = d_p(ijk,m)
315  m_pm = (pi/6.d0)*(d_pm**3)*ro_s(ijk,m)
316  a_m(ijk,1,m) = zero
317  a_m(ijk,-1,m) = zero
318  a_m(ijk,2,m) = zero
319  a_m(ijk,-2,m) = zero
320  a_m(ijk,3,m) = zero
321  a_m(ijk,-3,m) = zero
322  a_m(ijk,0,m) = -one
323 ! In Iddir & Arastoopour (2005) the granular temperature includes
324 ! mass of the particle in the definition. Systems with small
325 ! particles can give rise to smaller temperatures than the standard
326 ! zero_ep_s
327  b_m(ijk,m) = -smalltheta*m_pm
328  ENDIF
329  ENDDO
330  ENDDO ! for M
331  ENDIF ! end if (schaeffer)
332 
333  DO m = 1, smax
334  CALL calc_resid_s (theta_m(1,m), a_m, b_m, m, &
335  num_resid(resid_th,m), den_resid(resid_th,m), resid(resid_th,m),&
336  max_resid(resid_th,m), ijk_resid(resid_th,m), zero)
337 
338  CALL under_relax_s (theta_m(1,m), a_m, b_m, m, ur_fac(8))
339 
340  CALL adjust_leq (resid(resid_th,m), leq_it(8), &
341  leq_method(8), leqi, leqm)
342 
343  CALL solve_lin_eq ('Theta_m', 8, theta_m(1,m), a_m, b_m, m,&
344  leqi, leqm, leq_sweep(8), leq_tol(8), leq_pc(8), ier)
345 ! call out_array(Theta_m(1,m), 'Theta_m')
346 
347 ! Check for linear solver divergence.
348  IF(ier == -2) err_l(mype) = 140
349 
350 ! Remove very small negative values of theta caused by leq solvers
351  CALL adjust_theta (m, ier)
352 ! large negative granular temp -> divergence
353  IF (ier /= 0) err_l(mype) = 141
354 
355  ENDDO ! end do loop (m=1,smax)
356 ! end case(ia_2005)
357 ! ----------------------------------------------------------------<<<
358 
359 
360  CASE (ghd_2007)
361 ! ---------------------------------------------------------------->>>
362 ! do not loop over solids phases. solve for the mixture phase
363  m = mmax
364 
365 ! initialize
366  tot_no(:) = zero
367  tot_sum_rs(:) = zero
368  tot_eps(:) = zero
369 
370  CALL calc_nflux ()
371 
372  DO ijk = ijkstart3, ijkend3
373 
374 ! total number density is used for GHD theory
375  cpxflux_e(ijk) = 1.5d0 * flux_ne(ijk)
376  cpxflux_n(ijk) = 1.5d0 * flux_nn(ijk)
377  cpxflux_t(ijk) = 1.5d0 * flux_nt(ijk)
378 
379  IF (fluid_at(ijk)) THEN
380  DO l = 1,smax
381  m_pm = (pi/6.d0)*(d_p(ijk,l)**3)*ro_s(ijk,l)
382  tot_sum_rs(ijk) = tot_sum_rs(ijk) + sum_r_s(ijk,l)/m_pm
383  tot_no(ijk) = tot_no(ijk) + rop_so(ijk,l)/m_pm
384  tot_eps(ijk) = tot_eps(ijk) + ep_s(ijk,l)
385  ENDDO
386 
387 ! calculate the source terms to be used in the a matrix and b vector
388  CALL source_ghd_granular_energy (sourcelhs, &
389  sourcerhs, ijk)
390  apo = 1.5d0 * tot_no(ijk)*vol(ijk)*odt
391  s_p(ijk) = apo + sourcelhs + 1.5d0 *&
392  zmax(tot_sum_rs(ijk)) * vol(ijk)
393  s_c(ijk) = apo*theta_mo(ijk,m) + sourcerhs + 1.50d0 *&
394  theta_m(ijk,m)*zmax(-tot_sum_rs(ijk)) * vol(ijk)
395  eps(ijk) = tot_eps(ijk)
396  ELSE
397  eps(ijk) = zero
398  s_p(ijk) = zero
399  s_c(ijk) = zero
400  ENDIF
401  ENDDO ! end do loop (ijk=ijkstart3,ijkend3)
402 
403 ! calculate the convection-diffusion terms
404  CALL conv_dif_phi (theta_m(1,m), kth_s(1,m), discretize(8),&
405  u_s(1,m), v_s(1,m), w_s(1,m), &
406  cpxflux_e, cpxflux_n, cpxflux_t, m, a_m, b_m)
407 
408 ! calculate standard bc
409  CALL bc_phi (theta_m(1,m), bc_theta_m(1,m), bc_thetaw_m(1,m), &
410  bc_hw_theta_m(1,m), bc_c_theta_m(1,m), m, a_m, b_m)
411 
412 ! override bc settings if Johnson-Jackson bcs are specified
413  CALL bc_theta (m, a_m, b_m)
414 
415 ! set the source terms in a and b matrix form
416  CALL source_phi (s_p, s_c, eps, theta_m(1,m), m, a_m, b_m)
417 
418 ! usr source
419  IF (call_usr_source(8)) CALL calc_usr_source(gran_energy,&
420  a_m, b_m, lm=m)
421 
422  CALL calc_resid_s (theta_m(1,m), a_m, b_m, m, &
423  num_resid(resid_th,m), den_resid(resid_th,m), resid(resid_th,m),&
424  max_resid(resid_th,m), ijk_resid(resid_th,m), zero)
425 
426  CALL under_relax_s (theta_m(1,m), a_m, b_m, m, ur_fac(8))
427 
428  CALL adjust_leq (resid(resid_th,m), leq_it(8), leq_method(8),&
429  leqi, leqm)
430 
431  CALL solve_lin_eq ('Theta_m', 8, theta_m(1,m), a_m, b_m, m, &
432  leqi, leqm, leq_sweep(8), leq_tol(8), leq_pc(8), ier)
433 ! call out_array(Theta_m(1,m), 'Theta_m')
434 
435 ! Check for linear solver divergence.
436  IF(ier == -2) err_l(mype) = 140
437 
438 ! Remove very small negative values of theta caused by leq solvers
439  CALL adjust_theta (m, ier)
440 
441 ! large negative granular temp -> divergence
442  IF (ier /= 0) err_l(mype) = 141
443 
444 ! end case(ghd_2007)
445 ! ----------------------------------------------------------------<<<
446 
447  CASE DEFAULT
448 ! should never hit this
449  WRITE (*, '(A)') 'ADJUST_THETA'
450  WRITE (*, '(A,A)') 'Unknown KT_TYPE: ', kt_type
451  call mfix_exit(mype)
452  END SELECT ! end selection of kt_type_enum
453 
454  call unlock_ambm
455 
456  CALL global_all_sum(err_l, err_g)
457  ier = maxval(err_g)
458 
459  RETURN
460  END SUBROUTINE solve_granular_energy
double precision, dimension(:,:,:), allocatable a_m
Definition: ambm_mod.f:27
double precision, dimension(:), allocatable flux_ne
Definition: mflux_mod.f:51
double precision, dimension(:,:), allocatable v_s
Definition: fldvar_mod.f:105
double precision to_si
Definition: constant_mod.f:146
double precision, dimension(dim_eqs) ur_fac
Definition: ur_facs_mod.f:6
integer ijkend3
Definition: compar_mod.f:80
double precision, dimension(:), allocatable ep_g
Definition: fldvar_mod.f:15
double precision, dimension(:), allocatable mms_theta_m_src
Definition: mms_mod.f:70
double precision, dimension(:,:), allocatable flux_st
Definition: mflux_mod.f:24
subroutine source_granular_energy_ia(SOURCELHS, SOURCERHS, IJK, M)
integer dimension_lm
Definition: param1_mod.f:13
subroutine calc_usr_source(lEQ_NO, A_M, B_M, lB_MMAX, lM, lN)
Definition: usr_src_mod.f:32
double precision, parameter one
Definition: param1_mod.f:29
integer dimension_3
Definition: param_mod.f:11
integer ijkmax2
Definition: geometry_mod.f:80
subroutine init_ab_m(A_M, B_M, IJKMAX2A, M)
Definition: init_ab_m.f:21
logical added_mass
Definition: run_mod.f:91
double precision, dimension(:,:), allocatable w_s
Definition: fldvar_mod.f:117
double precision, dimension(:,:), allocatable den_resid
Definition: residual_mod.f:52
Definition: rxns_mod.f:1
subroutine solve_granular_energy(IER)
double precision, dimension(:), allocatable flux_ssn
Definition: mflux_mod.f:31
subroutine under_relax_s(VAR, A_M, B_M, M, UR)
Definition: under_relax.f:21
double precision, dimension(:,:), allocatable sum_r_s
Definition: rxns_mod.f:35
subroutine calc_resid_s(VAR, A_M, B_M, M, NUM, DEN, RESID, MAX_RESID, IJK_RESID, TOL)
Definition: calc_resid.f:197
double precision, dimension(:,:), allocatable num_resid
Definition: residual_mod.f:49
Definition: ambm_mod.f:16
character(len=4), dimension(dim_eqs) leq_sweep
Definition: leqsol_mod.f:20
double precision, dimension(:,:), allocatable kth_s
Definition: physprop_mod.f:101
subroutine source_granular_energy(SOURCELHS, SOURCERHS, IJK, M)
double precision, dimension(:,:), allocatable u_s
Definition: fldvar_mod.f:93
integer numpes
Definition: compar_mod.f:24
double precision, dimension(:,:), allocatable max_resid
Definition: residual_mod.f:40
double precision, dimension(dimension_bc, dim_m) bc_thetaw_m
Definition: bc_mod.f:355
double precision, dimension(:,:), allocatable theta_mo
Definition: fldvar_mod.f:152
double precision, dimension(dimension_bc, dim_m) bc_c_theta_m
Definition: bc_mod.f:358
integer, parameter resid_th
Definition: residual_mod.f:16
subroutine partial_elim_ia(VAR_S, VXTCSS, A_M, B_M)
Definition: partial_elim.f:186
double precision, dimension(:,:), allocatable d_p
Definition: fldvar_mod.f:57
subroutine mfix_exit(myID, normal_termination)
Definition: exit.f:5
integer mmax
Definition: physprop_mod.f:19
integer, dimension(dim_eqs) leq_it
Definition: leqsol_mod.f:11
subroutine source_ghd_granular_energy(SOURCELHS, SOURCERHS, IJK)
integer m_am
Definition: run_mod.f:94
Definition: exit.f:2
double precision, parameter zero_ep_s
Definition: toleranc_mod.f:15
subroutine lock_ambm
Definition: ambm_mod.f:38
double precision odt
Definition: run_mod.f:54
subroutine bc_phi(VAR, BC_PHIF, BC_PHIW, BC_HW_PHI, BC_C_PHI, M, A_M, B_M)
Definition: bc_phi.f:13
double precision, dimension(:,:), allocatable theta_m
Definition: fldvar_mod.f:149
Definition: mms_mod.f:12
logical schaeffer
Definition: run_mod.f:157
double precision, dimension(:), allocatable ep_g_blend_start
Definition: visc_s_mod.f:57
subroutine adjust_leq(RESID, LEQ_ITL, LEQ_METHODL, LEQI, LEQM)
Definition: adjust_leq.f:21
double precision, dimension(dim_eqs) leq_tol
Definition: leqsol_mod.f:23
double precision, dimension(:,:), allocatable rop_so
Definition: fldvar_mod.f:54
Definition: run_mod.f:13
Definition: param_mod.f:2
double precision, dimension(:,:), allocatable ro_s
Definition: fldvar_mod.f:45
subroutine calc_nflux()
Definition: calc_nflux.f:24
integer, dimension(:,:), allocatable ijk_resid
Definition: residual_mod.f:46
subroutine adjust_theta(M, IER)
Definition: adjust_theta.f:17
integer mype
Definition: compar_mod.f:24
double precision, dimension(:), allocatable flux_nt
Definition: mflux_mod.f:55
subroutine conv_dif_phi(PHI, DIF, DISC, UF, VF, WF, Flux_E, Flux_N, Flux_T, M, A_M, B_M)
Definition: conv_dif_phi.f:23
integer ijkstart3
Definition: compar_mod.f:80
logical use_mms
Definition: mms_mod.f:15
subroutine source_granular_energy_gd(SOURCELHS, SOURCERHS, IJK, M)
double precision function ep_s(IJK, xxM)
Definition: fldvar_mod.f:178
double precision, dimension(dimension_bc, dim_m) bc_hw_theta_m
Definition: bc_mod.f:352
double precision, dimension(dimension_bc, dim_m) bc_theta_m
Definition: bc_mod.f:105
integer, dimension(dim_eqs) discretize
Definition: run_mod.f:67
integer, dimension(dim_eqs) leq_method
Definition: leqsol_mod.f:14
integer smax
Definition: physprop_mod.f:22
double precision, dimension(:,:), allocatable flux_se
Definition: mflux_mod.f:22
subroutine source_phi(S_P, S_C, EP, PHI, M, A_M, B_M)
Definition: source_phi.f:26
logical, dimension(dim_eqs) call_usr_source
Definition: usr_src_mod.f:7
double precision, dimension(:,:), allocatable resid
Definition: residual_mod.f:37
double precision, dimension(:,:), allocatable b_m
Definition: ambm_mod.f:28
double precision, parameter pi
Definition: constant_mod.f:158
double precision, dimension(:), allocatable flux_nn
Definition: mflux_mod.f:53
double precision, dimension(:), allocatable vol
Definition: geometry_mod.f:212
integer dimension_m
Definition: param_mod.f:18
double precision, dimension(:,:), allocatable flux_sn
Definition: mflux_mod.f:20
double precision, parameter zero
Definition: param1_mod.f:27
subroutine unlock_ambm
Definition: ambm_mod.f:52
double precision, dimension(:), allocatable flux_sst
Definition: mflux_mod.f:33
subroutine bc_theta(M, A_m, B_m)
Definition: bc_theta.f:31
Definition: bc_mod.f:23
subroutine calc_vtc_ss(VXTC_SS)
Definition: vtc_scalar.f:20
double precision, dimension(:), allocatable flux_sse
Definition: mflux_mod.f:29
subroutine solve_lin_eq(VNAME, Vno, VAR, A_M, B_M, M, ITMAX, METHOD, SWEEP, TOL1, PC, IER)
Definition: solve_lin_eq.f:19
character(len=4), dimension(dim_eqs) leq_pc
Definition: leqsol_mod.f:26