Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SourceTermsMP.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: add source terms to the residual.
26 !
27 ! Description: none.
28 !
29 ! Input: region = data of current region.
30 !
31 ! Output: pRegion%levels%mixt%rhs = complete right-hand side (residual).
32 !
33 ! Notes: none.
34 !
35 ! ******************************************************************************
36 !
37 ! $Id: SourceTermsMP.F90,v 1.8 2008/12/06 08:44:10 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003-2006 by the University of Illinois
40 !
41 ! ******************************************************************************
42 
43 SUBROUTINE sourcetermsmp( region )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE modinterfaces, ONLY : sourceterms
49  USE moderror
50  USE modparameters
51 
52 #ifdef RFLU
55 #endif
56 
57 #ifdef INRT
59 #endif
60 #ifdef RFLU
61 #ifdef PLAG
63 #endif
64 #ifdef SPEC
66 #endif
67 #endif
68 #ifdef PEUL
70 #endif
71 #ifdef RADI
73 #endif
74 #ifdef PERI
76 #endif
77 #ifdef TURB
79 #endif
80 #ifdef SPEC
82 #endif
83 
84  IMPLICIT NONE
85 
86 ! ... parameters
87  TYPE(t_region), TARGET :: region
88 
89 ! ... local variables
90  TYPE(t_global), POINTER :: global
91 #ifdef RFLU
92  TYPE(t_region), POINTER :: pregion
93 #endif
94 
95 ! ******************************************************************************
96 
97  global => region%global
98 
99  CALL registerfunction( global,'SourceTermsMP',&
100  'SourceTermsMP.F90' )
101 
102 ! add source terms
103 
104  CALL sourceterms( region )
105 
106 #ifdef RFLU
107  pregion => region
108  CALL rflu_convertcvcons2prim(pregion,cv_mixt_state_duvwp)
109 
110 #ifdef PLAG
111  IF ( global%plagUsed .EQV. .true. ) THEN
112  CALL plag_rflu_correctmixtproperties(pregion)
113  END IF ! global%plagUsed
114 #endif
115 #endif
116 
117 #ifdef INRT
118  IF (global%inrtUsed) THEN
119  CALL inrt_sourceterms( region )
120  ENDIF
121 #endif
122 #ifdef PEUL
123  IF (global%peulUsed) THEN
124  CALL peul_sourceterms( region )
125  ENDIF
126 #endif
127 #ifdef RADI
128  CALL radi_sourceterms( region )
129 #endif
130 #ifdef PERI
131  CALL peri_sourceterms( region )
132 #endif
133 #ifdef TURB
134  IF ((region%mixtInput%flowModel == flow_navst) .AND. &
135  (region%mixtInput%turbModel /= turb_model_none)) THEN
136  CALL turb_ranssourceterms( region )
137  ENDIF
138 #endif
139 
140 
141 #ifdef RFLU
142  pregion => region
143 
144  CALL rflu_convertcvprim2cons(pregion,cv_mixt_state_cons)
145 
146 #ifdef SPEC
147 ! ==============================================================================
148 ! Species
149 ! ==============================================================================
150 
151  IF ( global%specUsed .EQV. .true. ) THEN
152  IF ( pregion%specInput%sourceFlag .EQV. .true. ) THEN
153 
154 ! ------------------------------------------------------------------------------
155 ! Cavitation source term for gas-liquid-vapor mixture model
156 ! ------------------------------------------------------------------------------
157 
158  IF ( pregion%mixtInput%gasModel == gas_model_mixt_gasliq ) THEN
159  CALL spec_rflu_sourceterms_gl(pregion)
160  END IF ! pRegion%mixtInput%gasModel
161 
162 ! ------------------------------------------------------------------------------
163 ! Combustion source term for burning-crack simulations
164 ! ------------------------------------------------------------------------------
165 
166 ! TEMPORARY - At present, do not use operator-split integration of chemistry
167 ! source terms based on modifications by Luca. This means that no
168 ! longer call source term integration function directly in
169 ! RFLU_TimeStepping.F90.
170 ! CALL SPEC_RFLU_IntegrateChemSrcTerm(pRegion,0)
171 ! END TEMPORARY
172  END IF ! pRegion%specInput%sourceFlag
173  END IF ! global%specUsed
174 #endif
175 #endif
176 
177 ! finalize
178 
179  CALL deregisterfunction( global )
180 
181 END SUBROUTINE sourcetermsmp
182 
183 ! ******************************************************************************
184 !
185 ! RCS Revision history:
186 !
187 ! $Log: SourceTermsMP.F90,v $
188 ! Revision 1.8 2008/12/06 08:44:10 mtcampbe
189 ! Updated license.
190 !
191 ! Revision 1.7 2008/11/19 22:17:23 mtcampbe
192 ! Added Illinois Open Source License/Copyright
193 !
194 ! Revision 1.6 2006/03/30 20:47:22 haselbac
195 ! Clean-up of source terms for species
196 !
197 ! Revision 1.5 2006/03/26 20:21:22 haselbac
198 ! Added call to GL src term routine
199 !
200 ! Revision 1.4 2005/11/30 22:05:25 fnajjar
201 ! Added call to PLAG_RFLU_CorrectMixtProperties
202 !
203 ! Revision 1.3 2005/10/05 13:48:57 haselbac
204 ! Bug fix: Enclosed call to chem src term within IF
205 !
206 ! Revision 1.2 2005/06/06 14:23:03 haselbac
207 ! Adapted to Lucas changes
208 !
209 ! Revision 1.1 2004/12/01 16:51:28 haselbac
210 ! Initial revision after changing case
211 !
212 ! Revision 1.15 2004/05/03 15:09:41 jferry
213 ! added equilibrium Eulerian capability for smoke
214 !
215 ! Revision 1.14 2004/03/05 22:09:00 jferry
216 ! created global variables for peul, plag, and inrt use
217 !
218 ! Revision 1.13 2004/03/02 21:49:21 jferry
219 ! Added inrtUsed flag to mixture data structure
220 !
221 ! Revision 1.12 2004/01/31 03:56:19 haselbac
222 ! Added RFLU state vector conversion routines
223 !
224 ! Revision 1.11 2003/11/20 16:40:35 mdbrandy
225 ! Backing out RocfluidMP changes from 11-17-03
226 !
227 ! Revision 1.8 2003/10/03 20:13:02 wasistho
228 ! initial installation of turbModel SA and DES
229 !
230 ! Revision 1.7 2003/10/01 23:52:09 jblazek
231 ! Corrected bug in moving noslip wall BC and grid speeds.
232 !
233 ! Revision 1.6 2003/09/26 21:45:34 fnajjar
234 ! Modified ModInterfaces calls to proper physical modules
235 !
236 ! Revision 1.5 2003/08/28 20:33:00 wasistho
237 ! excluced ModInterfacesTurbulence,Radiation,Periodic from ModInterfaces
238 !
239 ! Revision 1.4 2003/07/17 00:55:20 wasistho
240 ! initial activation rocrad
241 !
242 ! Revision 1.3 2003/05/15 02:57:02 jblazek
243 ! Inlined index function.
244 !
245 ! Revision 1.2 2003/04/05 01:59:33 wasistho
246 ! install ROCPERI
247 !
248 ! Revision 1.1 2003/03/28 19:47:43 fnajjar
249 ! Initial import for RocfluidMP
250 !
251 ! ******************************************************************************
252 
253 
254 
255 
256 
257 
258 
subroutine plag_rflu_correctmixtproperties(pRegion)
subroutine radi_sourceterms(region)
subroutine peri_sourceterms(region)
subroutine spec_rflu_sourceterms_gl(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine sourcetermsmp(region)
subroutine, public rflu_convertcvcons2prim(pRegion, cvStateFuture)
subroutine, public rflu_convertcvprim2cons(pRegion, cvStateFuture)
subroutine inrt_sourceterms(region)
subroutine turb_ranssourceterms(region)
subroutine, public spec_rflu_integratechemsrcterm(pRegion, CALLFLAG)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine sourceterms(region)
Definition: SourceTerms.F90:44
subroutine peul_sourceterms(region)