Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_InitInputValues.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: Initialize user input parameters for mixture and base solver to
26 ! default values.
27 !
28 ! Description: None.
29 !
30 ! Input:
31 ! regions Region data
32 !
33 ! Output: None.
34 !
35 ! Notes:
36 ! 1. Variables stored in global type are initialized in RFLU_InitGlobal.
37 !
38 ! ******************************************************************************
39 !
40 ! $Id: RFLU_InitInputValues.F90,v 1.36 2008/12/06 08:44:12 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2002-2006 by the University of Illinois
43 !
44 ! ******************************************************************************
45 
46 SUBROUTINE rflu_initinputvalues(regions)
47 
48  USE moddatatypes
49  USE modglobal, ONLY: t_global
50  USE modmixture, ONLY: t_mixt_input
51  USE moddatastruct, ONLY: t_region
52  USE moderror
53  USE modparameters
54  USE modmpi
55 
56  IMPLICIT NONE
57 
58 ! ******************************************************************************
59 ! Declarations and definitions
60 ! ******************************************************************************
61 
62 ! ==============================================================================
63 ! Arguments
64 ! ==============================================================================
65 
66  TYPE(t_region), DIMENSION(:), POINTER :: regions
67 
68 ! ==============================================================================
69 ! Locals
70 ! ==============================================================================
71 
72  INTEGER :: ireg
73  CHARACTER(CHRLEN) :: rcsidentstring
74  TYPE(t_mixt_input), POINTER :: pmixtinput
75  TYPE(t_global), POINTER :: global
76 
77 ! ******************************************************************************
78 ! Start
79 ! ******************************************************************************
80 
81  rcsidentstring = '$RCSfile: RFLU_InitInputValues.F90,v $ $Revision: 1.36 $'
82 
83  global => regions(1)%global
84 
85  CALL registerfunction(global,'RFLU_InitInputValues',&
86  'RFLU_InitInputValues.F90')
87 
88  IF ( global%myProcid == masterproc .AND. &
89  global%verbLevel >= verbose_high ) THEN
90  WRITE(stdout,'(A,1X,A)') solver_name,'Initializing input variables...'
91  END IF ! global%verbLevel
92 
93 ! ******************************************************************************
94 ! Region-independent (global) values are not initialized here, but in
95 ! RFLU_InitGlobal.F90.
96 ! ******************************************************************************
97 
98 
99 ! ******************************************************************************
100 ! Region-dependent values
101 ! ******************************************************************************
102 
103  DO ireg = lbound(regions,1),ubound(regions,1)
104  pmixtinput => regions(ireg)%mixtInput
105 
106 ! ==============================================================================
107 ! Frozen flag
108 ! ==============================================================================
109 
110  pmixtinput%frozenFlag = .false.
111 
112 ! ==============================================================================
113 ! Dimensionality
114 ! ==============================================================================
115 
116  pmixtinput%dimens = 3
117 
118 ! ==============================================================================
119 ! Fluid model
120 ! ==============================================================================
121 
122  pmixtinput%fluidModel = fluid_model_comp
123 
124 ! ==============================================================================
125 ! Flow and gas model
126 ! ==============================================================================
127 
128  pmixtinput%flowModel = flow_euler
129  pmixtinput%gasModel = gas_model_tcperf
130  pmixtinput%computeTv = .false.
131 
132 ! ==============================================================================
133 ! Multi-physics modules
134 ! ==============================================================================
135 
136  pmixtinput%turbModel = turb_model_none
137  pmixtinput%radiUsed = .false. ! No radiation
138 
139  pmixtinput%indMfMixt = 0
140  pmixtinput%indSd = 0
141 
142 ! ==============================================================================
143 ! Spatial discretization
144 ! ==============================================================================
145 
146  pmixtinput%spaceDiscr = discr_upw_roe
147  pmixtinput%spaceOrder = discr_order_1
148 
149  pmixtinput%reconst = reconst_weno_xyz
150 
151  pmixtinput%cReconstCells = constr_none
152  pmixtinput%cReconstFaces = constr_none
153 
154  pmixtinput%cReconstCellsWeight = 1.0_rfreal
155  pmixtinput%cReconstFacesWeight = 1.0_rfreal
156 
157  pmixtinput%stencilDimensCells = 3
158  pmixtinput%stencilDimensFaces = 3
159  pmixtinput%stencilDimensBFaces = 3
160  pmixtinput%spaceOrderBFaces = discr_order_1
161 
162  pmixtinput%timeScheme = tst_hyb5rk
163  pmixtinput%cfl = 3.0_rfreal
164  pmixtinput%epsentr = 0.05_rfreal
165  pmixtinput%dissFact = 1.0_rfreal
166 
167 ! ==============================================================================
168 ! In-cell test tolerance
169 ! ==============================================================================
170 
171  pmixtinput%tolerICT = 1.0e-11_rfreal
172 
173 ! ==============================================================================
174 ! Grid motion
175 ! ==============================================================================
176 
177 #ifndef GENX
178  pmixtinput%moveGrid = .false.
179  pmixtinput%moveGridType = movegrid_type_disp
180  pmixtinput%moveGridNIter = 4
181  pmixtinput%moveGridSFact = 0.25_rfreal
182 #else
183  pmixtinput%moveGrid = .true.
184  pmixtinput%moveGridType = movegrid_type_genx
185 #endif
186 
187 ! ==============================================================================
188 ! Viscosity model. NOTE reference viscosity set to crazy value so can detect
189 ! whether it was set in RFLU_DerivedInputValues. If it was not set by user, it
190 ! is set equal to reference viscosity from REFERENCE input section.
191 ! ==============================================================================
192 
193  pmixtinput%viscModel = visc_suthr
194  pmixtinput%refTemp = 110.0_rfreal
195  pmixtinput%refVisc = REAL(crazy_value_int,rfreal)
196  pmixtinput%suthCoef = 288.16_rfreal
197  END DO ! iReg
198 
199 ! ******************************************************************************
200 ! End
201 ! ******************************************************************************
202 
203  IF ( global%myProcid == masterproc .AND. &
204  global%verbLevel >= verbose_high ) THEN
205  WRITE(stdout,'(A,1X,A)') solver_name,'Initializing input variables done.'
206  END IF ! global%verbLevel
207 
208  CALL deregisterfunction(global)
209 
210 END SUBROUTINE rflu_initinputvalues
211 
212 ! ******************************************************************************
213 !
214 ! RCS Revision history:
215 !
216 ! $Log: RFLU_InitInputValues.F90,v $
217 ! Revision 1.36 2008/12/06 08:44:12 mtcampbe
218 ! Updated license.
219 !
220 ! Revision 1.35 2008/11/19 22:17:25 mtcampbe
221 ! Added Illinois Open Source License/Copyright
222 !
223 ! Revision 1.34 2007/03/19 21:39:40 haselbac
224 ! Removed init of pMixtInput%nPv
225 !
226 ! Revision 1.33 2006/10/20 21:24:48 mparmar
227 ! Initialized spaceOrderBFaces with parameter
228 !
229 ! Revision 1.32 2006/08/19 15:38:44 mparmar
230 ! Added initialization of mixtInput%spaceOrderBFaces
231 !
232 ! Revision 1.31 2006/04/07 14:43:20 haselbac
233 ! Added init of stencilDimens params
234 !
235 ! Revision 1.30 2006/01/06 22:06:44 haselbac
236 ! Added seeting of stencilDimens
237 !
238 ! Revision 1.29 2005/12/25 15:23:16 haselbac
239 ! Added init for constrained reconstruction
240 !
241 ! Revision 1.28 2005/12/24 21:26:03 haselbac
242 ! Added init of ICT tolerance
243 !
244 ! Revision 1.27 2005/11/10 22:21:55 fnajjar
245 ! ACH: Added frozenFlag
246 !
247 ! Revision 1.26 2005/10/31 21:09:34 haselbac
248 ! Changed specModel and SPEC_MODEL_NONE
249 !
250 ! Revision 1.25 2005/10/31 19:25:21 haselbac
251 ! Added init of gasModel
252 !
253 ! Revision 1.24 2005/10/27 19:43:16 haselbac
254 ! Change init of constr variable
255 !
256 ! Revision 1.23 2005/10/27 18:56:13 haselbac
257 ! Added init of constr variable
258 !
259 ! Revision 1.22 2005/08/18 18:47:54 haselbac
260 ! Added init for nPv
261 !
262 ! Revision 1.21 2005/07/11 19:23:37 mparmar
263 ! Added init of reconst option
264 !
265 ! Revision 1.20 2005/04/20 14:39:16 haselbac
266 ! Removed CHECK_UNIFLOW code section
267 !
268 ! Revision 1.19 2005/03/09 14:53:24 haselbac
269 ! Added init of dimensionality
270 !
271 ! Revision 1.18 2004/11/02 02:28:24 haselbac
272 ! Added initialization for fluid model
273 !
274 ! Revision 1.17 2004/10/19 19:24:25 haselbac
275 ! Modified initialization of grid-motion input parameters
276 !
277 ! Revision 1.16 2004/07/30 22:47:35 jferry
278 ! Implemented Equilibrium Eulerian method for Rocflu
279 !
280 ! Revision 1.15 2004/07/28 15:39:51 jferry
281 ! created global variable for spec use
282 !
283 ! Revision 1.14 2004/07/08 02:16:52 haselbac
284 ! Added initialization for dissFact
285 !
286 ! Revision 1.13 2004/03/05 22:09:01 jferry
287 ! created global variables for peul, plag, and inrt use
288 !
289 ! Revision 1.12 2004/03/02 21:49:21 jferry
290 ! Added inrtUsed flag to mixture data structure
291 !
292 ! Revision 1.11 2004/01/29 22:56:34 haselbac
293 ! Added initialization of indMfMixt
294 !
295 ! Revision 1.10 2003/12/04 03:23:55 haselbac
296 ! Moved init of global params, changed init of viscosity params
297 !
298 ! Revision 1.9 2003/11/25 21:02:48 haselbac
299 ! Added initialization of specUsed
300 !
301 ! Revision 1.8 2003/11/21 22:35:50 fnajjar
302 ! Update Random Number Generator
303 !
304 ! Revision 1.7 2003/08/20 20:40:07 haselbac
305 ! Bug fix: END DO in wrong place...
306 !
307 ! Revision 1.6 2003/07/22 01:56:18 haselbac
308 ! Cosmetics only
309 !
310 ! Revision 1.5 2003/07/03 21:48:45 jblazek
311 ! Implemented dual-time stepping.
312 !
313 ! Revision 1.4 2003/06/04 22:02:39 haselbac
314 ! Added setting of uniform state (for rfluprep)
315 !
316 ! Revision 1.3 2003/04/11 20:05:02 fnajjar
317 ! Added default values for viscosity model based on Sutherland Law
318 !
319 ! Revision 1.2 2003/03/31 16:12:02 haselbac
320 ! Cosmetics, added grid-motion type init
321 !
322 ! Revision 1.1 2003/01/28 15:53:32 haselbac
323 ! Initial revision, moved from rocflu, use LBOUND and UBOUND
324 !
325 ! Revision 1.9 2002/11/02 02:04:25 wasistho
326 ! Added TURB statistics
327 !
328 ! Revision 1.8 2002/10/27 19:13:33 haselbac
329 ! Added setting of moveGrid
330 !
331 ! Revision 1.7 2002/10/05 19:23:19 haselbac
332 ! GENX integration
333 !
334 ! Revision 1.6 2002/09/09 15:51:56 haselbac
335 ! global and mixtInput now under region
336 !
337 ! Revision 1.5 2002/07/25 14:28:10 haselbac
338 ! Added MASTERPROC distinction for output
339 !
340 ! Revision 1.4 2002/06/17 13:34:12 haselbac
341 ! Prefixed SOLVER_NAME to all screen output
342 !
343 ! Revision 1.3 2002/06/14 21:54:35 wasistho
344 ! Added time avg statistics
345 !
346 ! Revision 1.2 2002/05/04 17:10:44 haselbac
347 ! Cosmetic changes
348 !
349 ! Revision 1.1 2002/03/26 19:25:32 haselbac
350 ! Initial revision
351 !
352 ! ******************************************************************************
353 
354 
355 
356 
357 
358 
359 
subroutine rflu_initinputvalues(regions)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine deregisterfunction(global)
Definition: ModError.F90:469