Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_UserInput.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 user input and store it in the data structure.
26 ! Copy region topology to coarser grids.
27 ! Check user input.
28 !
29 ! Description: none.
30 !
31 ! Input: regions = dimensions and topology (finest grid).
32 !
33 ! Output: regions = dimensions, topology and user input (finest grid).
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: RFLO_UserInput.F90,v 1.7 2008/12/06 08:44:28 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2001 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE rflo_userinput( regions )
46 
47  USE moddatatypes
48  USE modbndpatch, ONLY : t_patch
49  USE moddatastruct, ONLY : t_region
50  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 ! ... loop variables
62  INTEGER :: ireg, ipatch
63 
64 ! ... local variables
65  CHARACTER(CHRLEN) :: msg
66 
67  TYPE(t_patch), POINTER :: patch
68  TYPE(t_global), POINTER :: global
69 
70 !******************************************************************************
71 
72  global => regions(1)%global
73 
74  CALL registerfunction( global,'RFLO_UserInput',&
75  'RFLO_UserInput.F90' )
76 
77 ! initialize parameters
78 
79  CALL rflo_initinputvalues( regions )
80 
81 ! read & do region mapping
82 
83  CALL rflo_readregionmapsection( global )
84 
85  CALL rflo_mapregionsprocessors( regions )
86 
87 ! read user input
88 
89  CALL readinputfile( regions )
90 
91 
92 ! change noslip to slip wall for Euler
93 
94  DO ireg=1,global%nRegions
95  IF (regions(ireg)%mixtInput%flowModel == flow_euler) THEN
96  DO ipatch=1,regions(ireg)%nPatches
97  patch => regions(ireg)%levels(1)%patches(ipatch) ! only finest level
98  IF (patch%bcType>=bc_noslipwall .AND. & ! defined yet
99  patch%bcType<=bc_noslipwall+bc_range) THEN
100  patch%bcType = bc_slipwall
101  patch%mixt%bcSet = .false.
102  ENDIF
103  ENDDO
104  ENDIF
105  ENDDO
106 
107 ! read boundary conditions
108 
109  CALL rflo_readbcinputfile( regions )
110 
111 ! set model & numerical parameters from user input
112 
113  CALL rflo_derivedinputvalues( regions )
114 
115 ! check input (other than BCs, for which all modules are checked later)
116 
117  CALL rflo_checkuserinput( regions )
118 
119 ! set start and current grid levels
120 
121  DO ireg=1,global%nRegions
122  IF (regions(ireg)%nGridLevels < global%startLevel) THEN
123  WRITE(msg,1000) ireg,regions(ireg)%nGridLevels
124  CALL errorstop( global,err_grid_level,__line__,msg )
125  ELSE
126  regions(ireg)%startLevel = global%startLevel
127  regions(ireg)%currLevel = global%startLevel
128  ENDIF
129  ENDDO
130 
131 ! finalize
132 
133  CALL deregisterfunction( global )
134 
135 1000 FORMAT('Region ',i5,', grid level= ',i2,'.')
136 
137 END SUBROUTINE rflo_userinput
138 
139 !******************************************************************************
140 !
141 ! RCS Revision history:
142 !
143 ! $Log: RFLO_UserInput.F90,v $
144 ! Revision 1.7 2008/12/06 08:44:28 mtcampbe
145 ! Updated license.
146 !
147 ! Revision 1.6 2008/11/19 22:17:39 mtcampbe
148 ! Added Illinois Open Source License/Copyright
149 !
150 ! Revision 1.5 2008/10/23 18:20:57 mtcampbe
151 ! Crazy number of changes to track and fix initialization and
152 ! restart bugs. Many improperly formed logical expressions
153 ! were fixed, and bug in allocation for data associated with
154 ! the BC_INFLOWVELTEMP boundary condition squashed in
155 ! RFLO_ReadBcInflowVelSection.F90.
156 !
157 ! Revision 1.4 2006/08/19 15:39:49 mparmar
158 ! Renamed patch variables
159 !
160 ! Revision 1.3 2005/10/17 22:34:30 wasistho
161 ! moved calcCellCtr test to from UserInput to DerivedInputValues
162 !
163 ! Revision 1.2 2005/05/21 05:42:34 wasistho
164 ! set calcCellCtr
165 !
166 ! Revision 1.1 2004/11/29 20:51:40 wasistho
167 ! lower to upper case
168 !
169 ! Revision 1.15 2003/11/20 16:40:40 mdbrandy
170 ! Backing out RocfluidMP changes from 11-17-03
171 !
172 ! Revision 1.11 2003/05/15 02:57:04 jblazek
173 ! Inlined index function.
174 !
175 ! Revision 1.10 2003/02/11 22:49:53 jferry
176 ! Re-worked BC and TBC input routines to add multi-physics capability
177 !
178 ! Revision 1.1 2003/02/11 22:30:21 jferry
179 ! Re-worked BC and TBC input routines to add multi-physics capability
180 !
181 ! Revision 1.9 2002/09/27 00:57:10 jblazek
182 ! Changed makefiles - no makelinks needed.
183 !
184 ! Revision 1.8 2002/09/05 17:40:22 jblazek
185 ! Variable global moved into regions().
186 !
187 ! Revision 1.7 2002/02/27 18:38:20 jblazek
188 ! Changed extrapol. to dummy cells at injection boundaries and slip walls.
189 !
190 ! Revision 1.6 2002/02/21 23:25:06 jblazek
191 ! Blocks renamed as regions.
192 !
193 ! Revision 1.5 2002/01/23 03:51:25 jblazek
194 ! Added low-level time-stepping routines.
195 !
196 ! Revision 1.4 2002/01/11 17:20:19 jblazek
197 ! Added time stamp or iteration number to file names.
198 !
199 ! Revision 1.3 2002/01/02 16:04:20 jblazek
200 ! Added routines to generate geometry for dummy cells.
201 !
202 ! Revision 1.2 2001/12/08 00:18:42 jblazek
203 ! Added routines to read BC input file.
204 !
205 ! Revision 1.1.1.1 2001/12/03 21:44:04 jblazek
206 ! Import of RocfluidMP
207 !
208 !******************************************************************************
209 
210 
211 
212 
213 
214 
215 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_mapregionsprocessors(regions)
subroutine rflo_readregionmapsection(global)
subroutine rflo_readbcinputfile(regions)
Definition: patch.h:74
subroutine readinputfile(regions)
subroutine rflo_derivedinputvalues(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine rflo_userinput(regions)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflo_initinputvalues(regions)
subroutine rflo_checkuserinput(regions)