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

1     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv!
2     !                                                                      !
3     !  Subroutine: SET_BC_PIC                                              !
4     !  Author: R. Garg                                    Date: 11-Jun-14  !
5     !                                                                      !
6     !  Purpose: Check the data provided for the pic 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     !  Rehack of set_bc_dem                                                !
11     !                                                                      !
12     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
13           SUBROUTINE SET_BC_PIC
14     
15           USE constant
16           USE pic_bc
17           USE discretelement
18           USE funits
19           USE geometry
20           USE indices
21           USE param
22           USE param1
23           USE physprop
24           USE run
25           USE mfix_pic
26           use mpi_utility
27     
28           use bc
29     
30           use error_manager
31     
32           IMPLICIT NONE
33     
34     
35           CALL INIT_ERR_MSG("SET_BC_PIC")
36     
37     ! The variable PARTICLES should already be set by this point if using
38     ! gener_part_config option
39           IF(PARTICLES == UNDEFINED_I) THEN
40              PARTICLES = 0
41           ENDIF
42     
43     ! If the system is started without any particles and an inlet is not
44     ! specified, the run is likely aborted.
45     ! Inlet/outlet for MPPIC are based off the regular mfix declarations,
46     ! and so PIC_BCMI could still be zero.
47           IF(PARTICLES == 0 .AND. PIC_BCMI == 0) THEN
48              WRITE(ERR_MSG, 1202)
49              CALL FLUSH_ERR_MSG
50           ENDIF
51     
52      1202 FORMAT('WARNING 1202: The system is initiated with no particles',&
53              ' and no',/'solids inlet was detected.')
54     
55           IF(PIC_BCMI > 0) CALL SET_BC_PIC_MI
56           IF(PIC_BCMO > 0) CALL SET_BC_PIC_MO
57     
58     ! Set the flag that one or more PIC MI/MO exists.
59           PIC_MIO = (PIC_BCMI /= 0 .OR. PIC_BCMO /= 0)
60     
61           CALL FINL_ERR_MSG
62     
63           RETURN
64           END SUBROUTINE SET_BC_PIC
65