MFIX  2016-1
set_bc_pic.f
Go to the documentation of this file.
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
integer pic_bcmi
Definition: pic_bc_mod.f:18
subroutine finl_err_msg
subroutine set_bc_pic_mi
Definition: set_bc_pic_mi.f:10
subroutine set_bc_pic_mo
Definition: set_bc_pic_mo.f:12
subroutine init_err_msg(CALLER)
subroutine set_bc_pic
Definition: set_bc_pic.f:14
integer, parameter undefined_i
Definition: param1_mod.f:19
character(len=line_length), dimension(line_count) err_msg
logical pic_mio
Definition: pic_bc_mod.f:21
integer pic_bcmo
Definition: pic_bc_mod.f:19
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)