60 TYPE(t_region
) :: region
66 CHARACTER(CHRLEN) :: rcsidentstring
69 INTEGER :: ilev, icoff, ijcoff, ijkc0, nvar, ipc, jpc, kpc
70 INTEGER :: indcp, indmol
72 REAL(RFREAL),
POINTER :: cv(:,:), dv(:,:), gv(:,:),
rhs(:,:), vol(:)
73 REAL(RFREAL),
POINTER :: cprvar(:,:), varsend(:,:), varrecv(:,:)
74 REAL(RFREAL),
ALLOCATABLE :: rgas(:), cpgas(:)
75 REAL(RFREAL) :: voleps, aversize, sndaversize, rcvaversize, ravgrho
76 REAL(RFREAL) :: denumer, denomin,
delta, rdelta, gamma, gammin, gagmin
77 REAL(RFREAL) :: rho, ruc, ren, uve, vve, wve, tmp, prs, rprim, uprim, vprim
78 REAL(RFREAL) :: wprim, tprim, pprim, ugrad, vgrad, wgrad, tgrad, pgrad
79 REAL(RFREAL) :: refmeanpgrad, fcont, fmomx, fmomy, fmomz, frhoe
83 rcsidentstring =
'$RCSfile: PERI_coCprSlowTermsFlo.F90,v $ $Revision: 1.3 $'
86 'PERI_coCprSlowTermsFlo.F90' )
90 ilev = region%currLevel
96 cv => region%levels(ilev)%mixt%cv
97 dv => region%levels(ilev)%mixt%dv
98 gv => region%levels(ilev)%mixt%gv
99 rhs => region%levels(ilev)%mixt%rhs
100 vol => region%levels(ilev)%grid%vol
101 cprvar => region%levels(ilev)%peri%cprVar
102 varsend=> region%levels(ilev)%peri%varSend
103 varrecv=> region%levels(ilev)%peri%varRecv
108 aversize = dble(ipc*kpc)
110 indcp = region%levels(ilev)%mixt%indCp
111 indmol = region%levels(ilev)%mixt%indMol
112 nvar = region%periInput%nVar
114 refmeanpgrad = region%periInput%meanPgrad
115 delta = region%global%refLength
116 rdelta = 1._rfreal/
delta
125 cprvar(1:nvar,
j) = 0._rfreal
130 ijkc0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
132 cprvar(cpr_rho,
j) = cprvar(cpr_rho,
j) + cv(cv_mixt_dens,ijkc0)
133 cprvar(cpr_ruc,
j) = cprvar(cpr_ruc,
j) + cv(cv_mixt_xmom,ijkc0)
134 cprvar(cpr_rvc,
j) = cprvar(cpr_rvc,
j) + cv(cv_mixt_ymom,ijkc0)
135 cprvar(cpr_uve,
j) = cprvar(cpr_uve,
j) + dv(dv_mixt_uvel,ijkc0)
136 cprvar(cpr_vve,
j) = cprvar(cpr_vve,
j) + dv(dv_mixt_vvel,ijkc0)
137 cprvar(cpr_tmp,
j) = cprvar(cpr_tmp,
j) + dv(dv_mixt_temp,ijkc0)
138 cprvar(cpr_prs,
j) = cprvar(cpr_prs,
j) + dv(dv_mixt_pres,ijkc0)
141 cpgas(
j)= cpgas(
j)+ gv(gv_mixt_cp,ijkc0*indcp)
151 varsend(
j-
jpcbeg+1,nvar+1) = rgas(
j)
152 varsend(
j-
jpcbeg+1,nvar+2) = cpgas(
j)
154 CALL mpi_barrier( region%global%mpiComm, region%global%mpierr )
155 DO l = 1, nvar+gas_nvar
156 CALL mpi_allreduce( varsend(1,l),varrecv(1,l),jpc,mpi_double_precision, &
157 mpi_sum,region%global%mpiComm, region%global%mpierr )
163 rgas(
j) = varrecv(
j-
jpcbeg+1,nvar+1)
164 cpgas(
j) = varrecv(
j-
jpcbeg+1,nvar+2)
167 sndaversize = aversize
168 CALL mpi_allreduce( sndaversize,rcvaversize,1, mpi_double_precision, &
169 mpi_sum,region%global%mpiComm,region%global%mpierr )
170 aversize = rcvaversize
175 cprvar(l,
j) = cprvar(l,
j)/aversize
177 rgas(
j) = rgas(
j)/aversize
178 cpgas(
j)= cpgas(
j)/aversize
181 gagmin = gamma/(gamma - 1_rfreal)
183 ravgrho = 1._rfreal/cprvar(cpr_rho,
j)
184 denumer = gagmin*refmeanpgrad + (cprvar(cpr_ruc,
j)**2 + &
185 cprvar(cpr_rvc,
j)**2)*rdelta*ravgrho
186 denomin = gagmin*cprvar(cpr_prs,
j)*ravgrho + &
187 (cprvar(cpr_ruc,
j)**2+cprvar(cpr_rvc,
j)**2)*ravgrho**2
188 cprvar(cpr_dor,
j) = denumer/denomin
189 cprvar(cpr_dou,
j) = (cprvar(cpr_ruc,
j)*rdelta-cprvar(cpr_uve,
j)* &
190 cprvar(cpr_dor,
j))*ravgrho
191 cprvar(cpr_dov,
j) = -cprvar(cpr_vve,
j)*ravgrho*cprvar(cpr_dor,
j)
192 cprvar(cpr_dot,
j) = (refmeanpgrad/rgas(
j)-cprvar(cpr_tmp,
j)* &
193 cprvar(cpr_dor,
j))*ravgrho
199 ijkc0 = indijk(
i ,
j ,
k ,icoff,ijcoff)
201 rho = cv(cv_mixt_dens,ijkc0)
202 ruc = cv(cv_mixt_xmom,ijkc0)
203 ren = cv(cv_mixt_ener,ijkc0)
204 uve = dv(dv_mixt_uvel,ijkc0)
205 vve = dv(dv_mixt_vvel,ijkc0)
206 wve = dv(dv_mixt_wvel,ijkc0)
207 tmp = dv(dv_mixt_temp,ijkc0)
208 prs = dv(dv_mixt_pres,ijkc0)
210 rprim = rho - cprvar(cpr_rho,
j)
211 uprim = uve - cprvar(cpr_uve,
j)
212 vprim = vve - cprvar(cpr_vve,
j)
214 tprim = tmp - cprvar(cpr_tmp,
j)
215 pprim = prs - cprvar(cpr_prs,
j)
217 ugrad = uprim*rdelta + cprvar(cpr_dou,
j)
218 vgrad = vprim*rdelta + cprvar(cpr_dov,
j)
220 tgrad = tprim*rdelta + cprvar(cpr_dot,
j)
221 pgrad = pprim*rdelta + refmeanpgrad
223 fcont = (cprvar(cpr_ruc,
j)+cprvar(cpr_rho,
j)*uprim+cprvar(cpr_uve,
j)* &
224 rprim)*rdelta + uprim*cprvar(cpr_dor,
j) + rprim*cprvar(cpr_dou,
j)
225 fmomx = uve*fcont + ruc*ugrad + pgrad
226 fmomy = vve*fcont + ruc*vgrad
227 fmomz = wve*fcont + ruc*wgrad
229 gammin= gamma-1._rfreal
230 frhoe = ren/rho*fcont + ruc*(uve*ugrad+vve*vgrad+wve*wgrad+rgas(
j)/ &
231 gammin*tgrad) + prs*ugrad +uve*pgrad
233 voleps= vol(ijkc0)*region%periInput%cprEpsilon
234 rhs(cv_mixt_dens,ijkc0) =
rhs(cv_mixt_dens,ijkc0) + voleps*fcont
235 rhs(cv_mixt_xmom,ijkc0) =
rhs(cv_mixt_xmom,ijkc0) + voleps*fmomx
236 rhs(cv_mixt_ymom,ijkc0) =
rhs(cv_mixt_ymom,ijkc0) + voleps*fmomy
237 rhs(cv_mixt_zmom,ijkc0) =
rhs(cv_mixt_zmom,ijkc0) + voleps*fmomz
238 rhs(cv_mixt_ener,ijkc0) =
rhs(cv_mixt_ener,ijkc0) + voleps*frhoe
260 DEALLOCATE( rgas, cpgas )
subroutine peri_cocprslowterms(region)
real(rfreal) function mixtperf_r_m(M)
**********************************************************************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 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 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 jpcend
subroutine deregisterfunction(global)
real(rfreal) function mixtperf_g_cpr(Cp, R)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)