58 TYPE(t_region
),
POINTER :: regions(:)
62 INTEGER :: ireg, ipatch
65 INTEGER,
PARAMETER :: nvals_max = 8
67 CHARACTER(10) :: keys(nvals_max)
68 CHARACTER(256) :: fname
71 INTEGER :: n1, n2, ioff, ijbeg, ijend, errorflag
73 INTEGER :: lbound, nijk
75 LOGICAL :: defined(nvals_max)
77 REAL(RFREAL) :: vals(nvals_max)
84 global => regions(1)%global
87 'RFLO_ReadBcInflowVelSection.F90' )
95 IF (bctitle==bc_inflow_veltemp)
THEN
98 ELSEIF (bctitle==bc_inflow_velpress)
THEN
105 keys(7) =
'RECYCTURB'
106 keys(8) =
'AMPLITUDE'
116 IF (vals(7) > 0.1_rfreal)
THEN
118 IF ((global%flowType == flow_unsteady) .AND. &
119 (global%doStat == active) .AND. &
120 (global%mixtNStat > 0))
THEN
124 'inflow bc parameter RECYCTURB > 0 inconsistent with STATS' )
129 'Activate STATS for inflow bc parameter RECYCTURB > 0' )
138 patch => regions(ireg)%levels(1)%patches(ipatch)
140 IF ((
patch%bcType>=bc_inflow .AND. &
141 patch%bcType<=bc_inflow+bc_range) .AND. &
142 regions(ireg)%procid==global%myProcid .AND. &
143 regions(ireg)%active==active)
THEN
145 patch%bcType = bctitle
147 IF (
patch%mixt%bcSet .eqv. .true.) &
148 CALL
errorstop( global,err_patch_overspec,&
149 __line__,
'Inflow boundary.' )
151 patch%mixt%nSwitches = 3
152 IF (
patch%bcCoupled == bc_external)
THEN
153 patch%mixt%distrib = bcdat_distrib
155 patch%mixt%distrib = distrib
158 ALLOCATE(
patch%mixt%switches(
patch%mixt%nSwitches), &
160 global%error = errorflag
161 IF (global%error /= 0) CALL
errorstop( global,err_allocate,&
165 IF (defined(1).eqv..true.)
THEN
166 patch%mixt%switches(bcswi_inflow_type) = bcopt_subsonic
168 patch%mixt%switches(bcswi_inflow_type) = bcopt_supersonic
170 patch%mixt%switches(bcswi_inflow_type) = bcopt_mixed
173 __line__,
'(inflow type).' )
176 patch%mixt%switches(bcswi_inflow_model) = bcopt_steady
177 IF (defined(7).eqv..true.)
THEN
179 patch%mixt%switches(bcswi_inflow_model) = bcopt_unsteady
183 IF (
patch%mixt%switches(bcswi_inflow_type) == bcopt_subsonic)
THEN
184 IF (
patch%mixt%distrib==bcdat_constant .AND. &
185 (.NOT. (defined(2).eqv..true.) .OR. &
186 .NOT. (defined(3).eqv..true.) .OR. &
187 .NOT. (defined(4).eqv..true.) .OR. &
188 .NOT. (defined(5).eqv..true.))) CALL
errorstop( global,err_bcval_missing,&
191 IF (
patch%mixt%switches(bcswi_inflow_type) == bcopt_supersonic .OR. &
192 patch%mixt%switches(bcswi_inflow_type) == bcopt_mixed)
THEN
193 IF (
patch%mixt%distrib==bcdat_constant .AND. &
194 (.NOT. (defined(2).eqv..true.) .OR. &
195 .NOT. (defined(3).eqv..true.) .OR. &
196 .NOT. (defined(4).eqv..true.) .OR. &
197 .NOT. (defined(5).eqv..true.) .OR. &
198 .NOT. (defined(6).eqv..true.))) CALL
errorstop( global,err_bcval_missing,&
201 IF (defined(7).eqv..true.)
THEN
202 IF (
patch%mixt%switches(bcswi_inflow_model) == bcopt_unsteady)
THEN
203 IF (defined(8).eqv..true.)
THEN
204 patch%mixt%amplitude = abs( vals(8) )
206 CALL
errorstop( global,err_bcval_missing,&
208 'AMPLITUDE should be specified in inflow with recycturb' )
214 patch%mixt%bcSet = .true.
225 patch => regions(ireg)%levels(1)%patches(ipatch)
227 IF ((
patch%bcType>=bc_inflow .AND. &
228 patch%bcType<=bc_inflow+bc_range) .AND. &
229 regions(ireg)%procid==global%myProcid .AND. &
230 regions(ireg)%active==active)
THEN
232 switch =
patch%mixt%switches(bcswi_inflow_type)
233 IF (switch == bcopt_subsonic)
THEN
242 IF (
patch%mixt%distrib == bcdat_distrib)
THEN
246 ijbeg = indij( 0, 0,ioff)
247 ijend = indij(n1,n2,ioff)
252 ALLOCATE(
patch%mixt%vals(
patch%mixt%nData,ijbeg:ijend), &
254 global%error = errorflag
255 IF (global%error /= 0) CALL
errorstop( global,err_allocate,&
260 IF (
patch%mixt%distrib==bcdat_distrib .AND. &
261 patch%bcCoupled /=bc_external )
THEN
262 WRITE(*,*)
'Reading more bc from file',fname
269 patch%mixt%vals(bcdat_inflow_u,:) = vals(2)
270 patch%mixt%vals(bcdat_inflow_v,:) = vals(3)
271 patch%mixt%vals(bcdat_inflow_w,:) = vals(4)
272 IF (bctitle==bc_inflow_veltemp)
THEN
273 patch%mixt%vals(bcdat_inflow_t,:) = vals(5)
274 IF (defined(6).eqv..true.)
THEN
275 patch%mixt%vals(bcdat_inflow_p,:) = vals(6)
277 ELSEIF (bctitle==bc_inflow_velpress)
THEN
278 patch%mixt%vals(bcdat_inflow_p,:) = vals(5)
279 IF (defined(6).eqv..true.) &
280 patch%mixt%vals(bcdat_inflow_t,:) = vals(6)
291 IF (vals(7) > 0.1_rfreal)
THEN
292 nijk = global%infloNijk
298 patch => regions(ireg)%levels(1)%patches(ipatch)
300 IF ((
patch%bcType>=bc_inflow .AND. &
301 patch%bcType<=bc_inflow+bc_range) .AND. &
302 regions(ireg)%procid==global%myProcid .AND. &
303 regions(ireg)%active==active)
THEN
304 lbound =
patch%lbound
305 IF (lbound==1 .OR. lbound==2)
THEN
307 ELSEIF (lbound==3 .OR. lbound==4)
THEN
309 ELSEIF (lbound==5 .OR. lbound==6)
THEN
310 nijk = abs(kpnend-
kpnbeg)+1
313 global%infloNijk =
min( global%infloNijk,nijk )
316 global%infloNijk = global%infloNijk/2+1
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpnbeg
subroutine rflo_readbcfromfile(global, fname, patch)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kpnbeg
subroutine registerfunction(global, funName, fileName)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE brbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpnend
subroutine readpatchsection(global, fileID, nvals, keys, vals, brbeg, brend, prbeg, prend, distrib, profType, fname, defined)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipnbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE prend
subroutine rflo_readbcinflowvelsection(regions, bcTitle)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE prbeg
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE nvals
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipnend