Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReadFlowSection.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 flow model.
26 !
27 ! Description: none.
28 !
29 ! Input: user input file.
30 !
31 ! Output: regions = flow model, moving grid.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: ReadFlowSection.F90,v 1.4 2008/12/06 08:44:09 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE readflowsection( regions )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY: t_region
47 #ifdef RFLO
49 #endif
50 #ifdef RFLU
51  USE modinterfaces, ONLY : readsection
52 #endif
53  USE moderror
54  USE modparameters
55  IMPLICIT NONE
56 
57 ! ... parameters
58  TYPE(t_region), POINTER :: regions(:)
59 
60 ! ... local variables
61  CHARACTER(10) :: keys(2)
62 
63 #ifdef RFLO
64  INTEGER :: brbeg, brend
65 #endif
66 #ifdef RFLU
67  INTEGER :: ireg
68 #endif
69 
70  LOGICAL :: defined(2)
71 
72  REAL(RFREAL) :: vals(2)
73 
74 !******************************************************************************
75 
76  CALL registerfunction( regions(1)%global,'ReadFlowSection',&
77  'ReadFlowSection.F90' )
78 
79 ! specify keywords and search for them
80 
81  keys(1) = 'MODEL'
82  keys(2) = 'MOVEGRID'
83 
84 #ifdef RFLO
85  CALL readregionsection( regions(1)%global,if_input,2,keys,vals, &
86  brbeg,brend,defined )
87 
88  IF (defined(1).eqv..true.) THEN
89  regions(brbeg:brend)%mixtInput%flowModel = flow_euler
90  IF (vals(1)>0.9) regions(brbeg:brend)%mixtInput%flowModel = flow_navst
91  ENDIF
92  IF (defined(2).eqv..true.) THEN
93  IF (vals(2) < 0.1) THEN
94  regions(brbeg:brend)%mixtInput%moveGrid = .false.
95  ELSE
96  regions(brbeg:brend)%mixtInput%moveGrid = .true.
97  ENDIF
98  ENDIF
99 #endif
100 
101 #ifdef RFLU
102  CALL readsection( regions(1)%global,if_input,2,keys,vals,defined )
103 
104  IF ( defined(1) .eqv..true.) THEN
105  DO ireg = lbound(regions,1),ubound(regions,1)
106  regions(ireg)%mixtInput%flowModel = nint(vals(1))
107  END DO ! iReg
108  END IF ! defined
109 
110  IF ( defined(2) .eqv..true.) THEN
111  IF ( nint(vals(2)) == 0 ) THEN
112  DO ireg = lbound(regions,1),ubound(regions,1)
113  regions(ireg)%mixtInput%moveGrid = .false.
114  END DO ! iReg
115  ELSEIF ( nint(vals(2)) == 1 ) THEN
116  DO ireg = lbound(regions,1),ubound(regions,1)
117  regions(ireg)%mixtInput%moveGrid = .true.
118  END DO ! iReg
119  END IF ! NINT
120  END IF ! defined
121 #endif
122 
123 ! finalize
124 
125  CALL deregisterfunction( regions(1)%global )
126 
127 END SUBROUTINE readflowsection
128 
129 !******************************************************************************
130 !
131 ! RCS Revision history:
132 !
133 ! $Log: ReadFlowSection.F90,v $
134 ! Revision 1.4 2008/12/06 08:44:09 mtcampbe
135 ! Updated license.
136 !
137 ! Revision 1.3 2008/11/19 22:17:23 mtcampbe
138 ! Added Illinois Open Source License/Copyright
139 !
140 ! Revision 1.2 2008/10/23 18:20:55 mtcampbe
141 ! Crazy number of changes to track and fix initialization and
142 ! restart bugs. Many improperly formed logical expressions
143 ! were fixed, and bug in allocation for data associated with
144 ! the BC_INFLOWVELTEMP boundary condition squashed in
145 ! RFLO_ReadBcInflowVelSection.F90.
146 !
147 ! Revision 1.1 2004/12/01 16:50:12 haselbac
148 ! Initial revision after changing case
149 !
150 ! Revision 1.16 2003/11/20 16:40:35 mdbrandy
151 ! Backing out RocfluidMP changes from 11-17-03
152 !
153 ! Revision 1.13 2003/05/16 02:27:43 haselbac
154 ! Removed KIND=RFREAL from NINT statements
155 !
156 ! Revision 1.12 2003/05/15 02:57:02 jblazek
157 ! Inlined index function.
158 !
159 ! Revision 1.11 2003/03/15 16:22:59 haselbac
160 ! Added KIND qualifyers
161 !
162 ! Revision 1.10 2002/10/16 21:09:43 haselbac
163 ! Fixed bug in RFLU code segment
164 !
165 ! Revision 1.9 2002/09/09 14:01:16 haselbac
166 ! mixtInput now under regions
167 !
168 ! Revision 1.8 2002/09/05 17:40:20 jblazek
169 ! Variable global moved into regions().
170 !
171 ! Revision 1.7 2002/03/26 19:01:46 haselbac
172 ! Added ROCFLU functionality
173 !
174 ! Revision 1.6 2002/02/21 23:25:05 jblazek
175 ! Blocks renamed as regions.
176 !
177 ! Revision 1.5 2002/01/28 23:55:22 jblazek
178 ! Added flux computation (central scheme).
179 !
180 ! Revision 1.4 2002/01/23 03:51:24 jblazek
181 ! Added low-level time-stepping routines.
182 !
183 ! Revision 1.3 2002/01/11 17:18:31 jblazek
184 ! Updated description of I/O variables.
185 !
186 ! Revision 1.2 2001/12/22 00:09:38 jblazek
187 ! Added routines to store grid and solution.
188 !
189 ! Revision 1.1 2001/12/07 16:54:31 jblazek
190 ! Added files to read user input.
191 !
192 !******************************************************************************
193 
194 
195 
196 
197 
198 
199 
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 readsection(global, fileID, nvals, keys, vals, defined)
subroutine readflowsection(regions)
subroutine readregionsection(global, fileID, nvals, keys, vals, brbeg, brend, defined)
subroutine deregisterfunction(global)
Definition: ModError.F90:469