File: RELATIVE:/../../../mfix.git/model/functions_mod.f

1     MODULE functions
2     
3       USE compar
4       USE discretelement
5       USE geometry
6       USE indices
7       USE param1
8     
9     ! Functions for generating IJK indices for indicated basis:
10     !---------------------------------------------------------------------//
11     ! INTEGER :: FUNIJK, FUNIJK_0
12     ! INTEGER :: FUNIJK_PROC
13     ! INTEGER :: FUNIJK_GL
14     ! INTEGER :: FUNIJK_IO
15     
16     
17     ! Logical functions to determine whether index is on my PE's domain or
18     ! indicated subset:
19     !---------------------------------------------------------------------//
20     ! LOGICAL :: IS_ON_myPE_owns
21     ! LOGICAL :: IS_ON_myPE_plus1layer
22     ! LOGICAL :: IS_ON_myPE_plus2layers
23     ! LOGICAL :: IS_ON_myPE_wobnd
24     
25     
26     ! Functions for calculating indicated directional shift in given IJK
27     ! index. This will return the ijk index of the computational cell
28     ! corresponding to the indicated shift when that computational cell
29     ! is NOT a wall cell. If the computational cell is a wall cell then
30     ! this will return its own ijk index. For example, east_of will return
31     ! IPJK when IPJK is a fluid or flow at cell. However, if IPJK is a
32     ! wall cell east_of will return IJK.
33     !---------------------------------------------------------------------//
34     ! INTEGER :: EAST_OF, EAST_OF_0
35     ! INTEGER :: WEST_OF, WEST_OF_0
36     ! INTEGER :: SOUTH_OF, SOUTH_OF_0
37     ! INTEGER :: NORTH_OF, NORTH_OF_0
38     ! INTEGER :: BOTTOM_OF, BOTTOM_OF_0
39     ! INTEGER :: TOP_OF, TOP_OF_0
40     
41     
42     ! Functions for calculating indicated directional shift in given IJK
43     ! index. This will generally return the ijk index of the computational
44     ! cell corresponding to the indicated shift regardless of the wall
45     ! status of that computational cell. It may not return corner cells
46     ! unless the ijk cell itself is a corner cell.
47     !---------------------------------------------------------------------//
48     ! INTEGER :: IP_OF, IP_OF_0
49     ! INTEGER :: IM_OF, IM_OF_0
50     ! INTEGER :: JP_OF, JP_OF_0
51     ! INTEGER :: JM_OF, JM_OF_0
52     ! INTEGER :: KP_OF, KP_OF_0
53     ! INTEGER :: KM_OF, KM_OF_0
54     
55     
56     ! Logical functions to identify indicated condition:
57     !---------------------------------------------------------------------//
58     ! logical function to identify various fluid/flow cells
59     ! LOGICAL :: FLUID_AT
60     ! LOGICAL :: P_FLOW_AT
61     ! LOGICAL :: P_OUTFLOW_AT
62     ! LOGICAL :: MASS_OUTFLOW_AT
63     ! LOGICAL :: OUTFLOW_AT
64     ! LOGICAL :: FLOW_AT
65     ! LOGICAL :: FLUIDorP_FLOW_AT
66     
67     ! logical function to identify various wall cells
68     ! LOGICAL :: WALL_AT
69     ! LOGICAL :: NS_WALL_AT, FS_WALL_AT, PS_WALL_AT
70     ! LOGICAL :: DEFAULT_WALL_AT
71     ! LOGICAL :: WALL_ICBC_FLAG
72     
73     ! Logical function to identify a cyclic cell and different
74     ! cyclic flow boundaries
75     ! LOGICAL :: CYCLIC_AT
76     ! LOGICAL :: CYCLIC_AT_E, CYCLIC_AT_N, CYCLIC_AT_T
77     
78     ! logical function to identify different flow at boundaries
79     ! LOGICAL :: FLOW_AT_E, FLOW_AT_N, FLOW_AT_T
80     ! LOGICAL :: PFLOW_AT_E, PFLOW_AT_N, PFLOW_AT_T
81     ! LOGICAL :: MFLOW_AT_E, MFLOW_AT_N, MFLOW_AT_T
82     
83     ! Logical functions to identify different impermeable/semipermeable
84     ! surface boundaries (specific type of internal surface)
85     ! LOGICAL :: IP_AT_E, IP_AT_N, IP_AT_T
86     ! LOGICAL :: SIP_AT_E, SIP_AT_N, SIP_AT_T
87     ! LOGICAL :: SP_AT_E, SP_AT_N, SP_AT_T
88     
89     ! Logical functions concerning general internal surfaces
90     ! LOGICAL :: IS_AT_E, IS_AT_N, IS_AT_T
91     ! LOGICAL :: NO_IS_AT_E, NO_IS_AT_N, NO_IS_AT_T
92     ! Integer function to return internal surface ID
93     ! INTEGER :: IS_ID_AT_E, IS_ID_AT_N, IS_ID_AT_T
94     
95     
96     ! Additional functions
97     !---------------------------------------------------------------------//
98     ! DOUBLE PRECISION :: ZMAX
99     ! INTEGER FUNCTION :: FUNLM
100     
101     
102     CONTAINS
103     
104       INCLUDE 'functions.inc'
105     
106     END MODULE functions
107