Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZeroDummyCellsMP.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: set dummycells to zero.
26 !
27 ! Description: none.
28 !
29 ! Input: region = data of current region.
30 !
31 ! Output: regions%levels%mixt%rhs = residual in dummy cells.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: ZeroDummyCellsMP.F90,v 1.5 2008/12/06 08:44:11 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003-2005 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE zerodummycellsmp( region )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE moderror
49  USE modparameters
50 #ifdef RFLO
52 #endif
53 #ifdef RFLU
55 #endif
56 #ifdef TURB
59 #endif
60 
61  IMPLICIT NONE
62 
63 ! ... parameters
64  TYPE(t_region), TARGET :: region
65 
66 ! ... local variables
67 #ifdef RFLO
68  INTEGER :: ilev
69 #endif
70  LOGICAL :: peulused,specused
71 
72  REAL(RFREAL), POINTER :: rhs(:,:), rhspeul(:,:)
73 
74  TYPE(t_global), POINTER :: global
75 #ifdef RFLU
76  TYPE(t_region), POINTER :: pregion
77 #endif
78 
79 !******************************************************************************
80 
81  global => region%global
82 
83  CALL registerfunction( global,'ZeroDummyCellsMP',&
84  'ZeroDummyCellsMP.F90' )
85 
86 ! get dimensions and pointers =================================================
87 
88  peulused = global%peulUsed
89  specused = global%specUsed
90 
91 #ifdef RFLO
92  ilev = region%currLevel
93  rhs => region%levels(ilev)%mixt%rhs
94 #ifdef PEUL
95  rhspeul => region%levels(ilev)%peul%rhs
96 #endif
97 #endif
98 
99 #ifdef RFLU
100  pregion => region
101 #endif
102 
103 ! zero out residuals in dummy cells -------------------------------------------
104 
105 #ifdef RFLO
106  CALL rflo_zerodummycells( region,rhs )
107 #ifdef PEUL
108  IF (peulused) CALL rflo_zerodummycells( region,rhspeul )
109 #endif
110 #ifdef TURB
111  IF (region%mixtInput%flowModel == flow_navst .AND. &
112  region%mixtInput%turbModel /= turb_model_none .AND. &
113  region%turbInput%modelClass == model_rans) THEN
114  CALL turb_ranszerodummycells( region )
115  ENDIF
116 #endif
117 #endif
118 
119 #ifdef RFLU
120  CALL rflu_zerovirtualcellvars(pregion,pregion%mixt%rhs)
121 #ifdef SPEC
122  IF ( specused .EQV. .true. ) THEN
123  CALL rflu_zerovirtualcellvars(pregion,pregion%spec%rhs)
124  END IF ! specUsed
125 #endif
126 #ifdef TURB
127  IF ( pregion%mixtInput%flowModel == flow_navst .AND. &
128  pregion%mixtInput%turbModel /= turb_model_none .AND. &
129  pregion%turbInput%modelClass == model_rans) THEN
130  CALL rflu_zerovirtualcellvars(pregion,pregion%turb%rhs)
131  END IF ! pRegion%mixtInput%flowModel
132 #endif
133 #endif
134 
135 ! finalize ====================================================================
136 
137  CALL deregisterfunction( global )
138 
139 END SUBROUTINE zerodummycellsmp
140 
141 !******************************************************************************
142 !
143 ! RCS Revision history:
144 !
145 ! $Log: ZeroDummyCellsMP.F90,v $
146 ! Revision 1.5 2008/12/06 08:44:11 mtcampbe
147 ! Updated license.
148 !
149 ! Revision 1.4 2008/11/19 22:17:24 mtcampbe
150 ! Added Illinois Open Source License/Copyright
151 !
152 ! Revision 1.3 2006/01/12 02:38:30 wasistho
153 ! added modelClass condition in turb
154 !
155 ! Revision 1.2 2005/05/16 20:40:32 haselbac
156 ! Renamed RFLU_ZeroDummyCells, now use pRegion
157 !
158 ! Revision 1.1 2004/12/01 16:52:32 haselbac
159 ! Initial revision after changing case
160 !
161 ! Revision 1.14 2004/07/28 15:29:18 jferry
162 ! created global variable for spec use
163 !
164 ! Revision 1.13 2004/03/19 02:40:15 wasistho
165 ! renamed TURB_RFLO_RansZeroDummyCells to TURB_RansZeroDummyCells
166 !
167 ! Revision 1.12 2004/03/11 03:33:06 wasistho
168 ! changed rocturb nomenclature
169 !
170 ! Revision 1.11 2004/03/05 22:09:00 jferry
171 ! created global variables for peul, plag, and inrt use
172 !
173 ! Revision 1.10 2004/03/02 21:50:44 jferry
174 ! Corrected typo
175 !
176 ! Revision 1.9 2003/11/25 21:01:46 haselbac
177 ! Added support for rocspecies, changed TURB call
178 !
179 ! Revision 1.8 2003/11/20 16:40:36 mdbrandy
180 ! Backing out RocfluidMP changes from 11-17-03
181 !
182 ! Revision 1.5 2003/10/16 20:14:10 wasistho
183 ! turbulence zero dummy cells computed through one routine
184 !
185 ! Revision 1.4 2003/10/03 20:13:21 wasistho
186 ! initial installation of turbModel SA and DES
187 !
188 ! Revision 1.3 2003/10/01 23:52:10 jblazek
189 ! Corrected bug in moving noslip wall BC and grid speeds.
190 !
191 ! Revision 1.2 2003/05/15 02:57:02 jblazek
192 ! Inlined index function.
193 !
194 ! Revision 1.1 2003/03/28 19:48:44 fnajjar
195 ! Initial import for RocfluidMP
196 !
197 !******************************************************************************
198 
199 
200 
201 
202 
203 
204 
subroutine turb_ranszerodummycells(region)
NT rhs
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflu_zerovirtualcellvars(pRegion, var)
subroutine rflo_zerodummycells(region, var)
subroutine zerodummycellsmp(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469