Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RVAV_ReadSectionStream2.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 the type of data in stream1, the
26 ! formats of the grids and solution files for the verification and
27 ! validation operations
28 !
29 ! Description: none.
30 !
31 ! Input: user input file.
32 !
33 ! Output: global% and globalRVAV%
34 !
35 ! Notes: for the moment the vav subroutines are written only for rocflo
36 !
37 !******************************************************************************
38 !
39 ! $Id: RVAV_ReadSectionStream2.F90,v 1.3 2008/12/06 08:45:09 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2002 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE rvav_readsectionstream2( global )
46 
47  USE moddatatypes
48  USE modglobal, ONLY : t_global
49  USE modinterfaces, ONLY : readsection
50  USE moderror
51  USE modparameters
52  USE rvav_modparameters ! this module holds the RVAV specific parameters like
53  ! FILE_COMPUTED, FILE_EXPERIMENTAL and FILE_ANALYTICAL
54  USE rvav_modglobal ! this is a RVAV specific module that holds the
55  ! definitions of all the RVAV variables
56  IMPLICIT NONE
57 
58 ! ... parameter variables
59  TYPE(t_global), POINTER :: global
60 
61 ! ... local variables
62  INTEGER :: nvals
63  INTEGER, PARAMETER :: nvals_max = 5
64 
65  CHARACTER(CHRLEN) :: keys(nvals_max)
66 
67  LOGICAL :: defined(nvals_max)
68 
69  REAL(RFREAL) :: vals(nvals_max)
70 
71 !******************************************************************************
72 
73  CALL registerfunction( global, 'RVAV_ReadSectionStream2',&
74  'RVAV_ReadSectionStream2.F90' )
75 
76 ! specify keywords and search for them
77 
78  nvals = nvals_max
79 
80  keys( 1) = 'RVAV_FLOW_TYPE'
81  keys( 2) = 'RVAV_FILE_TYPE'
82  keys( 3) = 'RVAV_GRID_TYPE'
83  keys( 4) = 'RVAV_SOLUTION_TYPE'
84  keys( 5) = 'RVAV_SIMILARITY_TYPE'
85 
86  CALL readsection( global, if_rvav_input,nvals,keys,vals, defined )
87 
88  IF (defined(1)) THEN
89  globalrvav%flowTypeS2 = flow_steady
90  IF (vals(1)>0.9 ) globalrvav%flowTypeS2 = flow_unsteady
91  ENDIF
92 
93  IF (defined(2)) THEN
94  IF (vals(2)>0.0 .AND. vals(2)<10.1) globalrvav%fileTypeS2 = file_computed
95  IF (vals(2)>10.1 .AND. vals(2)<20.1) globalrvav%fileTypeS2 = file_experimental
96  IF (vals(2)>20.1 .AND. vals(2)<30.1) globalrvav%fileTypeS2 = file_analytical
97  ENDIF
98 
99  IF (defined(3)) THEN
100  globalrvav%GridFormatS2 = format_ascii
101  IF (vals(3)>0.9 .AND. vals(3)<1.1) globalrvav%GridFormatS2 = format_binary
102  IF (vals(3) > 1.9) globalrvav%GridFormatS2 = format_hdf
103  ENDIF
104 
105  IF (defined(4)) THEN
106  globalrvav%SolutFormatS2 = format_ascii
107  IF (vals(4)>0.9 .AND. vals(4)<1.1) globalrvav%SolutFormatS2 = format_binary
108  IF (vals(4)>1.9) globalrvav%SolutFormatS2 = format_hdf
109  ENDIF
110 
111  IF ( globalrvav%fileTypeS2 == file_analytical ) THEN
112  IF ( defined(5) ) THEN
113  globalrvav%SimilarityTypeS2 = 0
114  IF (vals(5)>130.9 .AND. vals(5)<131.1) globalrvav%SimilarityTypeS2 = rvav_culick
115  IF (vals(5)>131.9 .AND. vals(5)<132.1) globalrvav%SimilarityTypeS2 = rvav_blasius
116  IF (vals(5)>132.9 ) globalrvav%SimilarityTypeS2 = rvav_gammbump
117  END IF
118  ENDIF
119 
120 ! .. checking if we have read the input deck correctly
121  IF ( global%verbLevel/=verbose_none ) THEN
122  WRITE(stdout,'(/,A)') ' readSectionStream2'
123  WRITE(stdout,'(A,I5)') ' FlowTypeS2 = ',globalrvav%FlowTypeS2
124  WRITE(stdout,'(A,I5)') ' FileTypeS2 = ',globalrvav%FileTypeS2
125  WRITE(stdout,'(A,I5)') ' GridFormatS2 = ',globalrvav%GridFormatS2
126  WRITE(stdout,'(A,I5)') ' SolutFormatS2 = ',globalrvav%SolutFormatS2
127  WRITE(stdout,'(A,I5)') ' SimilarityTypeS2 = ',globalrvav%SimilarityTypeS2
128  WRITE(stdout,'(A,I5)') ' readSectionStream2'
129  END IF ! verbLevel
130 
131 ! finalize
132 
133  CALL deregisterfunction( global )
134 
135 END SUBROUTINE rvav_readsectionstream2
136 
137 !******************************************************************************
138 !
139 ! RCS Revision history
140 !
141 ! $Log: RVAV_ReadSectionStream2.F90,v $
142 ! Revision 1.3 2008/12/06 08:45:09 mtcampbe
143 ! Updated license.
144 !
145 ! Revision 1.2 2008/11/19 22:18:19 mtcampbe
146 ! Added Illinois Open Source License/Copyright
147 !
148 ! Revision 1.1 2004/12/01 22:43:31 fnajjar
149 ! Initial revision after changing case
150 !
151 ! Revision 1.10 2003/11/20 16:40:41 mdbrandy
152 ! Backing out RocfluidMP changes from 11-17-03
153 !
154 ! Revision 1.6 2003/05/15 02:57:08 jblazek
155 ! Inlined index function.
156 !
157 ! Revision 1.5 2002/09/10 00:01:45 f-najjar
158 ! Variable global moved into regions()
159 !
160 ! Revision 1.4 2002/08/15 19:48:06 jblazek
161 ! Implemented grid deformation capability.
162 !
163 ! Revision 1.3 2002/06/19 20:27:20 f-najjar
164 ! Included GAMM Bump Definition
165 !
166 ! Revision 1.2 2002/06/15 17:46:31 f-najjar
167 ! Include Similarity Solution String
168 !
169 ! Revision 1.1.1.1 2002/06/03 21:41:29 f-najjar
170 ! Initial Import of RocVaV
171 !
172 !
173 !******************************************************************************
174 
175 
176 
177 
178 
179 
180 
subroutine rvav_readsectionstream2(global)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine readsection(global, fileID, nvals, keys, vals, 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 USE ModDataTypes USE nvals
subroutine deregisterfunction(global)
Definition: ModError.F90:469