Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_floLesUniFiltFFI.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: Perform face to face uniform filtering in I-direction.
26 !
27 ! Description: The filtering is performed using fixed filter coefficients.
28 ! If filterwidth is zero in this direction the cell-variable is
29 ! simply copied to the filtered cell-variable.
30 !
31 ! Input: global = global data, only used in register function
32 ! i,j,kbeg, i,j,kend = node index boundaries
33 ! iNOff, ijNOff = node Offset
34 ! nDel = three components filter width parameter
35 ! idBeg = begin variable index to be filtered
36 ! idEnd = end variable index to be filtered
37 ! fact1,2 = fixed filter coefficients for uniform grid
38 ! fVar = face variable to be filtered
39 !
40 ! Output: filtVar = filtered face variable
41 !
42 ! Notes: Mother routine = LesUniFiltFF.
43 !
44 !******************************************************************************
45 !
46 ! $Id: TURB_floLesUniFiltFFI.F90,v 1.4 2008/12/06 08:44:44 mtcampbe Exp $
47 !
48 ! Copyright: (c) 2001 by the University of Illinois
49 !
50 !******************************************************************************
51 
52 SUBROUTINE turb_flolesunifiltffi( global,ibeg,iend,jbeg,jend,kbeg,kend,iNOff, &
53  ijnoff,ndel,idbeg,idend,fact1,fact2,fvar, &
54  filtvar )
55  USE moddatatypes
56  USE modglobal, ONLY : t_global
57  USE modturbulence
58  USE moderror
60  IMPLICIT NONE
61 
62 #include "Indexing.h"
63 
64 ! ... parameters
65  TYPE(t_global), POINTER :: global
66  INTEGER :: ibeg,iend,jbeg,jend,kbeg,kend,inoff,ijnoff
67  INTEGER :: ndel(diri:dirk),idbeg,idend
68  REAL(RFREAL) :: fact1(filwidth_four),fact2(filwidth_four)
69  REAL(RFREAL), POINTER :: fvar(:,:),filtvar(:,:)
70 
71 ! ... loop variables
72  INTEGER :: i, j, k, l, ijkn, ijknb, ijkne
73 
74 ! ... local variables
75  CHARACTER(CHRLEN) :: rcsidentstring
76  REAL(RFREAL) :: tmpb(idbeg:idend),tmpe(idbeg:idend)
77 
78 !******************************************************************************
79 
80  rcsidentstring = '$RCSfile: TURB_floLesUniFiltFFI.F90,v $'
81 
82  CALL registerfunction( global,'TURB_FloLesUniFiltFFI',&
83  'TURB_floLesUniFiltFFI.F90' )
84 
85 ! integration over I-direction -----------------------------------------------
86 
87  IF (ndel(diri)==filwidth_zero) THEN
88 
89 ! - no filtering in I-direction is needed and we copy fVar into filtVar
90 
91  filtvar = fvar
92 
93  ELSEIF ((ndel(diri)==filwidth_one) .OR. &
94  (ndel(diri)==filwidth_two)) THEN
95 
96  DO k=kbeg,kend
97  DO j=jbeg,jend
98 
99 ! ----- perform integration
100 
101  DO i=ibeg,iend
102  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
103  DO l=idbeg,idend
104  filtvar(l,ijkn)=fact1(ndel(diri))*(fvar(l,ijkn-1)+fvar(l,ijkn+1))+ &
105  fact2(ndel(diri))*fvar(l,ijkn)
106  END DO ! l
107  ENDDO ! i
108 
109  ENDDO ! j
110  ENDDO ! k
111 
112  ELSEIF (ndel(diri)==filwidth_four) THEN
113 
114  DO k=kbeg,kend
115  DO j=jbeg,jend
116 
117 ! ----- perform integration
118 
119  DO i=ibeg+1,iend-1
120  ijkn = indijk(i ,j ,k ,inoff,ijnoff)
121  DO l=idbeg,idend
122  filtvar(l,ijkn)=fact1(ndel(diri))*(fvar(l,ijkn-2)+fvar(l,ijkn+2))+ &
123  fact2(ndel(diri))*(fvar(l,ijkn+1)+fvar(l,ijkn)+ &
124  fvar(l,ijkn-1))
125  ENDDO ! l
126  ENDDO ! i
127 
128 ! ----- perform integration at the edges
129 
130  ijknb = indijk(ibeg ,j ,k ,inoff,ijnoff)
131  ijkne = indijk(iend ,j ,k ,inoff,ijnoff)
132  DO l=idbeg,idend
133  tmpb(l) = 2._rfreal*fvar(l,ijknb-1)-fvar(l,ijknb)
134  tmpe(l) = 2._rfreal*fvar(l,ijkne+1)-fvar(l,ijkne)
135  filtvar(l,ijknb)=fact1(ndel(diri))*(tmpb(l)+fvar(l,ijknb+2))+ &
136  fact2(ndel(diri))*(fvar(l,ijknb+1)+fvar(l,ijknb)+ &
137  fvar(l,ijknb-1))
138  filtvar(l,ijkne)=fact1(ndel(diri))*(tmpe(l)+fvar(l,ijkne-2))+ &
139  fact2(ndel(diri))*(fvar(l,ijkne+1)+fvar(l,ijkne)+ &
140  fvar(l,ijkne-1))
141  ENDDO ! l
142  ENDDO ! j
143  ENDDO ! k
144  ENDIF ! nDel
145 
146 ! finalize --------------------------------------------------------------------
147 
148  CALL deregisterfunction( global )
149 
150 END SUBROUTINE turb_flolesunifiltffi
151 
152 !******************************************************************************
153 !
154 ! RCS Revision history:
155 !
156 ! $Log: TURB_floLesUniFiltFFI.F90,v $
157 ! Revision 1.4 2008/12/06 08:44:44 mtcampbe
158 ! Updated license.
159 !
160 ! Revision 1.3 2008/11/19 22:17:56 mtcampbe
161 ! Added Illinois Open Source License/Copyright
162 !
163 ! Revision 1.2 2004/03/12 02:55:36 wasistho
164 ! changed rocturb routine names
165 !
166 ! Revision 1.1 2004/03/08 23:35:45 wasistho
167 ! changed turb nomenclature
168 !
169 ! Revision 1.2 2003/05/15 02:57:06 jblazek
170 ! Inlined index function.
171 !
172 ! Revision 1.1 2002/10/14 23:55:30 wasistho
173 ! Install Rocturb
174 !
175 !******************************************************************************
176 
177 
178 
179 
180 
181 
182 
**********************************************************************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 ibeg
j indices k indices k
Definition: Indexing.h:6
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 knode iend
blockLoc i
Definition: read.cpp:79
subroutine turb_flolesunifiltffi(global, ibeg, iend, jbeg, jend, kbeg, kend, iNOff, ijNOff, nDel, idBeg, idEnd, fact1, fact2, fVar, filtVar)
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 knode jend
**********************************************************************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 knode jbeg
**********************************************************************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 knode kbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469