MFIX  2016-1
check_solids_phases.f
Go to the documentation of this file.
1 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
2 ! SUBROUTINE: CHECK_SOLIDS_PHASES !
3 ! !
4 ! Purpose: Driver routine for calls to solids phase checks. !
5 ! !
6 ! Author: J.Musser Date: 16-Jan-14 !
7 ! !
8 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
9  SUBROUTINE check_solids_phases
10 
11 
12 ! Global Variables:
13 !---------------------------------------------------------------------//
14 ! Runtime flag specifying TFM solids
15  use run, only: tfm_solids
16 ! Runtime flag specifying DEM solids
17  use run, only: dem_solids
18 ! Runtime flag specifying MPPIC solids
19  use run, only: pic_solids
20 
21 ! Global Module procedures:
22 !---------------------------------------------------------------------//
23  use error_manager
24 
25  implicit none
26 
27 ! Local Variables:
28 !---------------------------------------------------------------------//
29 
30 !......................................................................!
31 
32 ! Initialize the error manager.
33  CALL init_err_msg("CHECK_SOLIDS_PHASES")
34 
35 ! Impose the various model limitations.
37 
38 ! Checks common to all solids models.
40 
41 ! Checks common to discrete solids phases (DEM, MPPIC).
42  IF(dem_solids .OR. pic_solids) &
44 
45 ! Checks specific to the particular solids phase.
46  IF(tfm_solids) CALL check_solids_continuum
47  IF(dem_solids) CALL check_solids_dem
49 
50  CALL finl_err_msg
51 
52  RETURN
53 
54  END SUBROUTINE check_solids_phases
55 
56 
57 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
58 ! SUBROUTINE: CHECK_SOLIDS_MODEL_LIMITATIONS !
59 ! !
60 ! Purpose: Impose the limitations of the various solids models. These !
61 ! checks should be 'high level' in that they only ensure that models !
62 ! are only used with phases that support them. !
63 ! !
64 ! Author: J.Musser Date: 28-Feb-14 !
65 ! !
66 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
68 
69 ! Global Variables:
70 !---------------------------------------------------------------------//
71 ! Runtime Flag: TFM solids present.
72  use run, only: tfm_solids
73 ! Runtime Flag: DEM solids present.
74  use run, only: dem_solids
75 ! Runtime Flag: PIC solids present.
76  use run, only: pic_solids
77 ! Runtime Flag: Invoke a cohesion model for DES simulation.
78  use discretelement, only: use_cohesion
79 ! Runtime Flag: Sovle energy equations
80  use run, only: energy_eq
81 ! Runtime Flag: Sovle species equations
82  use run, only: species_eq
83 
84 ! Number of solid phases specified by the user/TFM model.
85  use physprop, only: smax
86 ! Number of discrete solids.
87  use discretelement, only: des_mmax
88 
89 ! Global Module procedures:
90 !---------------------------------------------------------------------//
91  use error_manager
92 
93  implicit none
94 
95 
96 ! Local Variables:
97 !---------------------------------------------------------------------//
98 ! Total number of solids phases.
99  INTEGER :: MMAX_TOT
100 
101 
102 !......................................................................!
103 
104 
105 ! Initialize the error manager.
106  CALL init_err_msg("CHECK_SOLIDS_MODEL_LIMITATIONS")
107 
108 
109 ! Set up the total number of solids.
110  mmax_tot = smax + des_mmax
111 
112 
113 ! The cohesion model is only implemented for DEM simulations
114  IF(use_cohesion) THEN
115  IF(tfm_solids .OR. pic_solids) THEN
116  WRITE(err_msg, 2000)
117  CALL flush_err_msg(abort=.true.)
118  ENDIF
119 
120  2000 FORMAT('Error 2000: The solids cohesion model is only available',&
121  ' for DEM',/' solids. Please correct the mfix.dat file.')
122  ENDIF
123 
124 ! Place holder
125  IF(energy_eq .AND. (tfm_solids .OR. pic_solids)) THEN
126 ! WRITE(ERR_MSG, 2002)
127 ! CALL FLUSH_ERR_MSG(ABORT=.TRUE.)
128 
129  2002 FORMAT('Error 2002: The solids-solids conduction model is only', &
130  ' available',/' for DEM only. Please correct the mfix.dat', &
131  ' file.')
132  ENDIF
133 
134 
135 ! This is only implemented for pure TFM or pure DEM simulations.
136  IF(any(species_eq(1:mmax_tot))) THEN
137  IF(tfm_solids .AND. dem_solids) THEN
138  WRITE(err_msg, 5000)
139  CALL flush_err_msg(abort=.false.)
140  ENDIF
141 
142  5000 FORMAT('Error 5000: Species equations are not available with', &
143  ' the hybrid',/'solids model. Please correct the mfix.dat', &
144  ' file.')
145  ENDIF
146 
147 
148  CALL finl_err_msg
149 
150  RETURN
151  END SUBROUTINE check_solids_model_limitations
subroutine check_solids_dem
logical dem_solids
Definition: run_mod.f:257
subroutine finl_err_msg
subroutine check_solids_phases
logical, dimension(0:dim_m) species_eq
Definition: run_mod.f:115
subroutine check_solids_continuum
subroutine init_err_msg(CALLER)
subroutine check_solids_common_all
subroutine check_solids_mppic
subroutine check_solids_common_discrete
logical tfm_solids
Definition: run_mod.f:256
Definition: run_mod.f:13
logical energy_eq
Definition: run_mod.f:100
subroutine check_solids_model_limitations
character(len=line_length), dimension(line_count) err_msg
integer smax
Definition: physprop_mod.f:22
logical pic_solids
Definition: run_mod.f:258
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)