Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_ReadBcInputFile.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 boundary conditions
26 ! (done on all processors).
27 !
28 ! Description: none.
29 !
30 ! Input: boundary condition file.
31 !
32 ! Output: regions = BC data for all regions.
33 !
34 ! Notes:
35 !
36 !******************************************************************************
37 !
38 ! $Id: RFLO_ReadBcInputFile.F90,v 1.7 2008/12/06 08:44:07 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflo_readbcinputfile( regions )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
54  USE moderror
55  USE modparameters
56  IMPLICIT NONE
57 
58 ! ... parameters
59  TYPE(t_region), POINTER :: regions(:)
60 
61 ! ... local variables
62  CHARACTER(2*CHRLEN+9) :: fname
63  CHARACTER(256) :: line
64 
65  INTEGER :: errorflag
66 
67  TYPE(t_global), POINTER :: global
68 
69 !******************************************************************************
70 
71  global => regions(1)%global
72 
73  CALL registerfunction( global,'RFLO_ReadBcInputFile',&
74  'RFLO_ReadBcInputFile.F90' )
75 
76 ! - open file
77 
78  WRITE(fname,'(A)') trim(global%inDir)//trim(global%casename)//'.bc'
79  OPEN(if_input,file=fname,form='formatted',status='old',iostat=errorflag)
80  global%error = errorflag
81  IF (global%error /= 0) &
82  CALL errorstop( global,err_file_open,__line__,'File: '//trim(fname) )
83 
84 ! - read file looking for keywords
85 
86  DO
87  READ(if_input,'(A256)',err=10,end=86) line
88  SELECT CASE(trim(line))
89 
90  CASE ('# BC_SLIPW')
91  CALL rflo_readbcslipwallsection( regions )
92 
93  CASE ('# BC_NOSLIP')
94  CALL rflo_readbcnoslipsection( regions )
95 
96 ! TEMPORARY - Keep this for backward compatibility
97  CASE ('# BC_INFLOW')
98  CALL rflo_readbcinflowtotangsection( regions )
99 ! END TEMPORARY
100 
101  CASE ('# BC_INFLOW_TOTANG')
102  CALL rflo_readbcinflowtotangsection( regions )
103 
104  CASE ('# BC_INFLOW_VELTEMP')
105  CALL rflo_readbcinflowvelsection( regions,bc_inflow_veltemp )
106 
107  CASE ('# BC_INFLOW_VELPRESS')
108  CALL rflo_readbcinflowvelsection( regions,bc_inflow_velpress )
109 
110  CASE ('# BC_OUTFLOW')
111  CALL rflo_readbcoutflowsection( regions )
112 
113  CASE ('# BC_FARF')
114  CALL rflo_readbcfarfsection( regions )
115 
116 ! TEMPORARY - Keep this for backward compatibility
117  CASE ('# BC_INJECT')
118  CALL rflo_readbcinjectmratesection( regions )
119 ! END TEMPORARY
120 
121  CASE ('# BC_INJECT_MRATE')
122  CALL rflo_readbcinjectmratesection( regions )
123 
124  CASE ('# BC_INJECT_APN')
125  CALL rflo_readbcinjectapnsection( regions )
126 
127  END SELECT
128  ENDDO
129 
130 86 CONTINUE
131 
132 ! close file ------------------------------------------------------------------
133  CLOSE(if_input,iostat=errorflag)
134  global%error = errorflag
135  IF (global%error /= 0) &
136  CALL errorstop( global,err_file_close,__line__,'File: '//trim(fname) )
137 
138 ! finalization & error handling -----------------------------------------------
139 
140  CALL deregisterfunction( global )
141  goto 999
142 
143 10 CONTINUE
144  CALL errorstop( global,err_file_read,__line__,'File: '//trim(fname) )
145 
146 999 CONTINUE
147 
148 END SUBROUTINE rflo_readbcinputfile
149 
150 !******************************************************************************
151 !
152 ! RCS Revision history:
153 !
154 ! $Log: RFLO_ReadBcInputFile.F90,v $
155 ! Revision 1.7 2008/12/06 08:44:07 mtcampbe
156 ! Updated license.
157 !
158 ! Revision 1.6 2008/11/19 22:17:20 mtcampbe
159 ! Added Illinois Open Source License/Copyright
160 !
161 ! Revision 1.5 2008/10/23 18:20:53 mtcampbe
162 ! Crazy number of changes to track and fix initialization and
163 ! restart bugs. Many improperly formed logical expressions
164 ! were fixed, and bug in allocation for data associated with
165 ! the BC_INFLOWVELTEMP boundary condition squashed in
166 ! RFLO_ReadBcInflowVelSection.F90.
167 !
168 ! Revision 1.4 2006/01/20 06:14:37 wasistho
169 ! added ReadBcInjectMrate and ReadBcInjectAPN
170 !
171 ! Revision 1.3 2005/04/28 22:06:56 wasistho
172 ! fixed ModInterfaces list
173 !
174 ! Revision 1.2 2005/04/28 05:45:37 wasistho
175 ! added velocity based inflow BC
176 !
177 ! Revision 1.1 2004/11/29 21:25:16 wasistho
178 ! lower to upper case
179 !
180 ! Revision 1.7 2003/11/20 16:40:34 mdbrandy
181 ! Backing out RocfluidMP changes from 11-17-03
182 !
183 ! Revision 1.4 2003/05/15 02:57:01 jblazek
184 ! Inlined index function.
185 !
186 ! Revision 1.3 2003/02/26 23:38:30 jferry
187 ! eliminated end=999 convention to ensure that files get closed
188 !
189 ! Revision 1.2 2003/02/11 22:30:21 jferry
190 ! Re-worked BC and TBC input routines to add multi-physics capability
191 !
192 ! Revision 1.1 2002/10/19 00:40:30 jblazek
193 ! Added utility (rflosurf) to write out surface grids for GenX.
194 !
195 ! Revision 1.9 2002/10/14 22:11:53 jblazek
196 ! No more number of regions in the name of the BC file.
197 !
198 ! Revision 1.8 2002/10/12 03:20:50 jblazek
199 ! Replaced [io]stat=global%error with local errorFlag for Rocflo.
200 !
201 ! Revision 1.7 2002/09/20 22:22:36 jblazek
202 ! Finalized integration into GenX.
203 !
204 ! Revision 1.6 2002/09/17 13:43:00 jferry
205 ! Added Time-dependent boundary conditions
206 !
207 ! Revision 1.5 2002/09/05 17:40:22 jblazek
208 ! Variable global moved into regions().
209 !
210 ! Revision 1.4 2002/02/27 18:38:20 jblazek
211 ! Changed extrapol. to dummy cells at injection boundaries and slip walls.
212 !
213 ! Revision 1.3 2002/02/21 23:25:06 jblazek
214 ! Blocks renamed as regions.
215 !
216 ! Revision 1.2 2002/01/11 17:20:19 jblazek
217 ! Added time stamp or iteration number to file names.
218 !
219 ! Revision 1.1 2001/12/08 00:18:42 jblazek
220 ! Added routines to read BC input file.
221 !
222 !******************************************************************************
223 
224 
225 
226 
227 
228 
229 
subroutine rflo_readbcinjectmratesection(regions)
subroutine rflo_readbcoutflowsection(regions)
subroutine rflo_readbcslipwallsection(regions)
CImg< T > & line(const unsigned int y0)
Get a line.
Definition: CImg.h:18421
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
subroutine rflo_readbcfarfsection(regions)
subroutine rflo_readbcinputfile(regions)
subroutine rflo_readbcinjectapnsection(regions)
**********************************************************************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 form
subroutine rflo_readbcinflowvelsection(regions, bcTitle)
subroutine rflo_readbcinflowtotangsection(regions)
subroutine rflo_readbcnoslipsection(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469