File: N:\mfix\model\des\pic\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     ! Modules
16     !---------------------------------------------------------------------//
17           USE discretelement, only: particles
18           use error_manager
19           USE param1, only: undefined_i
20           USE pic_bc, only: pic_bcmi, pic_bcmo, pic_mio
21           IMPLICIT NONE
22     !......................................................................!
23     
24           CALL INIT_ERR_MSG("SET_BC_PIC")
25     
26     ! The variable PARTICLES should already be set by this point if using
27     ! gener_part_config option
28           IF(PARTICLES == UNDEFINED_I) THEN
29              PARTICLES = 0
30           ENDIF
31     
32     ! If the system is started without any particles and an inlet is not
33     ! specified, the run is likely aborted.
34     ! Inlet/outlet for MPPIC are based off the regular mfix declarations,
35     ! and so PIC_BCMI could still be zero.
36           IF(PARTICLES == 0 .AND. PIC_BCMI == 0) THEN
37              WRITE(ERR_MSG, 1202)
38              CALL FLUSH_ERR_MSG
39           ENDIF
40     
41      1202 FORMAT('WARNING 1202: The system is initiated with no particles',&
42              ' and no',/'solids inlet was detected.')
43     
44           IF(PIC_BCMI > 0) CALL SET_BC_PIC_MI
45           IF(PIC_BCMO > 0) CALL SET_BC_PIC_MO
46     
47     ! Set the flag that one or more PIC MI/MO exists.
48           PIC_MIO = (PIC_BCMI /= 0 .OR. PIC_BCMO /= 0)
49     
50           CALL FINL_ERR_MSG
51     
52           RETURN
53           END SUBROUTINE SET_BC_PIC
54