64 TYPE(t_region
) :: region
67 INTEGER :: ipatch, ipcls
70 CHARACTER(CHRLEN) :: rcsidentstring
72 INTEGER :: bctype, ilev, lbound, npatches, npcls
73 INTEGER :: inoff, ijnoff, ijknpatch
78 INTEGER,
POINTER,
DIMENSION(:,:) :: paiv
80 LOGICAL :: lboundskip(6)
82 REAL(RFREAL) :: dpgrid, dpgridold, dpmome, dpmomeold, dfac, sgn
83 REAL(RFREAL) :: dpmomerhssum,dpposrhssum
84 REAL(RFREAL),
DIMENSION(3) :: diffpos, facecentroid, momeplag, posplag, sface
85 REAL(RFREAL),
DIMENSION(3) :: diffposold, momeplagold, posplagold
86 REAL(RFREAL),
DIMENSION(3) :: momerhssumplag, posrhssumplag
87 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: pcv, pcvold, prhssum, psi, psj, psk
88 REAL(RFREAL),
POINTER,
DIMENSION(:,:,:) :: pfc
90 TYPE(t_patch),
POINTER :: ppatch
91 TYPE(t_plag),
POINTER :: pplag
96 rcsidentstring =
'$RCSfile: PLAG_WallBounce.F90,v $ $Revision: 1.3 $'
98 global => region%global
101 'PLAG_WallBounce.F90' )
105 ilev = region%currLevel
106 npcls = region%levels(ilev)%plag%nPcls
108 IF (npcls == 0) goto 999
110 npatches = region%nPatches
118 pplag => region%levels(ilev)%plag
121 pcvold => pplag%cvOld
122 prhssum => pplag%rhsSum
134 icplag = paiv(aiv_plag_indexi,ipcls)
135 jcplag = paiv(aiv_plag_indexj,ipcls)
136 kcplag = paiv(aiv_plag_indexk,ipcls)
142 kpcbeg < kcplag .AND. kcplag < kpcend ) cycle
144 posplag(1:3) = pcv(cv_plag_xpos:cv_plag_zpos,ipcls)
148 lboundskip(1:6) = .true.
150 IF (icplag <=
ipcbeg) lboundskip(1) = .false.
151 IF (icplag >=
ipcend) lboundskip(2) = .false.
153 IF (jcplag <=
jpcbeg) lboundskip(3) = .false.
154 IF (jcplag >=
jpcend) lboundskip(4) = .false.
156 IF (kcplag <=
kpcbeg) lboundskip(5) = .false.
157 IF (kcplag >= kpcend) lboundskip(6) = .false.
163 ppatch => region%levels(ilev)%patches(ipatch)
164 lbound = ppatch%lbound
165 IF (lboundskip(lbound)) cycle
167 bctype = ppatch%bcType
171 IF ((bctype>=bc_slipwall .AND. bctype<=bc_slipwall +bc_range) .OR. &
172 (bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range) .OR. &
173 (bctype>=bc_injection .AND. bctype<=bc_injection +bc_range) .OR. &
174 (bctype>=bc_symmetry .AND. bctype<=bc_symmetry +bc_range))
THEN
181 IF (
ibeg <= icplag .AND. icplag <=
iend .AND. &
182 jbeg <= jcplag .AND. jcplag <=
jend .AND. &
183 kbeg <= kcplag .AND. kcplag <= kend )
THEN
187 IF (lbound==1 .OR. lbound==3 .OR. lbound==5)
THEN
189 ijknpatch = indijk(icplag,jcplag,kcplag,inoff,ijnoff)
193 ijknpatch = indijk(icplag-
idir,jcplag-
jdir,kcplag-
kdir,inoff,ijnoff)
199 sface(1:3) = sgn*psi(xcoord:zcoord, ijknpatch)
200 facecentroid(1:3) = pfc(xcoord:zcoord,icoord,ijknpatch)
203 sface(1:3) = sgn*psj(xcoord:zcoord, ijknpatch)
204 facecentroid(1:3) = pfc(xcoord:zcoord,jcoord,ijknpatch)
207 sface(1:3) = sgn*psk(xcoord:zcoord, ijknpatch)
208 facecentroid(1:3) = pfc(xcoord:zcoord,kcoord,ijknpatch)
212 diffpos(1:3) = posplag(1:3)-facecentroid(1:3)
217 IF ( dpgrid < 0.0_rfreal )
THEN
219 momeplag(1:3) = pcv(cv_plag_xmom:cv_plag_zmom,ipcls)
222 pcv(cv_plag_xpos:cv_plag_zpos,ipcls) = posplag(1:3) + &
223 dpgrid*dfac*sface(1:3)
224 pcv(cv_plag_xmom:cv_plag_zmom,ipcls) = momeplag(1:3) + &
225 dpmome*dfac*sface(1:3)
230 posplagold(1:3) = pcvold(cv_plag_xpos:cv_plag_zpos,ipcls)
231 diffposold(1:3) = posplagold(1:3)-facecentroid(1:3)
234 momeplagold(1:3) = pcvold(cv_plag_xmom:cv_plag_zmom,ipcls)
237 pcvold(cv_plag_xpos:cv_plag_zpos,ipcls) = posplagold(1:3) + &
238 dpgridold*dfac*sface(1:3)
239 pcvold(cv_plag_xmom:cv_plag_zmom,ipcls) = momeplagold(1:3) + &
240 dpmomeold*dfac*sface(1:3)
244 posrhssumplag(1:3) = prhssum(cv_plag_xpos:cv_plag_zpos,ipcls)
247 momerhssumplag(1:3) = prhssum(cv_plag_xmom:cv_plag_zmom,ipcls)
250 prhssum(cv_plag_xpos:cv_plag_zpos,ipcls) = posrhssumplag(1:3) &
251 + dpposrhssum*dfac*sface(1:3)
252 prhssum(cv_plag_xmom:cv_plag_zmom,ipcls) = momerhssumplag(1:3) &
253 + dpmomerhssum*dfac*sface(1:3)
**********************************************************************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
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
subroutine plag_wallbounce(region)
**********************************************************************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 kpcbeg
subroutine registerfunction(global, funName, fileName)
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
**********************************************************************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 jpcbeg
**********************************************************************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 ipcend
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
**********************************************************************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
**********************************************************************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 ipcbeg
**********************************************************************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
**********************************************************************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 jpcend
**********************************************************************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 kdir
**********************************************************************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
long double dot_product(pnt vec1, pnt vec2)
**********************************************************************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)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)