Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConvectiveFluxesMP.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: calculate convective fluxes for RocfluidMP framework.
26 !
27 ! Description: none.
28 !
29 ! Input: region = data of current region.
30 !
31 ! Output: regions%levels%mixt = new solution after one time step.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: ConvectiveFluxesMP.F90,v 1.5 2008/12/06 08:44:08 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003-2004 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE convectivefluxesmp( region )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY: t_region
47  USE modbndpatch, ONLY: t_patch
48  USE modglobal, ONLY: t_global
49  USE moderror
50  USE modparameters
52 
53 #ifdef PEUL
55 #endif
56 #ifdef SPEC
57 #ifdef RFLU
60  USE modinterfaces, ONLY: rflu_scalarfirst, &
65 #endif
66 #endif
67 #ifdef TURB
69 #endif
70 
71  IMPLICIT NONE
72 
73 ! *****************************************************************************
74 ! Definitions and declarations
75 ! *****************************************************************************
76 
77 ! =============================================================================
78 ! Arguments
79 ! =============================================================================
80 
81  TYPE(t_region) :: region
82 
83 ! =============================================================================
84 ! Locals
85 ! =============================================================================
86 
87  INTEGER :: ipatch,spacediscr,spaceorder
88  TYPE(t_global), POINTER :: global
89 
90 #ifdef RFLU
91  TYPE(t_patch), POINTER :: ppatch
92  TYPE(t_region), POINTER :: pregion
93 #endif
94 
95 ! *****************************************************************************
96 ! Start
97 ! *****************************************************************************
98 
99  global => region%global
100 
101  CALL registerfunction( global,'ConvectiveFluxesMP',&
102  'ConvectiveFluxesMP.F90' )
103 
104 ! *****************************************************************************
105 ! Get parameters
106 ! *****************************************************************************
107 
108  spacediscr = region%mixtInput%spaceDiscr
109  spaceorder = region%mixtInput%spaceOrder
110 
111 ! *****************************************************************************
112 ! Compute fluxes
113 ! *****************************************************************************
114 
115 ! =============================================================================
116 ! Mixture
117 ! =============================================================================
118 
119  CALL convectivefluxes( region )
120 
121 #ifdef PEUL
122 ! =============================================================================
123 ! Smoke
124 ! =============================================================================
125 
126  IF ( global%peulUsed ) CALL peul_convectivefluxes(region)
127 #endif
128 
129 #ifdef SPEC
130 ! =============================================================================
131 ! Species
132 ! =============================================================================
133 
134  IF ( global%specUsed .EQV. .true. ) THEN
135 #ifdef RFLU
136  pregion => region%pRegion
137 
138  CALL rflu_scalarconvertcvcons2prim(pregion,pregion%spec%cv, &
139  pregion%spec%cvState)
140 
141  CALL rflu_scalarinitrhs(pregion,pregion%specInput%nSpecies, &
142  pregion%spec%diss,pregion%spec%rhs)
143 
144  SELECT CASE ( spaceorder )
145  CASE ( 1 )
146  CALL rflu_scalarfirst(pregion,pregion%specInput%nSpecies, &
147  pregion%spec%cv,pregion%spec%rhs)
148 
149  DO ipatch = 1,pregion%grid%nPatches
150  ppatch => pregion%patches(ipatch)
151 
152  CALL rflu_scalarfirstpatch(pregion,ppatch, &
153  pregion%specInput%nSpecies, &
154  pregion%spec%cv,ppatch%spec, &
155  pregion%spec%rhs)
156  END DO ! iPatch
157  CASE ( 2 )
158  CALL rflu_scalarsecond(pregion,pregion%specInput%nSpecies, &
159  pregion%spec%cv,pregion%spec%gradCell, &
160  pregion%spec%rhs)
161 
162  DO ipatch = 1,pregion%grid%nPatches
163  ppatch => pregion%patches(ipatch)
164 
165  SELECT CASE ( ppatch%spaceOrder )
166  CASE ( 1 )
167  CALL rflu_scalarfirstpatch(pregion,ppatch, &
168  pregion%specInput%nSpecies, &
169  pregion%spec%cv,ppatch%spec, &
170  pregion%spec%rhs)
171  CASE ( 2 )
172  CALL rflu_scalarsecondpatch(pregion,ppatch, &
173  pregion%specInput%nSpecies, &
174  pregion%spec%cv, &
175  pregion%spec%gradCell, &
176  ppatch%spec,pregion%spec%rhs)
177  CASE default
178  CALL errorstop(global,err_reached_default,__line__)
179  END SELECT ! pPatch%spaceOrder
180  END DO ! iPatch
181  CASE default
182  CALL errorstop(global,err_reached_default,__line__)
183  END SELECT ! spaceOrder
184 
185  CALL rflu_scalarconvertcvprim2cons(pregion,pregion%spec%cv, &
186  pregion%spec%cvState)
187 #endif
188  END IF ! global%specUsed
189 #endif
190 
191 #ifdef TURB
192 ! =============================================================================
193 ! Turbulence
194 ! =============================================================================
195 
196  IF ((region%mixtInput%flowModel == flow_navst) .AND. &
197  (region%mixtInput%turbModel /= turb_model_none)) THEN
198  CALL turb_ransconvectivefluxes( region )
199  ENDIF
200 #endif
201 
202 ! *****************************************************************************
203 ! End
204 ! *****************************************************************************
205 
206  CALL deregisterfunction( global )
207 
208 END SUBROUTINE convectivefluxesmp
209 
210 !******************************************************************************
211 !
212 ! RCS Revision history:
213 !
214 ! $Log: ConvectiveFluxesMP.F90,v $
215 ! Revision 1.5 2008/12/06 08:44:08 mtcampbe
216 ! Updated license.
217 !
218 ! Revision 1.4 2008/11/19 22:17:22 mtcampbe
219 ! Added Illinois Open Source License/Copyright
220 !
221 ! Revision 1.3 2006/08/19 15:38:28 mparmar
222 ! Renamed patch variables
223 !
224 ! Revision 1.2 2006/04/15 16:53:04 haselbac
225 ! Added option of 1st order bfluxes with 2nd order scheme
226 !
227 ! Revision 1.1 2004/12/01 16:48:27 haselbac
228 ! Initial revision after changing case
229 !
230 ! Revision 1.12 2004/07/28 15:29:18 jferry
231 ! created global variable for spec use
232 !
233 ! Revision 1.11 2004/03/05 22:09:00 jferry
234 ! created global variables for peul, plag, and inrt use
235 !
236 ! Revision 1.10 2004/01/29 22:52:40 haselbac
237 ! Added second-order for species
238 !
239 ! Revision 1.9 2003/11/25 21:01:38 haselbac
240 ! Added rocspecies support
241 !
242 ! Revision 1.8 2003/11/20 16:40:35 mdbrandy
243 ! Backing out RocfluidMP changes from 11-17-03
244 !
245 ! Revision 1.5 2003/10/03 20:11:55 wasistho
246 ! initial installation of turbModel SA and DES
247 !
248 ! Revision 1.4 2003/10/01 23:52:09 jblazek
249 ! Corrected bug in moving noslip wall BC and grid speeds.
250 !
251 ! Revision 1.3 2003/09/26 21:45:34 fnajjar
252 ! Modified ModInterfaces calls to proper physical modules
253 !
254 ! Revision 1.2 2003/05/15 02:57:02 jblazek
255 ! Inlined index function.
256 !
257 ! Revision 1.1 2003/03/28 19:45:46 fnajjar
258 ! Initial import for RocfluidMP
259 !
260 !******************************************************************************
261 
262 
263 
264 
265 
266 
267 
subroutine convectivefluxesmp(region)
subroutine rflu_scalarsecondpatch(pRegion, pPatch, nVarScal, cvScal, gradCellScal, valScal, resScal)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine turb_ransconvectivefluxes(region)
subroutine rflu_scalarfirst(pRegion, nVarScal, cvScal, resScal)
subroutine rflu_scalarinitrhs(pRegion, nVarScal, dissScal, resScal)
subroutine, public rflu_scalarconvertcvprim2cons(pRegion, cvScal, cvScalStateCurrent)
subroutine convectivefluxes(region)
subroutine peul_convectivefluxes(region)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine rflu_scalarsecond(pRegion, nVarScal, cvScal, gradCellScal, resScal)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflu_scalarfirstpatch(pRegion, pPatch, nVarScal, cvScal, valScal, resScal)
subroutine, public rflu_scalarconvertcvcons2prim(pRegion, cvScal, cvScalStateCurrent)