Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_RansRkInit.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 initial solution field to turbulence transport equations,
26 ! if any (selected model is of RaNS class), for first RK stage.
27 !
28 ! Description: none.
29 !
30 ! Input: region = data of current region,
31 ! iStage = current RK stage.
32 !
33 ! Output: region%levels%turb = new solution after one time step.
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: TURB_RansRkInit.F90,v 1.6 2008/12/06 08:44:42 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2003 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE turb_ransrkinit( region, istage )
46 
47  USE moddatatypes
48  USE moddatastruct, ONLY : t_region
49  USE modglobal, ONLY : t_global
50  USE moderror
51  USE modmpi
52  USE modparameters
54 #ifdef RFLO
56 
57 #include "Indexing.h"
58 #endif
59 
60  IMPLICIT NONE
61 
62 ! ... parameters
63  TYPE(t_region) :: region
64 
65  INTEGER, INTENT(IN) :: istage
66 
67 ! ... loop variables
68  INTEGER :: ic, idx
69 
70 ! ... local variables
71  TYPE(t_global), POINTER :: global
72 
73  INTEGER :: ibc, iec, idxbeg, idxend
74  REAL(RFREAL), POINTER :: tcv(:,:), tcvold(:,:), tdiss(:,:)
75 
76 #ifdef RFLO
77  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
78  INTEGER :: ilev, icoff, ijcoff
79 #endif
80 
81 !******************************************************************************
82 
83  global => region%global
84 
85  CALL registerfunction( global,'TURB_RansRkInit',&
86  'TURB_RansRkInit.F90' )
87 
88  IF (region%turbInput%modelClass /= model_rans) goto 999
89 
90 ! get dimensions and pointers -------------------------------------------------
91 
92 #ifdef RFLO
93  ilev = region%currLevel
94 
95  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
96  jdcbeg,jdcend,kdcbeg,kdcend )
97  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
98  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icoff,ijcoff)
99  iec = indijk(idcend,jdcend,kdcend,icoff,ijcoff)
100 
101  tcv => region%levels(ilev)%turb%cv
102  tcvold => region%levels(ilev)%turb%cvOld
103  tdiss => region%levels(ilev)%turb%diss
104 #endif
105 
106 #ifdef RFLU
107  ibc = 1
108  iec = region%grid%nCellsTot
109 
110  tcv => region%turb%cv
111  tcvold => region%turb%cvOld
112  tdiss => region%turb%diss
113 #endif
114 
115 ! select start and end index of 1st dimension depending on RaNS model selected
116 
117  IF ((region%mixtInput%turbModel == turb_model_sa) .OR. &
118  (region%mixtInput%turbModel == turb_model_dessa) .OR. &
119  (region%mixtInput%turbModel == turb_model_hdessa)) THEN
120  idxbeg = cv_sa_nutil
121  idxend = cv_sa_nutil
122  ENDIF
123 
124 ! store previous solution; set dissipation to zero ----------------------------
125 
126  IF (istage == 1) THEN
127  DO ic=ibc,iec
128  DO idx=idxbeg, idxend
129  tcvold(idx,ic) = tcv(idx,ic)
130  tdiss(idx,ic) = 0._rfreal
131  ENDDO
132  ENDDO
133  ELSE
134  DO ic=ibc,iec
135  DO idx=idxbeg, idxend
136  tdiss(idx,ic) = 0._rfreal
137  ENDDO
138  ENDDO
139  ENDIF ! iStage
140 
141 ! finalize --------------------------------------------------------------------
142 
143 999 CONTINUE
144 
145  CALL deregisterfunction( global )
146 
147 END SUBROUTINE turb_ransrkinit
148 
149 !******************************************************************************
150 !
151 ! RCS Revision history:
152 !
153 ! $Log: TURB_RansRkInit.F90,v $
154 ! Revision 1.6 2008/12/06 08:44:42 mtcampbe
155 ! Updated license.
156 !
157 ! Revision 1.5 2008/11/19 22:17:54 mtcampbe
158 ! Added Illinois Open Source License/Copyright
159 !
160 ! Revision 1.4 2005/03/09 06:35:47 wasistho
161 ! incorporated HDESSA
162 !
163 ! Revision 1.3 2004/07/03 02:07:35 wasistho
164 ! delete ! public
165 !
166 ! Revision 1.2 2004/03/20 00:29:17 wasistho
167 ! set turb_rflo_ransNumericalDiss to turb_ransNumerical..
168 !
169 ! Revision 1.1 2004/03/05 04:37:00 wasistho
170 ! changed nomenclature
171 !
172 ! Revision 1.1 2003/10/07 02:17:03 wasistho
173 ! initial installation of RaNS-SA and DES
174 !
175 !
176 !******************************************************************************
177 
178 
179 
180 
181 
182 
183 
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idcend
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ic
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idcbeg
subroutine turb_ransrkinit(region, istage)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdcend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdcbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469