Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floFaceWidthDummyPhys.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: Extrapolate face widths from the interior domain or at the patch
26 ! to the dummy points at physical and symmetry boundaries.
27 !
28 ! Description: The face widths at dummy faces are obtained by
29 ! mirroring from the interior faces.
30 !
31 ! Input: region = current region data
32 ! lbound = patch boundary ID
33 ! i,j,kdir = direction identifier
34 ! i,j,kndBeg = i,j,k begin index
35 ! i,j,kndEnd = i,j,k end index
36 !
37 ! Output: Face widths workI, workJ, workK at dummy faces.
38 !
39 ! Notes: Mother routine = TURB_FloFaceWidth.
40 !
41 !******************************************************************************
42 !
43 ! $Id: TURB_floFaceWidthDummyPhys.F90,v 1.5 2008/12/06 08:44:43 mtcampbe Exp $
44 !
45 ! Copyright: (c) 2001 by the University of Illinois
46 !
47 !******************************************************************************
48 
49 SUBROUTINE turb_flofacewidthdummyphys( region,lbound,idir,jdir,kdir, &
50  indbeg,indend,jndbeg,jndend,kndbeg,kndend )
51 
52  USE moddatatypes
53  USE moddatastruct, ONLY : t_region
54  USE modglobal, ONLY : t_global
56  USE moderror
57  USE modparameters
58  IMPLICIT NONE
59 
60 #include "Indexing.h"
61 
62 ! ... parameters
63  TYPE(t_region) :: region
64  INTEGER :: lbound, idir, jdir, kdir
65  INTEGER :: indbeg, indend, jndbeg, jndend, kndbeg, kndend
66 
67 ! ... loop variables
68  INTEGER :: i, j, k, idum, jdum, kdum
69 
70 ! ... local variables
71  CHARACTER(CHRLEN) :: rcsidentstring
72  TYPE(t_global), POINTER :: global
73 
74  INTEGER :: ilev, inoff, ijnoff
75  INTEGER :: ijknb, ijkni, ijknj, ijknk, ijknd
76  INTEGER :: ig(3), jg(3), kg(3), ir(3), jr(3), kr(3)
77  INTEGER :: idumb(3), jdumb(3), kdumb(3), idume(3), jdume(3), kdume(3)
78 
79 !******************************************************************************
80 
81  rcsidentstring = '$RCSfile: TURB_floFaceWidthDummyPhys.F90,v $'
82 
83  global => region%global
84  CALL registerfunction( global,'TURB_FloFaceWidthDummyPhys',&
85  'TURB_floFaceWidthDummyPhys.F90' )
86 
87 ! get dimensions and pointers -------------------------------------------------
88 
89  ilev = region%currLevel
90  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
91 
92  IF (lbound==1 .OR. lbound==3 .OR. lbound==5) THEN
93  idumb(:) = -idir*region%nDumCells
94  jdumb(:) = -jdir*region%nDumCells
95  kdumb(:) = -kdir*region%nDumCells
96  idume(:) = -idir
97  jdume(:) = -jdir
98  kdume(:) = -kdir
99  ELSE
100  idumb(:) = 0
101  jdumb(:) = 0
102  kdumb(:) = 0
103  idume(:) = -idir*region%nDumCells
104  jdume(:) = -jdir*region%nDumCells
105  kdume(:) = -kdir*region%nDumCells
106  ENDIF
107 
108  ig(:)=-abs(idir); jg(:)=-abs(jdir); kg(:)=-abs(kdir)
109  IF (lbound == 1) THEN
110  ig(1)=0
111  ELSE IF (lbound == 3) THEN
112  jg(2)=0
113  ELSE IF (lbound == 5) THEN
114  kg(3)=0
115  ELSE IF (lbound == 2) THEN
116  ig(1)=0
117  idumb(1) = idumb(1)-idir
118  ELSE IF (lbound == 4) THEN
119  jg(2)=0
120  jdumb(2) = jdumb(2)-jdir
121  ELSE IF (lbound == 6) THEN
122  kg(3)=0
123  kdumb(3) = kdumb(3)-kdir
124  ENDIF
125 
126 ! specify facewidths at dummy faces by mirroring
127 ! 2D loop over patch nodes
128 
129  DO k=kndbeg,kndend
130  DO j=jndbeg,jndend
131  DO i=indbeg,indend
132 
133 ! ----- 1D loop in direction normal to patch to define dummy face values
134 
135  DO idum=idumb(1),idume(1)
136  DO jdum=jdumb(1),jdume(1)
137  DO kdum=kdumb(1),kdume(1)
138  ijknd = indijk(i+idum,j+jdum,k+kdum,inoff,ijnoff) ! dummy points
139  ijkni = indijk(i+ig(1)-idum,j+jg(1)-jdum,k+kg(1)-kdum,inoff,ijnoff) ! interior
140  region%levels(ilev)%turb%workI(1,ijknd) = &
141  region%levels(ilev)%turb%workI(1,ijkni)
142  region%levels(ilev)%turb%workI(2,ijknd) = &
143  region%levels(ilev)%turb%workI(2,ijkni)
144  ENDDO
145  ENDDO
146  ENDDO
147 
148  DO idum=idumb(2),idume(2)
149  DO jdum=jdumb(2),jdume(2)
150  DO kdum=kdumb(2),kdume(2)
151  ijknd = indijk(i+idum,j+jdum,k+kdum,inoff,ijnoff) ! dummy points
152  ijknj = indijk(i+ig(2)-idum,j+jg(2)-jdum,k+kg(2)-kdum,inoff,ijnoff) ! interior
153  region%levels(ilev)%turb%workJ(1,ijknd) = &
154  region%levels(ilev)%turb%workJ(1,ijknj)
155  region%levels(ilev)%turb%workJ(2,ijknd) = &
156  region%levels(ilev)%turb%workJ(2,ijknj)
157  ENDDO
158  ENDDO
159  ENDDO
160 
161  DO idum=idumb(3),idume(3)
162  DO jdum=jdumb(3),jdume(3)
163  DO kdum=kdumb(3),kdume(3)
164  ijknd = indijk(i+idum,j+jdum,k+kdum,inoff,ijnoff) ! dummy points
165  ijknk = indijk(i+ig(3)-idum,j+jg(3)-jdum,k+kg(3)-kdum,inoff,ijnoff) ! interior
166  region%levels(ilev)%turb%workK(1,ijknd) = &
167  region%levels(ilev)%turb%workK(1,ijknk)
168  region%levels(ilev)%turb%workK(2,ijknd) = &
169  region%levels(ilev)%turb%workK(2,ijknk)
170  ENDDO
171  ENDDO
172  ENDDO
173 
174  ENDDO ! i
175  ENDDO ! j
176  ENDDO ! k
177 
178 ! finalize --------------------------------------------------------------------
179 
180  CALL deregisterfunction( global )
181 
182 END SUBROUTINE turb_flofacewidthdummyphys
183 
184 !******************************************************************************
185 !
186 ! RCS Revision history:
187 !
188 ! $Log: TURB_floFaceWidthDummyPhys.F90,v $
189 ! Revision 1.5 2008/12/06 08:44:43 mtcampbe
190 ! Updated license.
191 !
192 ! Revision 1.4 2008/11/19 22:17:55 mtcampbe
193 ! Added Illinois Open Source License/Copyright
194 !
195 ! Revision 1.3 2004/08/04 02:49:46 wasistho
196 ! removed turb%avgCoI,J,K as it is defined as grid%c2fCoI,J,K
197 !
198 ! Revision 1.2 2004/03/12 02:55:35 wasistho
199 ! changed rocturb routine names
200 !
201 ! Revision 1.1 2004/03/08 23:35:45 wasistho
202 ! changed turb nomenclature
203 !
204 ! Revision 1.2 2003/05/15 02:57:06 jblazek
205 ! Inlined index function.
206 !
207 ! Revision 1.1 2002/10/14 23:55:29 wasistho
208 ! Install Rocturb
209 !
210 !******************************************************************************
211 
212 
213 
214 
215 
216 
217 
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************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 jdir
blockLoc i
Definition: read.cpp:79
**********************************************************************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 idir
j indices j
Definition: Indexing.h:6
**********************************************************************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 kdir
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine turb_flofacewidthdummyphys(region, lbound, idir, jdir, kdir, indBeg, indEnd, jndBeg, jndEnd, kndBeg, kndEnd)