Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_rFLO_FlimBndConditionsSet.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 FLD radiation boundary conditions or exchange data between
26 ! adjacent 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%radi%cv = updated cv of FLD radiation eqs.
34 ! in dummy cells of current region.
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: RADI_rFLO_FlimBndConditionsSet.F90,v 1.3 2008/12/06 08:44:38 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE radi_rflo_flimbndconditionsset( 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
55  USE moderror
56  USE modparameters
58  IMPLICIT NONE
59 
60 ! ... parameters
61  TYPE(t_region), POINTER :: regions(:)
62 
63  INTEGER :: ireg
64 
65 ! ... loop variables
66  INTEGER :: ipatch
67 
68 ! ... local variables
69  INTEGER :: ilev, npatches, bctype, radbctype, iregsrc, ipatchsrc
70 
71  TYPE(t_patch), POINTER :: patch, patchsrc
72  TYPE(t_global), POINTER :: global
73 
74 !******************************************************************************
75 
76  global => regions(ireg)%global
77 
78  CALL registerfunction( global,'RADI_RFLO_FlimBndConditionsSet',&
79  'RADI_rFLO_FlimBndConditionsSet.F90' )
80 
81  IF (regions(ireg)%radiInput%radiModel /= radi_model_fldtran) goto 999
82 
83 ! get dimensions --------------------------------------------------------------
84 
85  ilev = regions(ireg)%currLevel
86  npatches = regions(ireg)%nPatches
87 
88 ! loop over patches -----------------------------------------------------------
89 
90  DO ipatch=1,npatches
91 
92  patch => regions(ireg)%levels(ilev)%patches(ipatch)
93 
94  bctype = patch%bcType
95  radbctype = patch%radBcType
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 radi_floflimbconddiffuse( 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 radi_floflimbcondzerograd( 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 radi_floflimexchangedummyconf( 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 RADI_FloFlimExchangeDummyInt( 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 RADI.' )
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 RADI_FloFlimExchangeDummyIreg( 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 RADI.' )
144 
145 ! - diffused boundary
146 
147  ELSE IF (radbctype>=radi_bc_diffus .AND. &
148  radbctype<=radi_bc_diffus + radi_bc_range) THEN
149  CALL radi_floflimbconddiffuse( regions(ireg),patch )
150 
151 ! - refraction boundary
152 
153  ELSE IF (radbctype>=radi_bc_refrac .AND. &
154  radbctype<=radi_bc_refrac + radi_bc_range) THEN
155 ! CALL RADI_FloFlimBcondRefrac( regions(iReg),patch )
156 
157 ! - injection
158 
159  ELSE IF (bctype>=bc_injection .AND. bctype<=bc_injection+bc_range) THEN
160  CALL radi_floflimbcondinjection( regions(ireg),patch )
161 
162 ! - symmetry
163 
164  ELSE IF (bctype>=bc_symmetry .AND. bctype<=bc_symmetry+bc_range) THEN
165  CALL radi_floflimbcondsymmetry( regions(ireg),patch )
166 
167 ! - translational periodicity
168 
169  ELSE IF (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri+bc_range) THEN
170  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
171 
172  IF (regions(iregsrc)%procid == global%myProcid) THEN
173  CALL radi_floflimexchangedummyconf( regions(ireg),regions(iregsrc), &
174  patch,patchsrc )
175  ENDIF
176 
177 ! - rotational periodicity
178 
179  ELSE IF (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri+bc_range) THEN
180  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
181 
182 ! CALL RADI_FloFlimBcondRotatPeriod( regions(iReg),regions(iRegSrc), &
183 ! patch,patchSrc )
184  CALL errorstop( global,err_unknown_bc,__line__, &
185  'rotational periodic bc is not ready yet for RADI.' )
186 
187  ELSE
188  CALL errorstop( global,err_unknown_bc,__line__ )
189  ENDIF ! bcType
190 
191  ENDDO ! iPatch
192 
193 ! finalize --------------------------------------------------------------------
194 
195 999 CONTINUE
196 
197  CALL deregisterfunction( global )
198 
199 END SUBROUTINE radi_rflo_flimbndconditionsset
200 
201 !******************************************************************************
202 !
203 ! RCS Revision history:
204 !
205 ! $Log: RADI_rFLO_FlimBndConditionsSet.F90,v $
206 ! Revision 1.3 2008/12/06 08:44:38 mtcampbe
207 ! Updated license.
208 !
209 ! Revision 1.2 2008/11/19 22:17:50 mtcampbe
210 ! Added Illinois Open Source License/Copyright
211 !
212 ! Revision 1.1 2004/09/30 17:49:10 wasistho
213 ! prepared for full FLD radiation model
214 !
215 !
216 !
217 !******************************************************************************
218 
219 
220 
221 
222 
223 
224 
subroutine radi_floflimbcondinjection(region, patch)
subroutine radi_rflo_flimbndconditionsset(regions, iReg)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine radi_floflimbcondsymmetry(region, patch)
Definition: patch.h:74
subroutine radi_floflimbconddiffuse(region, patch)
subroutine radi_floflimexchangedummyconf(region, regionSrc, patch, patchSrc)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine radi_floflimbcondzerograd(region, patch)