Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_InitFlowHardCodeWrapper.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 hardcode.
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_InitFlowHardCodeWrapper.F90,v 1.6 2008/12/06 08:44:56 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2005-2006 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rflu_initflowhardcodewrapper(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 
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_InitFlowHardCodeWrapper.F90,v $ $Revision: 1.6 $'
87 
88  global => pregion%global
89 
90  CALL registerfunction(global,'RFLU_InitFlowHardCodeWrapper',&
91  'RFLU_InitFlowHardCodeWrapper.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_initflowhardcode(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  SELECT CASE ( pregion%mixtInput%fluidModel )
113 
114 ! ==============================================================================
115 ! Compressible fluid model
116 ! ==============================================================================
117 
118  CASE ( fluid_model_comp )
119  IF ( pregion%mixtInput%gasModel == gas_model_mixt_pseudo ) THEN
120  pregion%mixtInput%gasModel = gas_model_tcperf
121 
122  CALL rflu_setgasvars(pregion,1,pregion%grid%nCellsTot)
123  CALL rflu_initflowhardcode(pregion)
124 
125  pregion%mixtInput%gasModel = gas_model_mixt_pseudo
126  END IF ! pRegion%mixtInput%gasModel
127 
128  CALL rflu_setgasvars(pregion,1,pregion%grid%nCellsTot)
129  CALL rflu_initflowhardcode(pregion)
130 
131 ! ==============================================================================
132 ! Default
133 ! ==============================================================================
134 
135  CASE default
136  CALL errorstop(global,err_reached_default,__line__)
137  END SELECT ! pMixtInput%fluidModel
138 
139 
140 ! ******************************************************************************
141 ! Physical modules
142 ! ******************************************************************************
143 
144 #ifdef SPEC
145 ! ==============================================================================
146 ! Species. NOTE need to convert state vector to conservative state.
147 ! ==============================================================================
148 
149  IF ( global%specUsed .EQV. .true. ) THEN
150  CALL rflu_scalarconvertcvprim2cons(pregion,pregion%spec%cv, &
151  pregion%spec%cvState)
152  END IF ! global%specUsed
153 #endif
154 
155 ! ******************************************************************************
156 ! End
157 ! ******************************************************************************
158 
159  CALL deregisterfunction(global)
160 
161 END SUBROUTINE rflu_initflowhardcodewrapper
162 
163 
164 ! ******************************************************************************
165 !
166 ! RCS Revision history:
167 !
168 ! $Log: RFLU_InitFlowHardCodeWrapper.F90,v $
169 ! Revision 1.6 2008/12/06 08:44:56 mtcampbe
170 ! Updated license.
171 !
172 ! Revision 1.5 2008/11/19 22:18:06 mtcampbe
173 ! Added Illinois Open Source License/Copyright
174 !
175 ! Revision 1.4 2006/03/26 20:22:24 haselbac
176 ! Added support for GL model
177 !
178 ! Revision 1.3 2005/11/14 17:04:03 haselbac
179 ! Added support for pseudo-gas model
180 !
181 ! Revision 1.2 2005/11/10 02:43:00 haselbac
182 ! Added support for variable properties
183 !
184 ! Revision 1.1 2005/04/15 15:08:17 haselbac
185 ! Initial revision
186 !
187 ! ******************************************************************************
188 
189 
190 
191 
192 
193 
194 
subroutine spec_rflu_initflowhardcode(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_initflowhardcodewrapper(pRegion)
subroutine, public rflu_scalarconvertcvprim2cons(pRegion, cvScal, cvScalStateCurrent)
subroutine rflu_setgasvars(pRegion, icgBeg, icgEnd)
subroutine rflu_initflowhardcode(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469