Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_ReadBcSlipWallSection.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: read in user input related to slip-wall boundary condition.
26 !
27 ! Description: none.
28 !
29 ! Input: boundary condition file.
30 !
31 ! Output: regions = BC data.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: RFLO_ReadBcSlipWallSection.F90,v 1.9 2008/12/06 08:44:07 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE rflo_readbcslipwallsection( regions )
44 
45  USE moddatatypes
46  USE modbndpatch, ONLY : t_patch
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
50  USE moderror
51  USE modparameters
52  IMPLICIT NONE
53 
54 ! ... parameters
55  TYPE(t_region), POINTER :: regions(:)
56 
57 ! ... loop variables
58  INTEGER :: ireg, ipatch
59 
60 ! ... local variables
61  CHARACTER(10) :: keys(6)
62  CHARACTER(256) :: fname
63 
64  INTEGER :: brbeg, brend, prbeg, prend, distrib, errorflag
65 
66  LOGICAL :: defined(6)
67 
68  REAL(RFREAL) :: vals(6)
69 
70  TYPE(t_patch), POINTER :: patch
71  TYPE(t_global), POINTER :: global
72 
73 !******************************************************************************
74 
75  global => regions(1)%global
76 
77  CALL registerfunction( global,'RFLO_ReadBcSlipWallSection',&
78  'RFLO_ReadBcSlipWallSection.F90' )
79 
80 ! specify keywords and search for them ----------------------------------------
81 
82  keys(1) = 'EXTRAPOL'
83  keys(2) = 'MAXCHANGE'
84  keys(3) = 'MOTION'
85  keys(4) = 'XVEL'
86  keys(5) = 'YVEL'
87  keys(6) = 'ZVEL'
88 
89  vals(3:6) = 0._rfreal ! initialize vars not read by all regs and patches
90 
91  CALL readpatchsection( global,if_input,6,keys,vals,brbeg,brend, &
92  prbeg,prend,distrib,fname,defined )
93 
94 ! check if all values defined -------------------------------------------------
95 
96  IF (.NOT. (defined(1).eqv..true.) .OR. &
97  .NOT. (defined(2).eqv..true.)) CALL errorstop( global,err_bcval_missing,&
98  __line__ )
99 
100 ! copy values/distribution to variables ---------------------------------------
101 
102  DO ireg=brbeg,brend
103  DO ipatch=prbeg,min(prend,regions(ireg)%nPatches)
104 
105  patch => regions(ireg)%levels(1)%patches(ipatch)
106 
107  IF ((patch%bcType>=bc_slipwall .AND. &
108  patch%bcType<=bc_slipwall+bc_range) .AND. & ! my boundary type
109  regions(ireg)%procid==global%myProcid .AND. & ! region active and
110  regions(ireg)%active==active) THEN ! on my processor
111 
112  IF (patch%mixt%bcSet.eqv..true.) &
113  CALL errorstop( global,err_patch_overspec,__line__,'Slip-wall boundary.' )
114 
115  patch%mixt%nData = 0
116  patch%mixt%nSwitches = 1
117  patch%mixt%distrib = bcdat_constant
118  patch%mixt%bcSet = .true.
119 
120 ! ----- get value of switch
121 
122  ALLOCATE( patch%mixt%switches(patch%mixt%nSwitches), &
123  stat=errorflag )
124  global%error = errorflag
125  IF (global%error /= 0) CALL errorstop( global,err_allocate,__line__ )
126 
127  patch%mixt%switches(bcswi_slipw_extrap) = extrapol_const
128  IF (vals(1) > 0.1) &
129  patch%mixt%switches(bcswi_slipw_extrap) = extrapol_linear
130 
131  patch%mixt%maxChange = vals(2)
132 
133  IF (vals(3) > 0.1) THEN
134  patch%mixt%setMotion = .true.
135  patch%mixt%bndVel(xcoord) = vals(4)
136  patch%mixt%bndVel(ycoord) = vals(5)
137  patch%mixt%bndVel(zcoord) = vals(6)
138  ENDIF
139 
140  ENDIF ! bcType, active region on my processor
141 
142  IF ((defined(3).eqv..true.) .AND. (vals(3) > 0.1)) global%internDeform = 1
143 
144  ENDDO ! iPatch
145  ENDDO ! iReg
146 
147 ! finalize --------------------------------------------------------------------
148 
149  CALL deregisterfunction( global )
150 
151 END SUBROUTINE rflo_readbcslipwallsection
152 
153 !******************************************************************************
154 !
155 ! RCS Revision history:
156 !
157 ! $Log: RFLO_ReadBcSlipWallSection.F90,v $
158 ! Revision 1.9 2008/12/06 08:44:07 mtcampbe
159 ! Updated license.
160 !
161 ! Revision 1.8 2008/11/19 22:17:21 mtcampbe
162 ! Added Illinois Open Source License/Copyright
163 !
164 ! Revision 1.7 2008/10/23 18:20:53 mtcampbe
165 ! Crazy number of changes to track and fix initialization and
166 ! restart bugs. Many improperly formed logical expressions
167 ! were fixed, and bug in allocation for data associated with
168 ! the BC_INFLOWVELTEMP boundary condition squashed in
169 ! RFLO_ReadBcInflowVelSection.F90.
170 !
171 ! Revision 1.6 2006/08/19 15:38:21 mparmar
172 ! Renamed patch variables
173 !
174 ! Revision 1.5 2005/09/30 03:31:00 wasistho
175 ! initialize vals(3:6)
176 !
177 ! Revision 1.4 2005/09/30 01:31:03 wasistho
178 ! move internDeform assignment to all procs
179 !
180 ! Revision 1.3 2005/09/30 01:03:27 wasistho
181 ! assigned global%internDeform
182 !
183 ! Revision 1.2 2005/09/09 03:22:34 wasistho
184 ! added boundary motion parameters
185 !
186 ! Revision 1.1 2004/11/29 21:25:16 wasistho
187 ! lower to upper case
188 !
189 ! Revision 1.6 2003/11/20 16:40:34 mdbrandy
190 ! Backing out RocfluidMP changes from 11-17-03
191 !
192 ! Revision 1.3 2003/05/19 21:18:21 jblazek
193 ! Automated switch to 0th-order extrapolation at slip walls and injection boundaries.
194 !
195 ! Revision 1.2 2003/05/15 02:57:01 jblazek
196 ! Inlined index function.
197 !
198 ! Revision 1.1 2002/10/19 00:40:30 jblazek
199 ! Added utility (rflosurf) to write out surface grids for GenX.
200 !
201 ! Revision 1.7 2002/10/12 03:20:50 jblazek
202 ! Replaced [io]stat=global%error with local errorFlag for Rocflo.
203 !
204 ! Revision 1.6 2002/09/27 00:57:10 jblazek
205 ! Changed makefiles - no makelinks needed.
206 !
207 ! Revision 1.5 2002/09/20 22:22:36 jblazek
208 ! Finalized integration into GenX.
209 !
210 ! Revision 1.4 2002/09/17 13:43:00 jferry
211 ! Added Time-dependent boundary conditions
212 !
213 ! Revision 1.3 2002/09/05 17:40:22 jblazek
214 ! Variable global moved into regions().
215 !
216 ! Revision 1.2 2002/03/30 00:50:49 jblazek
217 ! Cleaned up with flint.
218 !
219 ! Revision 1.1 2002/02/27 18:38:20 jblazek
220 ! Changed extrapol. to dummy cells at injection boundaries and slip walls.
221 !
222 !******************************************************************************
223 
224 
225 
226 
227 
228 
229 
subroutine rflo_readbcslipwallsection(regions)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
**********************************************************************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
subroutine readpatchsection(global, fileID, nvals, keys, vals, brbeg, brend, prbeg, prend, distrib, profType, fname, defined)
Definition: patch.h:74
**********************************************************************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
**********************************************************************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)
Definition: Vector_n.h:346
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469