Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReadReferenceSection.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 reference values.
26 !
27 ! Description: none.
28 !
29 ! Input: user input file.
30 !
31 ! Output: global = reference variables (viscosity set in DerivedInputValues).
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: ReadReferenceSection.F90,v 1.4 2008/12/06 08:44:10 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2001 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE readreferencesection( global )
44 
45  USE moddatatypes
46  USE modglobal, ONLY : t_global
47  USE modinterfaces, ONLY : readsection
48  USE moderror
49  USE modparameters
50  IMPLICIT NONE
51 
52 ! ... parameters
53  TYPE(t_global), POINTER :: global
54 
55 ! ... local variables
56  INTEGER :: nvals
57  INTEGER, PARAMETER :: nvals_max = 11
58 
59  CHARACTER(10) :: keys(nvals_max)
60 
61  LOGICAL :: defined(nvals_max)
62 
63  REAL(RFREAL) :: vals(nvals_max)
64 
65 !******************************************************************************
66 
67  CALL registerfunction( global,'ReadReferenceSection',&
68  'ReadReferenceSection.F90' )
69 
70 ! specify keywords and search for them
71 
72  nvals = nvals_max
73 
74  keys( 1) = 'ABSVEL'
75  keys( 2) = 'PRESS'
76  keys( 3) = 'DENS'
77  keys( 4) = 'CP'
78  keys( 5) = 'GAMMA'
79  keys( 6) = 'LENGTH'
80  keys( 7) = 'RENUM'
81  keys( 8) = 'PRLAM'
82  keys( 9) = 'PRTURB'
83  keys(10) = 'SCNLAM'
84  keys(11) = 'SCNTURB'
85 
86  CALL readsection( global,if_input,nvals,keys,vals,defined )
87 
88  IF (defined( 1).eqv..true.) global%refVelocity = abs(vals( 1))
89  IF (defined( 2).eqv..true.) global%refPressure = abs(vals( 2))
90  IF (defined( 3).eqv..true.) global%refDensity = abs(vals( 3))
91  IF (defined( 4).eqv..true.) global%refCp = abs(vals( 4))
92  IF (defined( 5).eqv..true.) global%refGamma = abs(vals( 5))
93  IF (defined( 6).eqv..true.) global%refLength = abs(vals( 6))
94  IF (defined( 7).eqv..true.) global%refREnum = abs(vals( 7))
95  IF (defined( 8).eqv..true.) global%prLam = abs(vals( 8))
96  IF (defined( 9).eqv..true.) global%prTurb = abs(vals( 9))
97  IF (defined(10).eqv..true.) global%scnLam = abs(vals(10))
98  IF (defined(11).eqv..true.) global%scnTurb = abs(vals(11))
99 
100 ! finalize
101 
102  CALL deregisterfunction( global )
103 
104 END SUBROUTINE readreferencesection
105 
106 !******************************************************************************
107 !
108 ! RCS Revision history:
109 !
110 ! $Log: ReadReferenceSection.F90,v $
111 ! Revision 1.4 2008/12/06 08:44:10 mtcampbe
112 ! Updated license.
113 !
114 ! Revision 1.3 2008/11/19 22:17:23 mtcampbe
115 ! Added Illinois Open Source License/Copyright
116 !
117 ! Revision 1.2 2008/10/23 18:20:55 mtcampbe
118 ! Crazy number of changes to track and fix initialization and
119 ! restart bugs. Many improperly formed logical expressions
120 ! were fixed, and bug in allocation for data associated with
121 ! the BC_INFLOWVELTEMP boundary condition squashed in
122 ! RFLO_ReadBcInflowVelSection.F90.
123 !
124 ! Revision 1.1 2004/12/01 16:50:48 haselbac
125 ! Initial revision after changing case
126 !
127 ! Revision 1.9 2003/11/20 16:40:35 mdbrandy
128 ! Backing out RocfluidMP changes from 11-17-03
129 !
130 ! Revision 1.6 2003/05/15 02:57:02 jblazek
131 ! Inlined index function.
132 !
133 ! Revision 1.5 2002/09/05 17:40:20 jblazek
134 ! Variable global moved into regions().
135 !
136 ! Revision 1.4 2002/04/11 18:46:16 haselbac
137 ! Use parameter to specify size of keys,vals,defined
138 !
139 ! Revision 1.3 2002/01/11 17:18:31 jblazek
140 ! Updated description of I/O variables.
141 !
142 ! Revision 1.2 2001/12/22 00:09:38 jblazek
143 ! Added routines to store grid and solution.
144 !
145 ! Revision 1.1 2001/12/07 16:54:32 jblazek
146 ! Added files to read user input.
147 !
148 !******************************************************************************
149 
150 
151 
152 
153 
154 
155 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine readsection(global, fileID, nvals, keys, vals, defined)
subroutine readreferencesection(global)
**********************************************************************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