Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_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 & base solver
26 ! to default values.
27 !
28 ! Description: none.
29 !
30 ! Input: none.
31 !
32 ! Output: regions = initial input values.
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RFLO_InitInputValues.F90,v 1.26 2008/12/06 08:44:07 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflo_initinputvalues( regions )
45 
46  USE moddatatypes
47  USE modbndpatch, ONLY : t_patch
48  USE moddatastruct, ONLY : t_region
49  USE modglobal, ONLY : t_global
50  USE modmixture, ONLY : t_mixt_input
51  USE moderror
52  USE modparameters
53  IMPLICIT NONE
54 
55 ! ... parameters
56  TYPE(t_region), POINTER :: regions(:)
57 
58 ! ... loop variables
59  INTEGER :: ireg, ipatch
60 
61 ! ... local variables
62  TYPE(t_mixt_input), POINTER :: input
63  TYPE(t_patch), POINTER :: patch
64  TYPE(t_global), POINTER :: global
65 
66 !******************************************************************************
67 
68  global => regions(1)%global
69 
70  CALL registerfunction( global,'RFLO_InitInputValues',&
71  'RFLO_InitInputValues.F90' )
72 
73 ! global values ---------------------------------------------------------------
74 ! regions per processor
75 
76  global%nRegionsProc = 1
77 
78 ! random number generator
79 
80  global%randSeedOffset = 0
81  global%randSeedType = rand_seed_type_fixed
82 
83 ! formats for grid & solution
84 
85  global%gridFormat = format_ascii
86  global%solutFormat = format_ascii
87 
88 ! reference values
89 
90  global%refVelocity = 100._rfreal
91  global%refPressure = 1.e+5_rfreal
92  global%refDensity = 1.2_rfreal
93  global%refCp = 1004.5_rfreal
94  global%refGamma = 1.4_rfreal
95  global%refLength = 1.0_rfreal
96  global%refREnum = 100._rfreal
97  global%prLam = 0.72_rfreal
98  global%prTurb = 0.9_rfreal
99  global%scnLam = 0.22_rfreal
100  global%scnTurb = 0.9_rfreal
101 
102 ! acceleration
103 
104  global%accelOn = .false.
105  global%accelX = 0._rfreal
106  global%accelX = 0._rfreal
107  global%accelX = 0._rfreal
108 
109 ! grid motion
110 
111  global%moveGridScheme = movegrid_blocks
112  global%moveGridNiter = 10
113  global%moveGridViter = 5
114  global%moveGridSiter = 20
115  global%moveGridWeight = 2._rfreal
116  global%moveGridAmplifX = 1._rfreal
117  global%moveGridAmplifY = 1._rfreal
118  global%moveGridAmplifZ = 1._rfreal
119  global%moveGridPower = 1._rfreal
120  global%moveGridNbour = 12
121  global%moveGridNsmatch = 20
122  global%moveGridOrthDir = off
123  global%moveGridOrthWghtX = 0._rfreal
124  global%moveGridOrthWghtY = 0._rfreal
125  global%moveGridOrthWghtZ = 0._rfreal
126  global%moveGridOrthCell = 0._rfreal
127 
128 ! multigrid
129 
130  global%startLevel = 1
131  global%cycleType = mgcycle_no
132  global%refineIter = 9999999
133 
134 ! position of probe(s)
135 
136  global%nProbes = 0
137  global%probeSaveTime = 0._rfreal
138  global%probeSaveIter = 1
139  global%probeOpenClose = .false.
140 
141 ! thrust
142 
143  global%thrustType = thrust_none
144  global%thrustPlane = xcoord
145  global%thrustCoord = 0._rfreal
146  global%thrustPamb = 1.e+5_rfreal
147  global%thrustSaveTime = 0._rfreal
148  global%thrustSaveIter = 1
149  global%thrustOpenClose = .false.
150 
151 ! global forces and aerodynamic coefficients
152 
153  global%forcesOn = forces_none
154  global%forceX = 0._rfreal
155  global%forceY = 0._rfreal
156  global%forceZ = 0._rfreal
157 
158  global%aeroCoeffs = off
159  global%forceRefLength = 1._rfreal
160  global%forceRefArea = 1._rfreal
161  global%forceRefXCoord = 0._rfreal
162  global%forceRefYCoord = 0._rfreal
163  global%forceRefZCoord = 0._rfreal
164  global%acBndBoxXmin = -huge( 1._rfreal )
165  global%acBndBoxXmax = huge( 1._rfreal )
166  global%acBndBoxYmin = -huge( 1._rfreal )
167  global%acBndBoxYmax = huge( 1._rfreal )
168  global%acBndBoxZmin = -huge( 1._rfreal )
169  global%acBndBoxZmax = huge( 1._rfreal )
170 
171 ! time stepping
172 
173  global%flowType = flow_steady
174  global%solverType = solv_explicit
175  global%currentIter = 0
176  global%maxIter = 10000
177  global%writeIter = 1000
178  global%printIter = 1
179  global%dtImposed = 1.e-5_rfreal
180 #ifndef GENX
181  global%timeStamp = 0.e+0_rfreal
182 #endif
183  global%maxTime = 1.e-4_rfreal
184  global%writeTime = 5.e-5_rfreal
185  global%printTime = 1.e-15_rfreal
186  global%resTol = 1.e-5_rfreal
187  global%tstepOrder = 2
188  global%maxSubIter = 100
189  global%tolSubIter = 1.e-2_rfreal
190  global%predictSol = .true.
191  global%dualTstSource = .false.
192  global%dtFixed = .true.
193 
194  global%rkScheme = rk_scheme_4_classical
195 
196 #ifdef STATS
197 ! time averaged statistics
198 
199  global%doStat = 0
200  global%reStat = 0
201  global%mixtNStat = 0
202  global%turbNStat = 0
203  global%integrTime = 0._rfreal
204 #endif
205 
206 ! boundary conditions
207 
208  global%infloNijk = nijk_inflow_init
209  global%internDeform = 0
210 
211 ! multiphysics modules
212 
213  global%peulUsed = .false.
214  global%plagUsed = .false.
215  global%inrtUsed = .false.
216 
217 ! post processing
218 
219  global%postPlotType = plot_grid_flow
220  global%postOutFmt = plot_fmt_tecascii
221  global%postStatsFlag = .false.
222  global%postTurbFlag = .false.
223  global%postPlagFlag = .false.
224  global%postRadiFlag = .false.
225  global%postSpecFlag = .false.
226 
227 ! region related values -------------------------------------------------------
228 
229  DO ireg=1,global%nRegions
230 
231  regions(ireg)%nDumCells = 2
232  regions(ireg)%blockShape = region_shape_normal
233 
234  input => regions(ireg)%mixtInput
235 
236  input%flowModel = flow_euler
237  input%turbModel = turb_model_none
238  input%moveGrid = .false.
239  input%computeTv = .false.
240 
241  input%frozenFlag = .false.
242  input%gasModel = gas_model_tcperf
243 
244  input%radiUsed = .false. ! no radiation
245 
246  input%spaceDiscr = discr_cen_scal
247  input%spaceOrder = discr_order_2
248  input%timeScheme = tst_hyb5rk
249  input%cfl = 3.0_rfreal
250  input%smoocf = -1.0_rfreal
251  input%vis2 = 0.5_rfreal
252  input%vis4 = 1._rfreal/128._rfreal
253  input%pSwitchType = pswitch_std
254  input%pSwitchOmega = 0.5_rfreal
255  input%limfac = 5.0_rfreal
256  input%epsentr = 0.05_rfreal
257  input%faceEdgeAvg = fe_avg_uniform
258 
259  input%viscModel = visc_suthr
260  input%refVisc = global%refDensity*global%refVelocity &
261  * global%refLength/global%refREnum
262  input%refTemp = 110.0_rfreal
263  input%suthCoef = 288.16_rfreal
264 
265 ! - patch related values
266 
267  DO ipatch=1,regions(ireg)%nPatches
268  patch => regions(ireg)%levels(1)%patches(ipatch) ! only finest level
269  patch%globalAeroCoeffs = .false.
270  patch%mixt%setMotion = .false.
271  patch%mixt%bndVel(:) = 0._rfreal
272  patch%mixt%amplitude = 0._rfreal
273  ENDDO ! iPatch
274 
275  ENDDO ! iReg
276 
277 ! finalize --------------------------------------------------------------------
278 
279  CALL deregisterfunction( global )
280 
281 END SUBROUTINE rflo_initinputvalues
282 
283 !******************************************************************************
284 !
285 ! RCS Revision history:
286 !
287 ! $Log: RFLO_InitInputValues.F90,v $
288 ! Revision 1.26 2008/12/06 08:44:07 mtcampbe
289 ! Updated license.
290 !
291 ! Revision 1.25 2008/11/19 22:17:20 mtcampbe
292 ! Added Illinois Open Source License/Copyright
293 !
294 ! Revision 1.24 2006/08/19 15:38:05 mparmar
295 ! Renamed patch variables
296 !
297 ! Revision 1.23 2006/05/09 23:34:57 wasistho
298 ! initialized global%dtFixed
299 !
300 ! Revision 1.22 2006/03/24 05:00:12 wasistho
301 ! huged initial ranges of acBndBox
302 !
303 ! Revision 1.21 2006/03/18 13:27:17 wasistho
304 ! initialized orthDir and orthWghtX,Y,Z
305 !
306 ! Revision 1.20 2006/03/14 04:36:32 wasistho
307 ! removed initialization of patch%bndFlat
308 !
309 ! Revision 1.19 2006/03/10 01:44:44 wasistho
310 ! changed coeffsBox to acBndBox
311 !
312 ! Revision 1.18 2006/03/10 00:58:07 wasistho
313 ! initialized aerodynamic coeffs data
314 !
315 ! Revision 1.17 2006/03/08 06:36:15 wasistho
316 ! added siter and viter
317 !
318 ! Revision 1.16 2006/03/04 04:34:01 wasistho
319 ! initialized region%blockShape
320 !
321 ! Revision 1.15 2005/12/05 05:56:09 wasistho
322 ! initialize patch%bndFlat
323 !
324 ! Revision 1.14 2005/12/01 17:06:57 fnajjar
325 ! Added default value to randSeedType
326 !
327 ! Revision 1.13 2005/12/01 08:58:49 wasistho
328 ! replaced 10000 by NIJK_INFLOW_INIT
329 !
330 ! Revision 1.12 2005/11/18 07:53:58 wasistho
331 ! initialized valMixt%amplitude
332 !
333 ! Revision 1.11 2005/11/10 22:19:29 fnajjar
334 ! ACH: Added frozenFlag
335 !
336 ! Revision 1.10 2005/10/31 21:09:33 haselbac
337 ! Changed specModel and SPEC_MODEL_NONE
338 !
339 ! Revision 1.9 2005/10/28 22:47:53 wasistho
340 ! initialize orthocell
341 !
342 ! Revision 1.8 2005/09/30 01:02:57 wasistho
343 ! initialize global%internDeform
344 !
345 ! Revision 1.7 2005/09/20 23:57:20 wasistho
346 ! initialize global%infloNijk
347 !
348 ! Revision 1.6 2005/09/09 03:23:41 wasistho
349 ! initialize boundary patch motion variables
350 !
351 ! Revision 1.5 2005/08/28 23:48:32 wasistho
352 ! added orthoWght for block orthogonality of RFLO global-gridmotion
353 !
354 ! Revision 1.4 2005/08/18 19:48:11 wasistho
355 ! added moveGridNsmatch
356 !
357 ! Revision 1.3 2005/06/04 01:02:03 wasistho
358 ! distinguished to AMPLIFX,Y,Z
359 !
360 ! Revision 1.2 2005/06/02 22:58:48 wasistho
361 ! initiate global%moveGridAmplif and moveGridPower
362 !
363 ! Revision 1.1 2004/11/29 21:25:16 wasistho
364 ! lower to upper case
365 !
366 ! Revision 1.29 2004/11/17 16:12:56 haselbac
367 ! Added initialization for rkScheme
368 !
369 ! Revision 1.28 2004/09/02 02:34:37 wasistho
370 ! added face-edge averaging input-option parameter in Rocflo
371 !
372 ! Revision 1.27 2004/07/28 01:52:56 wasistho
373 ! initialize global%post... variables
374 !
375 ! Revision 1.26 2004/04/08 03:15:41 wasistho
376 ! nDummyCells in Rocflo read from INITFLOW section
377 !
378 ! Revision 1.25 2004/03/05 22:08:59 jferry
379 ! created global variables for peul, plag, and inrt use
380 !
381 ! Revision 1.24 2004/03/03 23:55:38 jferry
382 ! Allowed particles to be run with Euler case
383 !
384 ! Revision 1.23 2004/03/02 21:49:20 jferry
385 ! Added inrtUsed flag to mixture data structure
386 !
387 ! Revision 1.22 2003/11/21 22:30:04 fnajjar
388 ! Added global seed offset for Random Number Generator
389 !
390 ! Revision 1.21 2003/10/01 23:52:09 jblazek
391 ! Corrected bug in moving noslip wall BC and grid speeds.
392 !
393 ! Revision 1.20 2003/08/28 20:05:34 jblazek
394 ! Added acceleration terms.
395 !
396 ! Revision 1.19 2003/08/25 21:51:23 jblazek
397 ! Full version of global grid motion scheme.
398 !
399 ! Revision 1.18 2003/08/11 21:51:17 jblazek
400 ! Added basic global grid smoothing scheme.
401 !
402 ! Revision 1.17 2003/07/03 21:48:44 jblazek
403 ! Implemented dual-time stepping.
404 !
405 ! Revision 1.16 2003/06/02 17:12:00 jblazek
406 ! Added computation of thrust.
407 !
408 ! Revision 1.15 2003/05/15 02:57:01 jblazek
409 ! Inlined index function.
410 !
411 ! Revision 1.14 2003/04/11 20:02:35 fnajjar
412 ! Added default values for viscosity model based on Sutherland Law
413 !
414 ! Revision 1.13 2003/01/23 17:48:53 jblazek
415 ! Changed algorithm to dump convergence, solution and probe data.
416 !
417 ! Revision 1.12 2002/11/02 01:46:53 wasistho
418 ! Added TURB statistics
419 !
420 ! Revision 1.11 2002/09/20 22:22:35 jblazek
421 ! Finalized integration into GenX.
422 !
423 ! Revision 1.10 2002/09/05 17:40:19 jblazek
424 ! Variable global moved into regions().
425 !
426 ! Revision 1.9 2002/07/25 00:39:54 jblazek
427 ! Option for TVD type pressure switch.
428 !
429 ! Revision 1.8 2002/06/14 20:53:05 wasistho
430 ! add time avg statistics
431 !
432 ! Revision 1.7 2002/02/27 18:38:19 jblazek
433 ! Changed extrapol. to dummy cells at injection boundaries and slip walls.
434 !
435 ! Revision 1.6 2002/02/25 22:36:52 jblazek
436 ! Simplified solver initialization routine.
437 !
438 ! Revision 1.5 2002/02/21 23:25:04 jblazek
439 ! Blocks renamed as regions.
440 !
441 ! Revision 1.4 2002/02/16 07:16:00 jblazek
442 ! Added implicit residual smoothing.
443 !
444 ! Revision 1.3 2002/02/09 01:47:00 jblazek
445 ! Added multi-probe option, residual smoothing, physical time step.
446 !
447 ! Revision 1.2 2002/02/01 21:04:25 jblazek
448 ! Streamlined time stepping routine.
449 !
450 ! Revision 1.1 2002/01/12 00:02:48 jblazek
451 ! Added postprocessor.
452 !
453 !******************************************************************************
454 
455 
456 
457 
458 
459 
460 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
Definition: patch.h:74
subroutine input(X, NNODE, NDC, NCELL, NFCE, NBPTS, NBFACE, ITYP, NPROP, XBNDY, XFAR, YFAR, ZFAR)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflo_initinputvalues(regions)