Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_SolutionUpdate.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: update solution/quantities pertinent to turbulence if desired
26 !
27 ! Description: Depending user input parameters, different quantities are
28 ! updated, such as vorticity components.
29 !
30 ! Input: region = data of current region
31 !
32 ! Output: specified TURB variables updated
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: TURB_SolutionUpdate.F90,v 1.7 2009/08/26 12:28:53 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE turb_solutionupdate( region,istage,ibc,iec ) ! PUBLIC
45 
46  USE moddatatypes
47  USE modglobal, ONLY : t_global
48  USE moddatastruct, ONLY : t_region
49  USE modturbulence, ONLY : t_turb
50  USE modinterfaces, ONLY : rkupdategeneric
52  USE moderror
53  USE modparameters
55  IMPLICIT NONE
56 
57 ! ... parameters
58 #ifdef RFLO
59  TYPE(t_region) :: region
60 #endif
61 #ifdef RFLU
62  TYPE(t_region), TARGET :: region
63 #endif
64  INTEGER :: istage, ibc, iec
65 
66 ! ... local variables
67  TYPE(t_global), POINTER :: global
68  TYPE(t_turb), POINTER :: turb
69  INTEGER :: ilev, ncv
70  LOGICAL :: compvort
71 
72 !******************************************************************************
73 
74  global => region%global
75  CALL registerfunction( global,'TURB_SolutionUpdate',&
76  'TURB_SolutionUpdate.F90' )
77 
78 ! get pointers and parameters
79 
80  ncv = region%turbInput%nCv
81 #ifdef RFLO
82  ilev = region%currLevel
83  turb => region%levels(ilev)%turb
84 #endif
85 #ifdef RFLU
86  turb => region%turb
87 #endif
88 
89 ! update RaNS or DES solution -------------------------------------------------
90 
91  IF (region%turbInput%modelClass == model_rans) THEN
92  IF (global%flowType == flow_unsteady .AND. &
93  global%solverType == solv_explicit) THEN
94  CALL rkupdategeneric( region,var_type_cell,istage,ibc,iec,1,ncv, &
95  turb%cv,turb%cvOld,turb%rhs,turb%rhsSum )
96  ELSE
97  CALL turb_ransemsupdate( region )
98  ENDIF
99  ENDIF
100 
101 ! update vorticities as post processing for LES -------------------------------
102 
103  IF (region%turbInput%modelClass == model_les) THEN
104 
105  compvort = .false.
106 
107  IF (region%turbInput%calcVort == calcvort_fdt .AND. &
108  region%irkStep == global%nrkSteps) THEN
109  compvort = .true.
110  ENDIF
111  IF (region%turbInput%calcVort == calcvort_sdt .AND. &
112  region%irkStep == global%nrkSteps .AND. &
113  (global%currentTime+global%dtMin) >= global%dTimeSystem) THEN
114  compvort = .true.
115  ENDIF
116 
117  IF (compvort .eqv. .true.) CALL turb_calcvortic( region )
118  ENDIF
119 
120 ! finalize -------------------------------------------------------------------
121 
122  CALL deregisterfunction( global )
123 
124 END SUBROUTINE turb_solutionupdate
125 
126 !******************************************************************************
127 !
128 ! RCS Revision history:
129 !
130 ! $Log: TURB_SolutionUpdate.F90,v $
131 ! Revision 1.7 2009/08/26 12:28:53 mtcampbe
132 ! Ported to Hera. Fixed logical expression syntax errors. Replaced all
133 ! IF (logical_variable) with IF (logical_variable .eqv. .true.) as
134 ! consistent with the specification. Also changed: IF( ASSOCIATED(expr) )
135 ! to IF ( ASSOCIATED(expr) .eqv. .true. ). Intel compilers produce code
136 ! which silently fails for some mal-formed expressions, so these changes
137 ! are a net which should ensure that they are evaluated as intended.
138 !
139 ! Revision 1.6 2008/12/06 08:44:42 mtcampbe
140 ! Updated license.
141 !
142 ! Revision 1.5 2008/11/19 22:17:54 mtcampbe
143 ! Added Illinois Open Source License/Copyright
144 !
145 ! Revision 1.4 2004/12/04 06:08:42 wasistho
146 ! removed unsteady restriction for vort.calculation
147 !
148 ! Revision 1.3 2004/11/30 23:57:10 wasistho
149 ! bugfix, split rflo/rflu for turb pointer
150 !
151 ! Revision 1.2 2004/11/17 23:44:08 wasistho
152 ! used generic RK-update for rocturb
153 !
154 ! Revision 1.1 2004/03/05 04:37:00 wasistho
155 ! changed nomenclature
156 !
157 ! Revision 1.5 2004/01/21 03:52:32 wasistho
158 ! modify due to newly unsteady explicit and implicit (dual t-s) option
159 !
160 ! Revision 1.4 2003/10/16 20:17:22 wasistho
161 ! installed RaNS in steady state flow (Exp.Mult.Stg)
162 !
163 ! Revision 1.3 2003/10/07 02:07:20 wasistho
164 ! initial installation of RaNS-SA and DES
165 !
166 ! Revision 1.2 2003/08/14 01:47:35 wasistho
167 ! added vorticity call per system timestep
168 !
169 ! Revision 1.1 2003/08/06 15:58:41 wasistho
170 ! added vorticities computation
171 !
172 !
173 !
174 !******************************************************************************
175 
176 
177 
178 
179 
180 
181 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rkupdategeneric(region, varType, iStage, icBeg, icEnd, ivBeg, ivEnd, cv, cvOld, rhs, rhsSum)
subroutine turb_ransemsupdate(region)
subroutine turb_solutionupdate(region, istage, ibc, iec)
subroutine turb_calcvortic(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469