64 TYPE(t_region
) :: region
66 INTEGER :: indxmu, indxtco
67 REAL(RFREAL),
POINTER :: tv(:,:)
70 INTEGER ::
i,
j,
k,
ic
73 INTEGER :: ilev, lbound, bctype
76 INTEGER :: icoff, ijcoff, inoff, ijnoff, ijkcb0, ijkcd, ijknb, acid0, acid1
77 INTEGER :: n1, n2, noff, j2d, aerocoeff
79 REAL(RFREAL) :: oo3, beta, muf, kpaf, velf(3),
div
80 REAL(RFREAL) :: ux, uy, uz, vx, vy, vz, wx, wy, wz, tx, ty, tz, &
82 REAL(RFREAL) :: sgn, sf(3), sij(3,3), ac0, ac1
83 REAL(RFREAL) :: rref, vref, rcfref, rchref
84 REAL(RFREAL),
POINTER :: avgco(:,:), diss(:,:)
86 REAL(RFREAL),
POINTER :: dv(:,:), grad(:,:), sface(:,:)
91 'RFLO_ViscousFluxPatch.F90' )
97 ilev = region%currLevel
100 dv => region%levels(ilev)%mixt%dv
101 diss => region%levels(ilev)%mixt%diss
105 oo3 = 1.0_rfreal/3.0_rfreal
106 beta = region%mixtInput%betrk(region%irkStep)
109 aerocoeff = region%global%aeroCoeffs
110 rref = region%global%refDensity
111 vref = region%global%refVelocity
113 rcfref = 2.0_rfreal/(rref*vref*vref)
114 rchref = 2.0_rfreal/(rref*vref*vref*vref)
129 IF (lbound==2 .OR. lbound==4 .OR. lbound==6)
THEN
140 IF (lbound==1 .OR. lbound==2)
THEN
141 avgco => region%levels(ilev)%grid%c2fCoI
142 sface => region%levels(ilev)%grid%si
143 grad => region%levels(ilev)%mixt%gradi
144 ELSE IF (lbound==3 .OR. lbound==4)
THEN
145 avgco => region%levels(ilev)%grid%c2fCoJ
146 sface => region%levels(ilev)%grid%sj
147 grad => region%levels(ilev)%mixt%gradj
149 avgco => region%levels(ilev)%grid%c2fCoK
150 sface => region%levels(ilev)%grid%sk
151 grad => region%levels(ilev)%mixt%gradk
156 IF (bctype>=bc_regionint .AND. bctype<=bc_regionint+bc_range)
THEN
158 ELSE IF (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range)
THEN
170 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
173 ac0 = avgco(acid0,ijknb)
174 ac1 = avgco(acid1,ijknb)
176 muf = ac0*tv(tv_mixt_muel,ijkcb0)+ac1*tv(tv_mixt_muel,ijkcd)
177 kpaf = ac0*tv(tv_mixt_tcol,ijkcb0)+ac1*tv(tv_mixt_tcol,ijkcd)
179 velf(1)= ac0*dv(dv_mixt_uvel,ijkcb0)+ac1*dv(dv_mixt_uvel,ijkcd)
180 velf(2)= ac0*dv(dv_mixt_vvel,ijkcb0)+ac1*dv(dv_mixt_vvel,ijkcd)
181 velf(3)= ac0*dv(dv_mixt_wvel,ijkcb0)+ac1*dv(dv_mixt_wvel,ijkcd)
183 ux = grad(gr_mixt_ux,ijknb)
184 uy = grad(gr_mixt_uy,ijknb)
185 uz = grad(gr_mixt_uz,ijknb)
186 vx = grad(gr_mixt_vx,ijknb)
187 vy = grad(gr_mixt_vy,ijknb)
188 vz = grad(gr_mixt_vz,ijknb)
189 wx = grad(gr_mixt_wx,ijknb)
190 wy = grad(gr_mixt_wy,ijknb)
191 wz = grad(gr_mixt_wz,ijknb)
192 tx = grad(gr_mixt_tx,ijknb)
193 ty = grad(gr_mixt_ty,ijknb)
194 tz = grad(gr_mixt_tz,ijknb)
196 sf(1) = sgn*sface(xcoord,ijknb)
197 sf(2) = sgn*sface(ycoord,ijknb)
198 sf(3) = sgn*sface(zcoord,ijknb)
200 tgradf= (tx*sf(1)+ty*sf(2)+tz*sf(3))
204 sij(1,1) = 2.0_rfreal*(ux-
div)
209 sij(2,2) = 2.0_rfreal*(vy-
div)
214 sij(3,3) = 2.0_rfreal*(wz-
div)
216 fd(1) = muf*(sij(1,1)*sf(1)+sij(1,2)*sf(2)+sij(1,3)*sf(3))
217 fd(2) = muf*(sij(2,1)*sf(1)+sij(2,2)*sf(2)+sij(2,3)*sf(3))
218 fd(3) = muf*(sij(3,1)*sf(1)+sij(3,2)*sf(2)+sij(3,3)*sf(3))
219 fd(4) =
dot_product(fd(1:3),velf(1:3)) + kpaf*tgradf
221 diss(cv_mixt_xmom,ijkcb0) = diss(cv_mixt_xmom,ijkcb0)+fd(1)*beta
222 diss(cv_mixt_ymom,ijkcb0) = diss(cv_mixt_ymom,ijkcb0)+fd(2)*beta
223 diss(cv_mixt_zmom,ijkcb0) = diss(cv_mixt_zmom,ijkcb0)+fd(3)*beta
224 diss(cv_mixt_ener,ijkcb0) = diss(cv_mixt_ener,ijkcb0)+fd(4)*beta
228 IF (lbound==1 .OR. lbound==2)
THEN
231 ELSE IF (lbound==3 .OR. lbound==4)
THEN
234 ELSE IF (lbound==5 .OR. lbound==6)
THEN
238 j2d = aerocoeff * indij(n1,n2,noff)
239 patch%cf(xcoord,j2d) = rcfref*fd(1)
240 patch%cf(ycoord,j2d) = rcfref*fd(2)
241 patch%cf(zcoord,j2d) = rcfref*fd(3)
242 patch%ch( j2d) = rchref*fd(4)
**********************************************************************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)
**********************************************************************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 inode
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
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
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
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.
**********************************************************************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)
**********************************************************************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 jnode