62 TYPE(t_region
) :: region
63 INTEGER :: indxmu, indxtco
64 REAL(RFREAL),
POINTER :: tv(:,:)
67 INTEGER ::
i,
j,
k,
ic, ipatch
71 INTEGER :: ilev, icoff, ijcoff, inoff, ijnoff, ijkc0, ijkc1, ijkn
74 REAL(RFREAL) :: oo3, beta, muf, kpaf, velf(3),
div
75 REAL(RFREAL) :: ux, uy, uz, vx, vy, vz, wx, wy, wz, tx, ty, tz, &
77 REAL(RFREAL) :: sface(3), sij(3,3)
78 REAL(RFREAL),
POINTER :: avgco(:,:), sf(:,:), diss(:,:)
79 REAL(RFREAL),
POINTER :: dv(:,:), grad(:,:)
84 'RFLO_ViscousFlux.F90' )
88 ilev = region%currLevel
89 dv => region%levels(ilev)%mixt%dv
90 diss => region%levels(ilev)%mixt%diss
99 oo3 = 1.0_rfreal/3.0_rfreal
100 beta = region%mixtInput%betrk(region%irkStep)
110 DO ipatch=1,region%nPatches
132 REAL(RFREAL) :: ac0, ac1
146 grad => region%levels(ilev)%mixt%gradi
147 sf => region%levels(ilev)%grid%si
148 avgco => region%levels(ilev)%grid%c2fCoI
149 ELSEIF (ijk==
jdir)
THEN
159 grad => region%levels(ilev)%mixt%gradj
160 sf => region%levels(ilev)%grid%sj
161 avgco => region%levels(ilev)%grid%c2fCoJ
162 ELSEIF (ijk==
kdir)
THEN
172 grad => region%levels(ilev)%mixt%gradk
173 sf => region%levels(ilev)%grid%sk
174 avgco => region%levels(ilev)%grid%c2fCoK
183 ijkc0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
184 ijkc1 = indijk(
i+iadd,
j+jadd,
k+kadd,icoff,ijcoff)
185 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
188 sface(1)= sf(xcoord,ijkn)
189 sface(2)= sf(ycoord,ijkn)
190 sface(3)= sf(zcoord,ijkn)
192 muf = ac0*tv(indxmu ,ijkc0)+ac1*tv(indxmu ,ijkc1)
193 kpaf = ac0*tv(indxtco ,ijkc0)+ac1*tv(indxtco ,ijkc1)
195 velf(1)= ac0*dv(dv_mixt_uvel,ijkc0)+ac1*dv(dv_mixt_uvel,ijkc1)
196 velf(2)= ac0*dv(dv_mixt_vvel,ijkc0)+ac1*dv(dv_mixt_vvel,ijkc1)
197 velf(3)= ac0*dv(dv_mixt_wvel,ijkc0)+ac1*dv(dv_mixt_wvel,ijkc1)
198 ux = grad(gr_mixt_ux,ijkn)
199 uy = grad(gr_mixt_uy,ijkn)
200 uz = grad(gr_mixt_uz,ijkn)
201 vx = grad(gr_mixt_vx,ijkn)
202 vy = grad(gr_mixt_vy,ijkn)
203 vz = grad(gr_mixt_vz,ijkn)
204 wx = grad(gr_mixt_wx,ijkn)
205 wy = grad(gr_mixt_wy,ijkn)
206 wz = grad(gr_mixt_wz,ijkn)
207 tx = grad(gr_mixt_tx,ijkn)
208 ty = grad(gr_mixt_ty,ijkn)
209 tz = grad(gr_mixt_tz,ijkn)
211 tgradf= (tx*sface(1)+ty*sface(2)+tz*sface(3))
215 sij(1,1) = 2.0_rfreal*(ux-
div)
220 sij(2,2) = 2.0_rfreal*(vy-
div)
225 sij(3,3) = 2.0_rfreal*(wz-
div)
227 fd(1) = muf*(sij(1,1)*sface(1)+sij(1,2)*sface(2)+sij(1,3)*sface(3))
228 fd(2) = muf*(sij(2,1)*sface(1)+sij(2,2)*sface(2)+sij(2,3)*sface(3))
229 fd(3) = muf*(sij(3,1)*sface(1)+sij(3,2)*sface(2)+sij(3,3)*sface(3))
230 fd(4) =
dot_product(fd(1:3),velf(1:3)) + kpaf*tgradf
232 diss(cv_mixt_xmom,ijkc0) = diss(cv_mixt_xmom,ijkc0) + fd(1)*beta
233 diss(cv_mixt_ymom,ijkc0) = diss(cv_mixt_ymom,ijkc0) + fd(2)*beta
234 diss(cv_mixt_zmom,ijkc0) = diss(cv_mixt_zmom,ijkc0) + fd(3)*beta
235 diss(cv_mixt_ener,ijkc0) = diss(cv_mixt_ener,ijkc0) + fd(4)*beta
237 diss(cv_mixt_xmom,ijkc1) = diss(cv_mixt_xmom,ijkc1) - fd(1)*beta
238 diss(cv_mixt_ymom,ijkc1) = diss(cv_mixt_ymom,ijkc1) - fd(2)*beta
239 diss(cv_mixt_zmom,ijkc1) = diss(cv_mixt_zmom,ijkc1) - fd(3)*beta
240 diss(cv_mixt_ener,ijkc1) = diss(cv_mixt_ener,ijkc1) - fd(4)*beta
**********************************************************************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
**********************************************************************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)
**********************************************************************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
**********************************************************************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
subroutine rflo_viscousfluxpatch(region, patch, indxMu, indxTCo, tv)
**********************************************************************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
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
static void div(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for division.
subroutine rflo_viscousflux(region, indxMu, indxTCo, tv)
**********************************************************************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)
subroutine computeflux(ijk)
**********************************************************************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)