Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReadForcesSection.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 calculation of forces.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! global Pointer to global data
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: ReadForcesSection.F90,v 1.8 2008/12/06 08:44:09 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001-2005 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE readforcessection( global )
45 
46  USE moddatatypes
47  USE modglobal, ONLY : t_global
48  USE modinterfaces, ONLY : readsection
49  USE moderror
50  USE modparameters
51  IMPLICIT NONE
52 
53 ! ******************************************************************************
54 ! Definitions and declarations
55 ! ******************************************************************************
56 
57 ! ==============================================================================
58 ! Arguments
59 ! ==============================================================================
60 
61  TYPE(t_global), POINTER :: global
62 
63 ! ==============================================================================
64 ! Locals
65 ! ==============================================================================
66 
67 #ifdef RFLO
68  INTEGER, PARAMETER :: nvals_max = 13
69 #endif
70 #ifdef RFLU
71  INTEGER, PARAMETER :: nvals_max = 7
72 #endif
73 
74  LOGICAL :: defined(nvals_max)
75  CHARACTER(10) :: keys(nvals_max)
76  INTEGER :: nvals
77  REAL(RFREAL) :: vals(nvals_max)
78 
79 ! ******************************************************************************
80 ! Start
81 ! ******************************************************************************
82 
83  CALL registerfunction( global,'ReadForcesSection',&
84  'ReadForcesSection.F90' )
85 
86 ! ******************************************************************************
87 ! Specify keywords and search for them
88 ! ******************************************************************************
89 
90 #ifdef RFLO
91  nvals = nvals_max
92 
93  keys(1) = 'TYPE'
94  keys(2) = 'AEROCOEFFS'
95  keys(3) = 'REFLENGTH'
96  keys(4) = 'REFAREA'
97  keys(5) = 'REFXCOORD'
98  keys(6) = 'REFYCOORD'
99  keys(7) = 'REFZCOORD'
100  keys(8) = 'BNDBOXXMIN'
101  keys(9) = 'BNDBOXXMAX'
102  keys(10) = 'BNDBOXYMIN'
103  keys(11) = 'BNDBOXYMAX'
104  keys(12) = 'BNDBOXZMIN'
105  keys(13) = 'BNDBOXZMAX'
106 #endif
107 
108 #ifdef RFLU
109  nvals = nvals_max
110 
111  keys(1) = 'FLAG'
112  keys(2) = 'REFLENGTH'
113  keys(3) = 'REFAREA'
114  keys(4) = 'REFXCOORD'
115  keys(5) = 'REFYCOORD'
116  keys(6) = 'REFZCOORD'
117  keys(7) = 'PATCHFLAG'
118 #endif
119 
120  CALL readsection(global,if_input,nvals,keys,vals,defined)
121 
122 ! ******************************************************************************
123 ! Set variables
124 ! ******************************************************************************
125 
126 #ifdef RFLO
127  IF (defined(1).eqv..true.) THEN
128  global%forcesOn = forces_none
129  IF (vals(1)>0.9 .AND. vals(1)<1.1) global%forcesOn = forces_press
130  IF (vals(1) > 1.9) global%forcesOn = forces_visc
131  ENDIF
132 
133  IF (defined(2).eqv..true.) THEN
134  global%aeroCoeffs = off
135  IF (vals(1)>0.9) global%aeroCoeffs = active
136  ENDIF
137 
138  IF (defined(3).eqv..true.) THEN
139  global%forceRefLength = vals(3)
140  END IF ! defined
141 
142  IF (defined(4).eqv..true.) THEN
143  global%forceRefArea = vals(4)
144  END IF ! defined
145 
146  IF (defined(5).eqv..true.) THEN
147  global%forceRefXCoord = vals(5)
148  END IF ! defined
149 
150  IF (defined(6).eqv..true.) THEN
151  global%forceRefYCoord = vals(6)
152  END IF ! defined
153 
154  IF (defined(7).eqv..true.) THEN
155  global%forceRefZCoord = vals(7)
156  END IF ! defined
157 
158  IF (defined(8).eqv..true.) THEN
159  global%acBndBoxXmin = vals(8)
160  END IF ! defined
161 
162  IF (defined(9).eqv..true.) THEN
163  global%acBndBoxXmax = vals(9)
164  END IF ! defined
165 
166  IF (defined(10).eqv..true.) THEN
167  global%acBndBoxYmin = vals(10)
168  END IF ! defined
169 
170  IF (defined(11).eqv..true.) THEN
171  global%acBndBoxYmax = vals(11)
172  END IF ! defined
173 
174  IF (defined(12).eqv..true.) THEN
175  global%acBndBoxZmin = vals(12)
176  END IF ! defined
177 
178  IF (defined(13).eqv..true.) THEN
179  global%acBndBoxZmax = vals(13)
180  END IF ! defined
181 #endif
182 
183 #ifdef RFLU
184  IF ( defined(1) .EQV. .true. ) THEN
185  IF ( nint(vals(1)) == 1 ) THEN
186  global%forceFlag = .true.
187  ELSE
188  global%forceFlag = .false.
189  END IF ! NINT
190  END IF ! defined
191 
192  IF ( defined(2) .EQV. .true. ) THEN
193  global%forceRefLength = vals(2)
194  END IF ! defined
195 
196  IF ( defined(3) .EQV. .true. ) THEN
197  global%forceRefArea = vals(3)
198  END IF ! defined
199 
200  IF ( defined(4) .EQV. .true. ) THEN
201  global%forceRefXCoord = vals(4)
202  END IF ! defined
203 
204  IF ( defined(5) .EQV. .true. ) THEN
205  global%forceRefYCoord = vals(5)
206  END IF ! defined
207 
208  IF ( defined(6) .EQV. .true. ) THEN
209  global%forceRefZCoord = vals(6)
210  END IF ! defined
211 
212  IF ( defined(7) .EQV. .true. ) THEN
213  IF ( nint(vals(1)) == 1 ) THEN
214  global%patchCoeffFlag = .true.
215  ELSE
216  global%patchCoeffFlag = .false.
217  END IF ! NINT
218  END IF ! defined
219 #endif
220 
221 ! ******************************************************************************
222 ! End
223 ! ******************************************************************************
224 
225  CALL deregisterfunction(global)
226 
227 END SUBROUTINE readforcessection
228 
229 ! ******************************************************************************
230 !
231 ! RCS Revision history:
232 !
233 ! $Log: ReadForcesSection.F90,v $
234 ! Revision 1.8 2008/12/06 08:44:09 mtcampbe
235 ! Updated license.
236 !
237 ! Revision 1.7 2008/11/19 22:17:23 mtcampbe
238 ! Added Illinois Open Source License/Copyright
239 !
240 ! Revision 1.6 2008/10/23 18:20:55 mtcampbe
241 ! Crazy number of changes to track and fix initialization and
242 ! restart bugs. Many improperly formed logical expressions
243 ! were fixed, and bug in allocation for data associated with
244 ! the BC_INFLOWVELTEMP boundary condition squashed in
245 ! RFLO_ReadBcInflowVelSection.F90.
246 !
247 ! Revision 1.5 2006/04/07 15:19:15 haselbac
248 ! Removed tabs
249 !
250 ! Revision 1.4 2006/03/10 01:46:33 wasistho
251 ! read acBndBox coordinates for Rocflo
252 !
253 ! Revision 1.3 2006/03/09 20:47:48 wasistho
254 ! prepared for aerodyn.coeffs calc in RFLO
255 !
256 ! Revision 1.2 2005/08/09 00:52:39 haselbac
257 ! Added reading of PATCHFLAG
258 !
259 ! Revision 1.1 2004/12/01 16:50:15 haselbac
260 ! Initial revision after changing case
261 !
262 ! Revision 1.9 2004/06/16 20:00:13 haselbac
263 ! Added RFLU code
264 !
265 ! Revision 1.8 2003/11/20 16:40:35 mdbrandy
266 ! Backing out RocfluidMP changes from 11-17-03
267 !
268 ! Revision 1.5 2003/05/15 02:57:02 jblazek
269 ! Inlined index function.
270 !
271 ! Revision 1.4 2002/09/05 17:40:20 jblazek
272 ! Variable global moved into regions().
273 !
274 ! Revision 1.3 2002/01/11 17:18:31 jblazek
275 ! Updated description of I/O variables.
276 !
277 ! Revision 1.2 2001/12/22 00:09:38 jblazek
278 ! Added routines to store grid and solution.
279 !
280 ! Revision 1.1 2001/12/07 16:54:31 jblazek
281 ! Added files to read user input.
282 !
283 ! ******************************************************************************
284 
285 
286 
287 
288 
289 
290 
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 readforcessection(global)
subroutine deregisterfunction(global)
Definition: ModError.F90:469