58 TYPE(t_region
),
INTENT(INOUT) :: region
59 INTEGER,
INTENT(IN) :: ipt
65 CHARACTER(CHRLEN) :: rcsidentstring
67 INTEGER :: ilev,ibn,ien,errorflag,
ic,ijknpi,ijknpj,ijknpk
71 REAL(RFREAL) :: ux,uy,uz,vx,vy,vz,wx,wy,wz,taufac,mass,tau,trg2av
73 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: gtv,
gradi,
gradj,gradk,scv,srhs
74 REAL(RFREAL),
POINTER,
DIMENSION(:) :: vol
75 REAL(RFREAL),
ALLOCATABLE,
DIMENSION(:) :: trg2i,trg2j,trg2k
82 rcsidentstring =
'$RCSfile: PEUL_SourceEqEul.F90,v $ $Revision: 1.3 $'
84 global => region%global
87 'PEUL_SourceEqEul.F90' )
91 ilev = region%currLevel
103 vol => region%levels(ilev)%grid%vol
105 gtv => region%levels(ilev)%mixt%tv
107 gradi => region%levels(ilev)%mixt%gradi
108 gradj => region%levels(ilev)%mixt%gradj
109 gradk => region%levels(ilev)%mixt%gradk
111 scv => region%levels(ilev)%peul%cv
112 srhs => region%levels(ilev)%peul%rhs
114 ptype => region%peulInput%ptypes(ipt)
118 ALLOCATE( trg2i(ibn:ien),stat=errorflag )
119 errorflag = global%error
120 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
122 ALLOCATE( trg2j(ibn:ien),stat=errorflag )
123 errorflag = global%error
124 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
126 ALLOCATE( trg2k(ibn:ien),stat=errorflag )
127 errorflag = global%error
128 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
132 ux =
gradi(gr_mixt_ux,ijkn)
133 uy =
gradi(gr_mixt_uy,ijkn)
134 uz =
gradi(gr_mixt_uz,ijkn)
135 vx =
gradi(gr_mixt_vx,ijkn)
136 vy =
gradi(gr_mixt_vy,ijkn)
137 vz =
gradi(gr_mixt_vz,ijkn)
138 wx =
gradi(gr_mixt_wx,ijkn)
139 wy =
gradi(gr_mixt_wy,ijkn)
140 wz =
gradi(gr_mixt_wz,ijkn)
142 trg2i(ijkn) = ux**2 + vy**2 + wz**2 + 2._rfreal*(uy*vx + vz*wy + wx*uz)
144 ux =
gradj(gr_mixt_ux,ijkn)
145 uy =
gradj(gr_mixt_uy,ijkn)
146 uz =
gradj(gr_mixt_uz,ijkn)
147 vx =
gradj(gr_mixt_vx,ijkn)
148 vy =
gradj(gr_mixt_vy,ijkn)
149 vz =
gradj(gr_mixt_vz,ijkn)
150 wx =
gradj(gr_mixt_wx,ijkn)
151 wy =
gradj(gr_mixt_wy,ijkn)
152 wz =
gradj(gr_mixt_wz,ijkn)
154 trg2j(ijkn) = ux**2 + vy**2 + wz**2 + 2._rfreal*(uy*vx + vz*wy + wx*uz)
156 ux = gradk(gr_mixt_ux,ijkn)
157 uy = gradk(gr_mixt_uy,ijkn)
158 uz = gradk(gr_mixt_uz,ijkn)
159 vx = gradk(gr_mixt_vx,ijkn)
160 vy = gradk(gr_mixt_vy,ijkn)
161 vz = gradk(gr_mixt_vz,ijkn)
162 wx = gradk(gr_mixt_wx,ijkn)
163 wy = gradk(gr_mixt_wy,ijkn)
164 wz = gradk(gr_mixt_wz,ijkn)
166 trg2k(ijkn) = ux**2 + vy**2 + wz**2 + 2._rfreal*(uy*vx + vz*wy + wx*uz)
170 taufac = ptype%tauVcoef
176 ic = indijk(
i,
j,
k,icoff,ijcoff)
177 mass = scv(ipt,
ic)*vol(
ic)
179 IF (mass > 0._rfreal)
THEN
181 tau = taufac / gtv(tv_mixt_muel,
ic)
183 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
184 ijknpi = indijk(
i+1,
j ,
k ,inoff,ijnoff)
185 ijknpj = indijk(
i ,
j+1,
k ,inoff,ijnoff)
186 ijknpk = indijk(
i ,
j ,
k+1,inoff,ijnoff)
188 trg2av = (trg2i(ijkn) + trg2i(ijknpi) + &
189 trg2j(ijkn) + trg2j(ijknpj) + &
190 trg2k(ijkn) + trg2k(ijknpk)) / 6._rfreal
192 srhs(ipt,
ic) = srhs(ipt,
ic) - mass * tau * trg2av
202 DEALLOCATE( trg2i,stat=errorflag )
203 global%error = errorflag
204 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
206 DEALLOCATE( trg2j,stat=errorflag )
207 global%error = errorflag
208 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
210 DEALLOCATE( trg2k,stat=errorflag )
211 global%error = errorflag
212 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
**********************************************************************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
**********************************************************************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 jdnbeg
**********************************************************************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 idnend
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 jdnend
**********************************************************************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 idnbeg
**********************************************************************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_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************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 iEndG gradi(:,:)
**********************************************************************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
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine peul_sourceeqeul(region, ipt)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)
**********************************************************************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 kdnbeg
**********************************************************************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 iEndG gradj(:,:)