Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PEUL_BoundaryConditionsSet.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: set boundary conditions or exchange data between adjacent
26 ! regions being on same processor for smoke.
27 !
28 ! Description: none.
29 !
30 ! Input: regions = data of all regions
31 ! iReg = index of current region.
32 !
33 ! Output: regions(iReg)%levels%peul = updated smoke values (cv,dv,tv)
34 ! in dummy cells of current region.
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: PEUL_BoundaryConditionsSet.F90,v 1.3 2008/12/06 08:44:39 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2002 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE peul_boundaryconditionsset( regions,iReg ) ! PUBLIC
47 
48  USE moddatatypes
49  USE modbndpatch, ONLY : t_patch
50  USE moddatastruct, ONLY : t_region
51  USE modglobal, ONLY : t_global
52  USE moderror
53  USE modparameters
55 
59  IMPLICIT NONE
60 
61 ! ... parameters
62  TYPE(t_region), POINTER :: regions(:)
63  INTEGER, INTENT(IN) :: ireg
64 
65 ! ... loop variables
66  INTEGER :: ipatch
67 
68 ! ... local variables
69  CHARACTER(CHRLEN) :: rcsidentstring
70 
71  INTEGER :: ilev, npatches, bctype, iregsrc, ipatchsrc
72 
73  TYPE(t_patch), POINTER :: patch, patchsrc
74  TYPE(t_global), POINTER :: global
75 
76 !******************************************************************************
77 
78  rcsidentstring = &
79  '$RCSfile: PEUL_BoundaryConditionsSet.F90,v $ $Revision: 1.3 $'
80 
81  global => regions(ireg)%global
82 
83  CALL registerfunction( global,'PEUL_BoundaryConditionsSet',&
84  'PEUL_BoundaryConditionsSet.F90' )
85 
86 ! begin -----------------------------------------------------------------------
87 
88 ! get dimensions --------------------------------------------------------------
89 
90  ilev = regions(ireg)%currLevel
91  npatches = regions(ireg)%nPatches
92 
93 ! loop over patches -----------------------------------------------------------
94 
95  DO ipatch=1,npatches
96 
97  patch => regions(ireg)%levels(ilev)%patches(ipatch)
98 
99  bctype = patch%bcType
100  iregsrc = patch%srcRegion
101  ipatchsrc = patch%srcPatch
102 
103 ! - inflow
104 
105  SELECT CASE(bctype)
106 
107  CASE (bc_inflow:bc_inflow+bc_range)
108  CALL peul_bcondinflow( regions(ireg),patch )
109 
110 ! - outflow
111 
112  CASE (bc_outflow:bc_outflow+bc_range)
113  CALL peul_bcondoutflow( regions(ireg),patch )
114 
115 ! - conforming region interface
116 
117  CASE (bc_regionconf:bc_regionconf+bc_range)
118  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
119 
120  IF (regions(iregsrc)%procid == global%myProcid) THEN
121  CALL peul_exchangedummyconf( regions(ireg),regions(iregsrc), &
122  patch,patchsrc )
123  ENDIF
124 
125 ! - non-conforming region interface (integer)
126 
127 ! CASE (BC_REGIONINT:BC_REGIONINT+BC_RANGE)
128 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
129 !
130 ! IF (regions(iRegSrc)%procid == global%myProcid) THEN
131 ! CALL PEUL_ExchangeDummyInt( regions(iReg),regions(iRegSrc), &
132 ! patch,patchSrc )
133 ! ENDIF
134 
135 ! - non-conforming region interface (irregular)
136 
137 ! CASE (BC_REGNONCONF:BC_REGNONCONF+BC_RANGE)
138 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
139 !
140 ! IF (regions(iRegSrc)%procid == global%myProcid) THEN
141 ! CALL PEUL_ExchangeDummyIreg( regions(iReg),regions(iRegSrc), &
142 ! patch,patchSrc )
143 ! ENDIF
144 
145 ! - slip wall
146 
147  CASE (bc_slipwall:bc_slipwall+bc_range)
148  CALL peul_bcondslipwall( regions(ireg),patch )
149 
150 ! - noslip wall
151 
152  CASE (bc_noslipwall:bc_noslipwall+bc_range)
153  CALL peul_bcondslipwall( regions(ireg),patch )
154 
155 ! - far field
156 
157  CASE (bc_farfield:bc_farfield+bc_range)
158  CALL peul_bcondinflow( regions(ireg),patch )
159 
160 ! - injection
161 
162  CASE (bc_injection:bc_injection+bc_range)
163  CALL peul_bcondinjection( regions(ireg),patch )
164 
165 ! - symmetry
166 
167  CASE (bc_symmetry:bc_symmetry+bc_range)
168  CALL peul_bcondsymmetry( regions(ireg),patch )
169 
170 ! - translational periodicity
171 
172 ! CASE (BC_TRA_PERI:BC_TRA_PERI+BC_RANGE)
173 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
174 !
175 ! IF (regions(iRegSrc)%procid == global%myProcid) THEN
176 ! CALL PEUL_ExchangeDummyConf( regions(iReg),regions(iRegSrc), &
177 ! patch,patchSrc )
178 ! ENDIF
179 
180 ! - rotational periodicity
181 
182 ! CASE (BC_ROT_PERI:BC_ROT_PERI+BC_RANGE)
183 ! patchSrc => regions(iRegSrc)%levels(iLev)%patches(iPatchSrc)
184 !
185 ! CALL PEUL_BcondRotatPeriod( regions(iReg),regions(iRegSrc), &
186 ! patch,patchSrc )
187 
188 ! - other
189 
190  CASE default
191  CALL errorstop( global,err_unknown_bc,__line__ )
192 
193  END SELECT ! bcType
194 
195  ENDDO ! iPatch
196 
197 ! finalize --------------------------------------------------------------------
198 
199  CALL deregisterfunction( global )
200 
201 END SUBROUTINE peul_boundaryconditionsset
202 
203 !******************************************************************************
204 !
205 ! RCS Revision history:
206 !
207 ! $Log: PEUL_BoundaryConditionsSet.F90,v $
208 ! Revision 1.3 2008/12/06 08:44:39 mtcampbe
209 ! Updated license.
210 !
211 ! Revision 1.2 2008/11/19 22:17:51 mtcampbe
212 ! Added Illinois Open Source License/Copyright
213 !
214 ! Revision 1.1 2004/12/01 21:09:23 haselbac
215 ! Initial revision after changing case
216 !
217 ! Revision 1.5 2004/03/05 22:09:04 jferry
218 ! created global variables for peul, plag, and inrt use
219 !
220 ! Revision 1.4 2003/04/09 15:09:56 jferry
221 ! added slip wall boundary conditions
222 !
223 ! Revision 1.3 2003/04/09 14:23:36 fnajjar
224 ! Activated PEUL_exchangeDummyConf for Multi-region non-MPI capabilities
225 !
226 ! Revision 1.2 2003/04/07 18:29:01 jferry
227 ! added inflow boundary condition and initialization to a constant
228 !
229 ! Revision 1.1 2003/02/11 22:52:50 jferry
230 ! Initial import of Rocsmoke
231 !
232 !******************************************************************************
233 
234 
235 
236 
237 
238 
239 
subroutine peul_boundaryconditionsset(regions, iReg)
subroutine peul_bcondinjection(region, patch)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
Definition: patch.h:74
subroutine peul_bcondinflow(region, patch)
subroutine peul_bcondsymmetry(region, patch)
subroutine peul_bcondoutflow(region, patch)
subroutine peul_exchangedummyconf(region, regionSrc, patch, patchSrc)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine peul_bcondslipwall(region, patch)