Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_rFLO_RansBndConditionsSet.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 RaNS boundary conditions or exchange data between adjacent
26 ! regions being on same processor.
27 !
28 ! Description: none.
29 !
30 ! Input: regions = data of all regions
31 ! iReg = index of current region.
32 !
33 ! Output: regions(iReg)%levels%turb%cv = updated cv of RaNS eqs.
34 ! in dummy cells of current region.
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: TURB_rFLO_RansBndConditionsSet.F90,v 1.4 2008/12/06 08:44:45 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE turb_rflo_ransbndconditionsset( 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
56  USE moderror
57  USE modparameters
59  IMPLICIT NONE
60 
61 ! ... parameters
62  TYPE(t_region), POINTER :: regions(:)
63 
64  INTEGER :: ireg
65 
66 ! ... loop variables
67  INTEGER :: ipatch
68 
69 ! ... local variables
70  INTEGER :: ilev, npatches, bctype, iregsrc, ipatchsrc
71 
72  TYPE(t_patch), POINTER :: patch, patchsrc
73  TYPE(t_global), POINTER :: global
74 
75 !******************************************************************************
76 
77  global => regions(ireg)%global
78 
79  CALL registerfunction( global,'TURB_RFLO_RansBndConditionsSet',&
80  'TURB_rFLO_RansBndConditionsSet.F90' )
81 
82  IF (regions(ireg)%turbInput%modelClass /= model_rans) goto 999
83 
84 ! get dimensions --------------------------------------------------------------
85 
86  ilev = regions(ireg)%currLevel
87  npatches = regions(ireg)%nPatches
88 
89 ! loop over patches -----------------------------------------------------------
90 
91  DO ipatch=1,npatches
92 
93  patch => regions(ireg)%levels(ilev)%patches(ipatch)
94 
95  bctype = patch%bcType
96  iregsrc = patch%srcRegion
97  ipatchsrc = patch%srcPatch
98 
99 ! - inflow
100 
101  IF (bctype>=bc_inflow .AND. bctype<=bc_inflow+bc_range) THEN
102  CALL turb_floransbcondinflow( regions(ireg),patch )
103 
104 ! - outflow, slipwall, farfield
105 
106  ELSE IF ((bctype>=bc_outflow .AND. bctype<=bc_outflow+bc_range) .OR. &
107  (bctype>=bc_slipwall .AND. bctype<=bc_slipwall+bc_range) .OR. &
108  (bctype>=bc_farfield .AND. bctype<=bc_farfield+bc_range)) THEN
109  CALL turb_floransbcondzerograd( regions(ireg),patch )
110 
111 ! - conforming region interface
112 
113  ELSE IF (bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) THEN
114  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
115 
116  IF (regions(iregsrc)%procid == global%myProcid) THEN
117  CALL turb_floransexchangedummyconf( regions(ireg),regions(iregsrc), &
118  patch,patchsrc )
119  ENDIF
120 
121 ! - non-conforming region interface (integer)
122 
123  ELSE IF (bctype>=bc_regionint .AND. bctype<=bc_regionint+bc_range) THEN
124  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
125 
126 ! IF (regions(iRegSrc)%procid == global%myProcid) THEN
127 ! CALL TURB_FloRansExchangeDummyInt( regions(iReg),regions(iRegSrc), &
128 ! patch,patchSrc )
129 ! ENDIF
130  CALL errorstop( global,err_unknown_bc,__line__, &
131  'non-conforming integer bc is not ready yet for RaNS.' )
132 
133 ! - non-conforming region interface (irregular)
134 
135  ELSE IF (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range) THEN
136  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
137 
138 ! IF (regions(iRegSrc)%procid == global%myProcid) THEN
139 ! CALL TURB_FloRansExchangeDummyIreg( regions(iReg),regions(iRegSrc), &
140 ! patch,patchSrc )
141 ! ENDIF
142  CALL errorstop( global,err_unknown_bc,__line__, &
143  'non-conforming irregular bc is not ready yet for RaNS.' )
144 
145 ! - noslip wall
146 
147  ELSE IF (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range) THEN
148  CALL turb_floransbcondnoslipwall( regions(ireg),patch )
149 
150 ! - injection
151 
152  ELSE IF (bctype>=bc_injection .AND. bctype<=bc_injection+bc_range) THEN
153  CALL turb_floransbcondinjection( regions(ireg),patch )
154 
155 ! - symmetry
156 
157  ELSE IF (bctype>=bc_symmetry .AND. bctype<=bc_symmetry+bc_range) THEN
158  CALL turb_floransbcondsymmetry( regions(ireg),patch )
159 
160 ! - translational periodicity
161 
162  ELSE IF (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri+bc_range) THEN
163  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
164 
165  IF (regions(iregsrc)%procid == global%myProcid) THEN
166  CALL turb_floransexchangedummyconf( regions(ireg),regions(iregsrc), &
167  patch,patchsrc )
168  ENDIF
169 
170 ! - rotational periodicity
171 
172  ELSE IF (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri+bc_range) THEN
173  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
174 
175 ! CALL TURB_FloRansBcondRotatPeriod( regions(iReg),regions(iRegSrc), &
176 ! patch,patchSrc )
177  CALL errorstop( global,err_unknown_bc,__line__, &
178  'rotational periodic bc is not ready yet for RaNS.' )
179 
180  ELSE
181  CALL errorstop( global,err_unknown_bc,__line__ )
182  ENDIF ! bcType
183 
184  ENDDO ! iPatch
185 
186 ! finalize --------------------------------------------------------------------
187 
188 999 CONTINUE
189 
190  CALL deregisterfunction( global )
191 
192 END SUBROUTINE turb_rflo_ransbndconditionsset
193 
194 !******************************************************************************
195 !
196 ! RCS Revision history:
197 !
198 ! $Log: TURB_rFLO_RansBndConditionsSet.F90,v $
199 ! Revision 1.4 2008/12/06 08:44:45 mtcampbe
200 ! Updated license.
201 !
202 ! Revision 1.3 2008/11/19 22:17:56 mtcampbe
203 ! Added Illinois Open Source License/Copyright
204 !
205 ! Revision 1.2 2004/03/12 02:55:36 wasistho
206 ! changed rocturb routine names
207 !
208 ! Revision 1.1 2004/03/11 03:26:33 wasistho
209 ! changed rocturb nomenclature
210 !
211 ! Revision 1.1 2004/03/08 23:35:45 wasistho
212 ! changed turb nomenclature
213 !
214 ! Revision 1.1 2003/10/07 02:17:03 wasistho
215 ! initial installation of RaNS-SA and DES
216 !
217 !
218 !******************************************************************************
219 
220 
221 
222 
223 
224 
225 
subroutine turb_floransbcondzerograd(region, patch)
subroutine turb_floransbcondinjection(region, patch)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine turb_floransbcondsymmetry(region, patch)
Definition: patch.h:74
subroutine turb_floransbcondnoslipwall(region, patch)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine turb_floransbcondinflow(region, patch)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine turb_floransexchangedummyconf(region, regionSrc, patch, patchSrc)
subroutine turb_rflo_ransbndconditionsset(regions, iReg)