Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_InitFlowScratchWrapper.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: Wrapper for initializing solution from scratch.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! pRegion Pointer to region
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: RFLU_InitFlowScratchWrapper.F90,v 1.5 2008/12/06 08:44:56 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2005 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_initflowscratchwrapper(pRegion)
45 
46  USE modglobal, ONLY: t_global
47  USE moddatatypes
48  USE modparameters
49  USE moderror
50  USE modgrid, ONLY: t_grid
51  USE moddatastruct, ONLY: t_region
52  USE modmpi
53 
55 
56  USE modinterfaces, ONLY: rflu_initflowscratch, &
58 
59 #ifdef SPEC
61 #endif
62 
63  IMPLICIT NONE
64 
65 ! ******************************************************************************
66 ! Declarations and definitions
67 ! ******************************************************************************
68 
69 ! ==============================================================================
70 ! Arguments
71 ! ==============================================================================
72 
73  TYPE(t_region), POINTER :: pregion
74 
75 ! ==============================================================================
76 ! Local variables
77 ! ==============================================================================
78 
79  TYPE(t_global), POINTER :: global
80  CHARACTER(CHRLEN) :: rcsidentstring
81 
82 ! ******************************************************************************
83 ! Start
84 ! ******************************************************************************
85 
86  rcsidentstring = '$RCSfile: RFLU_InitFlowScratchWrapper.F90,v $ $Revision: 1.5 $'
87 
88  global => pregion%global
89 
90  CALL registerfunction(global,'RFLU_InitFlowScratchWrapper',&
91  'RFLU_InitFlowScratchWrapper.F90')
92 
93 #ifdef SPEC
94 ! ******************************************************************************
95 ! Species. NOTE needs to be done first so can define gas properties when these
96 ! are influenced by species. NOTE initialize species state vector in primitive
97 ! state
98 ! ******************************************************************************
99 
100  IF ( global%specUsed .EQV. .true. ) THEN
101  CALL spec_rflu_initflowscratch(pregion)
102  END IF ! global%specUsed
103 #endif
104 
105 ! ******************************************************************************
106 ! Mixture. NOTE if use pseudo-gas model, need to know mixture density so can
107 ! determine volume fraction of discrete species; but mixture density is only
108 ! known once have already initialized mixture. So initialize mixture first with
109 ! perfect gas model, then initialize again with pseudo-gas model.
110 ! ******************************************************************************
111 
112  IF ( pregion%mixtInput%gasModel == gas_model_mixt_pseudo ) THEN
113  pregion%mixtInput%gasModel = gas_model_tcperf
114 
115  CALL rflu_setgasvars(pregion,1,pregion%grid%nCellsTot)
116  CALL rflu_initflowscratch(pregion)
117 
118  pregion%mixtInput%gasModel = gas_model_mixt_pseudo
119  END IF ! pRegion%mixtInput%gasModel
120 
121  CALL rflu_setgasvars(pregion,1,pregion%grid%nCellsTot)
122  CALL rflu_initflowscratch(pregion)
123 
124 ! ******************************************************************************
125 ! Physical modules
126 ! ******************************************************************************
127 
128 ! TO BE DONE
129 
130 ! END TO BE DONE
131 
132 #ifdef SPEC
133 ! ******************************************************************************
134 ! Convert species state vector to conservative state
135 ! ******************************************************************************
136 
137  IF ( global%specUsed .EQV. .true. ) THEN
138  CALL rflu_scalarconvertcvprim2cons(pregion,pregion%spec%cv, &
139  pregion%spec%cvState)
140  END IF ! global%specUsed
141 #endif
142 
143 ! ******************************************************************************
144 ! End
145 ! ******************************************************************************
146 
147  CALL deregisterfunction(global)
148 
149 END SUBROUTINE rflu_initflowscratchwrapper
150 
151 ! ******************************************************************************
152 !
153 ! RCS Revision history:
154 !
155 ! $Log: RFLU_InitFlowScratchWrapper.F90,v $
156 ! Revision 1.5 2008/12/06 08:44:56 mtcampbe
157 ! Updated license.
158 !
159 ! Revision 1.4 2008/11/19 22:18:06 mtcampbe
160 ! Added Illinois Open Source License/Copyright
161 !
162 ! Revision 1.3 2005/11/14 17:04:03 haselbac
163 ! Added support for pseudo-gas model
164 !
165 ! Revision 1.2 2005/11/10 02:43:30 haselbac
166 ! Added support for variable properties
167 !
168 ! Revision 1.1 2005/04/15 15:08:20 haselbac
169 ! Initial revision
170 !
171 ! ******************************************************************************
172 
173 
174 
175 
176 
177 
178 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_initflowscratchwrapper(pRegion)
subroutine, public rflu_scalarconvertcvprim2cons(pRegion, cvScal, cvScalStateCurrent)
subroutine rflu_initflowscratch(pRegion)
subroutine rflu_setgasvars(pRegion, icgBeg, icgEnd)
subroutine spec_rflu_initflowscratch(pRegion)
subroutine deregisterfunction(global)
Definition: ModError.F90:469