63 TYPE(t_region
),
INTENT(INOUT) :: region
70 CHARACTER(CHRLEN) :: rcsidentstring
72 INTEGER :: ilev,lobound,bctype,nptypes,n1,n2
74 INTEGER :: icoff,ijcoff,inoff,ijnoff,ijkcd,ijkcb0,ijknb
76 INTEGER :: mixtdistrib,peuldistrib,mixti2d,peuli2d,gasmodel
78 REAL(RFREAL) :: grhoa,grhoua,grhova,grhowa,grhoea
79 REAL(RFREAL) :: sgn,sf(3),ds,vcont,mrate
80 REAL(RFREAL) :: tburn,rhovrel(3),pa,uinj,vinj,winj,vf
81 REAL(RFREAL),
POINTER :: scv(:,:),gcv(:,:),gdv(:,:),ggv(:,:)
82 REAL(RFREAL),
POINTER :: srhs(:,:)
83 REAL(RFREAL),
POINTER :: sface(:,:),mixtvals(:,:),peulvals(:,:)
89 rcsidentstring =
'$RCSfile: PEUL_CentralFluxPatch.F90,v $ $Revision: 1.5 $'
91 global => region%global
94 'PEUL_CentralFluxPatch.F90' )
100 ilev = region%currLevel
101 lobound =
patch%lbound
108 bctype =
patch%bcType
110 mixtdistrib =
patch%mixt%distrib
111 peuldistrib =
patch%peul%distrib
112 indcp = region%levels(ilev)%mixt%indCp
113 indmol = region%levels(ilev)%mixt%indMol
114 gasmodel = region%mixtInput%gasModel
116 gcv => region%levels(ilev)%mixt%cv
117 gdv => region%levels(ilev)%mixt%dv
118 ggv => region%levels(ilev)%mixt%gv
119 scv => region%levels(ilev)%peul%cv
120 srhs => region%levels(ilev)%peul%rhs
122 nptypes = region%peulInput%nPtypes
123 IF (region%levels(ilev)%peul%nCv /= nptypes) &
124 CALL
errorstop( global,err_peul_npmismatch,__line__ )
126 mixtvals =>
patch%mixt%vals
129 IF (
ASSOCIATED(
patch%peul%vals))
THEN
130 peulvals =>
patch%peul%vals
131 IF (lbound(peulvals,1) /= 1 .OR. ubound(peulvals,1) /= nptypes) &
132 CALL
errorstop( global,err_peul_npmismatch,__line__ )
141 IF (lobound==2 .OR. lobound==4 .OR. lobound==6)
THEN
150 SELECT CASE (lobound)
152 sface => region%levels(ilev)%grid%si
154 sface => region%levels(ilev)%grid%sj
156 sface => region%levels(ilev)%grid%sk
165 CASE (bc_slipwall :bc_slipwall +bc_range, &
166 bc_noslipwall:bc_noslipwall+bc_range, &
167 bc_symmetry :bc_symmetry +bc_range)
171 CASE (bc_injection:bc_injection+bc_range)
177 SELECT CASE (lobound)
191 mixti2d = mixtdistrib * indij(n1,n2,noff)
192 mrate = mixtvals(bcdat_inject_mfrate,mixti2d)
197 IF (mrate > 0._rfreal)
THEN
199 peuli2d = peuldistrib * indij(n1,n2,noff)
200 ijkcb0 = indijk(
i,
j,
k,icoff,ijcoff)
204 sf(1) = sgn*sface(xcoord,ijknb)
205 sf(2) = sgn*sface(ycoord,ijknb)
206 sf(3) = sgn*sface(zcoord,ijknb)
208 tburn = mixtvals(bcdat_inject_temp ,mixti2d)
209 rhovrel(1) = mixtvals(bcdat_inject_rfvfu ,mixti2d)
210 rhovrel(2) = mixtvals(bcdat_inject_rfvfv ,mixti2d)
211 rhovrel(3) = mixtvals(bcdat_inject_rfvfw ,mixti2d)
213 ds =
sqrt(sf(1)*sf(1)+sf(2)*sf(2)+sf(3)*sf(3))
214 IF (gasmodel == gas_model_tcperf)
THEN
216 sf(1)/ds,sf(2)/ds,sf(3)/ds, &
217 ggv(gv_mixt_cp ,ijkcb0*indcp ), &
218 ggv(gv_mixt_mol ,ijkcb0*indmol), &
219 gdv(dv_mixt_pres,ijkcb0 ), &
220 grhoa,grhoua,grhova,grhowa,grhoea, &
223 CALL
errorstop( region%global,err_unknown_bc,__line__ )
226 vcont = uinj*sf(1) + vinj*sf(2) + winj*sf(3)
229 vf = vcont*peulvals(ipt,peuli2d)
230 srhs(ipt,ijkcb0) = srhs(ipt,ijkcb0) + vf*grhoa
240 CASE (bc_regionint :bc_regionint +bc_range)
242 CASE (bc_regnonconf:bc_regnonconf+bc_range)
251 ijkcb0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
255 grhoa = 0.5_rfreal*(gcv(cv_mixt_dens,ijkcb0) + &
256 gcv(cv_mixt_dens,ijkcd))
257 grhoua = 0.5_rfreal*(gcv(cv_mixt_xmom,ijkcb0) + &
258 gcv(cv_mixt_xmom,ijkcd))
259 grhova = 0.5_rfreal*(gcv(cv_mixt_ymom,ijkcb0) + &
260 gcv(cv_mixt_ymom,ijkcd))
261 grhowa = 0.5_rfreal*(gcv(cv_mixt_zmom,ijkcb0) + &
262 gcv(cv_mixt_zmom,ijkcd))
264 sf(1) = sgn*sface(xcoord,ijknb)
265 sf(2) = sgn*sface(ycoord,ijknb)
266 sf(3) = sgn*sface(zcoord,ijknb)
268 vcont = (grhoua*sf(1)+grhova*sf(2)+grhowa*sf(3))/grhoa
271 srhs(ipt,ijkcb0) = srhs(ipt,ijkcb0) + &
272 0.5_rfreal*vcont*(scv(ipt,ijkcb0)+scv(ipt,ijkcd))
283 IF (region%mixtInput%moveGrid)
THEN
284 CALL
errorstop( global,err_peul_movegrid,__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 ibeg
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
subroutine bcondinjectionperf(distrib, minj, tinj, rhoVrel, sxn, syn, szn, cpgas, mm, p, rhob, rhoub, rhovb, rhowb, rhoeb, pb, uinj, vinj, winj)
**********************************************************************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)
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
**********************************************************************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)
subroutine peul_centralfluxpatch(region, patch)
**********************************************************************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
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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)
**********************************************************************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