File: /nfs/home/0/users/jenkins/mfix.git/model/des/set_bc_dem.f

1     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
2     !                                                                      !
3     !  Subroutine: SET_BC_DEM                                              !
4     !  Author: J.Musser                                   Date: 13-Jul-09  !
5     !                                                                      !
6     !  Purpose: Check the data provided for the des mass inflow boundary   !
7     !  condition and flag errors if the data is improper.  This module is  !
8     !  also used to convert the proveded information into the format       !
9     !  necessary for the dependent subrountines to function properly.      !
10     !                                                                      !
11     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
12           SUBROUTINE SET_BC_DEM
13     
14           USE constant
15           USE des_bc
16           USE discretelement
17           USE funits
18           USE geometry
19           USE indices
20           USE param
21           USE param1
22           USE physprop
23           USE run
24           USE mfix_pic
25           use mpi_utility
26     
27           use bc
28     
29           use error_manager
30     
31           IMPLICIT NONE
32     
33     
34           CALL INIT_ERR_MSG("SET_BC_DEM")
35     
36     ! The variable PARTICLES should already be set by this point if using
37     ! gener_part_config option
38           IF(PARTICLES == UNDEFINED_I) THEN
39              PARTICLES = 0
40           ENDIF
41     
42     ! If the system is started without any particles and an inlet is not
43     ! specified, the run is likely aborted.
44     ! Inlet/outlet for MPPIC are based off the regular mfix declarations,
45     ! and so DEM_BCMI could still be zero.
46           IF(PARTICLES == 0 .AND. DEM_BCMI == 0) THEN
47              WRITE(ERR_MSG, 1202)
48              CALL FLUSH_ERR_MSG
49           ENDIF
50     
51      1202 FORMAT('WARNING 1202: The system is initiated with no particles',&
52              ' and no',/'solids inlet was detected.')
53     
54           IF(DEM_BCMI > 0) CALL SET_BC_DEM_MI
55           IF(DEM_BCMO > 0) CALL SET_BC_DEM_MO
56     
57     ! Set the flag that one or more DEM MI/MO exists.
58           DEM_MIO = (DEM_BCMI /= 0 .OR. DEM_BCMO /= 0)
59     
60           CALL FINL_ERR_MSG
61     
62           RETURN
63           END SUBROUTINE SET_BC_DEM
64