63 TYPE (t_region
) :: region
66 INTEGER ::
i,
j,
k, jr
69 CHARACTER(CHRLEN) :: rcsidentstring
73 INTEGER :: icoff, ijcoff, inoff, ijnoff, ijkc, ijkcr, ijkn, ijkn1
74 REAL(RFREAL),
POINTER :: xyz(:,:), cv(:,:), dv(:,:)
75 REAL(RFREAL) ::
pi, gamma, gogampls,
delta, minj, mfrat, refmassflux
76 REAL(RFREAL) :: throatmflux, cpreps, headpres, headtemp, headsv, rgas
77 REAL(RFREAL) :: phi, mach, yp, ym, yc,
dy,
denom, choklen, hvinj
78 REAL(RFREAL) :: rho, pres, vm, eo
82 rcsidentstring =
'$RCSfile: PERI_coCprInitSolutionFlo.F90,v $ $Revision: 1.3 $'
84 global => region%global
86 'PERI_coCprInitSolutionFlo.F90' )
90 ilev = region%currLevel
96 xyz => region%levels(ilev)%grid%xyz
97 cv => region%levels(ilev)%mixt%cv
98 dv => region%levels(ilev)%mixt%dv
102 gamma = global%refGamma
103 gogampls = gamma / (gamma + 1._rfreal)
104 cpreps = region%periInput%cprEpsilon
105 headpres = region%periInput%headPres
106 headtemp = region%periInput%headTemp
107 delta = global%refLength
108 write(*,*)global%currentTime
109 IF ((global%flowType==flow_unsteady .AND. &
110 global%currentTime < peri_real_small) .OR. &
111 (global%flowType==flow_steady .AND. global%currentIter==0))
THEN
115 write(*,*)headpres,headtemp
117 minj = region%periInput%minjRate
118 refmassflux = region%periInput%bulkmFlux
121 throatmflux = 2._rfreal*
delta*gamma*headpres/ &
122 sqrt(2._rfreal*gogampls*rgas*headtemp)
125 headsv =
sqrt( gamma*rgas*headtemp )
126 denom = headsv*minj*
sqrt( 2._rfreal*(gamma+1._rfreal) )
127 choklen = headpres*gamma/
denom
130 mfrat = refmassflux/throatmflux
133 mfrat = 1._rfreal/cpreps/choklen
136 phi =
sqrt(1._rfreal - mfrat*mfrat)
139 rho = 0.5_rfreal*headpres*(1._rfreal+phi)/(rgas*headtemp)
140 pres = (1.d0+gamma*phi)*headpres/(1._rfreal+gamma)
141 cv(cv_mixt_dens,:) = rho
142 dv(dv_mixt_pres,:) = pres
143 dv(dv_mixt_wvel,:) = 0._rfreal
146 mach =
sqrt((1._rfreal-phi)/(1._rfreal+gamma*phi))
147 hvinj= minj*rgas*headtemp/headpres
148 write(*,*)cv(cv_mixt_dens,1),dv(dv_mixt_pres,1),choklen,mach
149 write(*,*)mfrat,phi,mach,hvinj
154 ijkc = indijk(
i ,
j ,
k ,icoff,ijcoff)
157 ijkn = indijk(
i , jr ,
k ,inoff,ijnoff)
158 ijkn1 = indijk(
i , jr+1,
k ,inoff,ijnoff)
159 dy = xyz(ycoord,ijkn1)-xyz(ycoord,ijkn)
160 yp = xyz(ycoord,ijkn1)
161 ym = xyz(ycoord,ijkn)
162 yc = 0.5_rfreal*(xyz(ycoord,ijkn1)+xyz(ycoord,ijkn))
163 IF (
dy < 0._rfreal)
THEN
164 CALL
errorstop( region%global,err_peri_geo,__line__, &
165 'grid contains negative spacing' )
174 dv(dv_mixt_uvel,ijkc) = minj/rho*0.5_rfreal*
pi/cpreps* &
176 dv(dv_mixt_vvel,ijkc) = -minj/rho*
sin( 0.5_rfreal*
pi*yc/
delta )
178 vm =
sqrt( dv(dv_mixt_uvel,ijkc)*dv(dv_mixt_uvel,ijkc) + &
179 dv(dv_mixt_vvel,ijkc)*dv(dv_mixt_vvel,ijkc) + &
180 dv(dv_mixt_wvel,ijkc)*dv(dv_mixt_wvel,ijkc))
182 cv(cv_mixt_xmom,ijkc) = rho*dv(dv_mixt_uvel,ijkc)
183 cv(cv_mixt_ymom,ijkc) = rho*dv(dv_mixt_vvel,ijkc)
184 cv(cv_mixt_zmom,ijkc) = rho*dv(dv_mixt_wvel,ijkc)
185 cv(cv_mixt_ener,ijkc) = rho*eo
187 DO j = 1, region%nDumCells
188 ijkn = indijk(
i ,
jpcbeg ,
k ,inoff,ijnoff)
189 ijkn1 = indijk(
i ,
jpcend+1 ,
k ,inoff,ijnoff)
190 yp = xyz(ycoord,ijkn1)
191 ym = xyz(ycoord,ijkn)
192 ijkcr = indijk(
i ,
jpcbeg+
j-1,
k ,icoff,ijcoff)
193 ijkc = indijk(
i ,
jpcbeg-
j ,
k ,icoff,ijcoff)
194 IF (ym == region%periInput%minmax(1))
THEN
195 cv(cv_mixt_xmom,ijkc) = -cv(cv_mixt_xmom,ijkcr)
197 ijkcr = indijk(
i ,
jpcend-
j+1,
k ,icoff,ijcoff)
198 ijkc = indijk(
i ,
jpcend+
j ,
k ,icoff,ijcoff)
199 IF (yp == region%periInput%minmax(2))
THEN
200 cv(cv_mixt_xmom,ijkc) = -cv(cv_mixt_xmom,ijkcr)
206 DO k =
kpcbeg-region%nDumCells, kpcend+region%nDumCells
209 ijkc = indijk(
i ,
j ,
k ,icoff,ijcoff)
211 cv(cv_mixt_dens,ijkc) = cv(cv_mixt_dens,ijkcr)
212 cv(cv_mixt_xmom,ijkc) = cv(cv_mixt_xmom,ijkcr)
213 cv(cv_mixt_ymom,ijkc) = cv(cv_mixt_ymom,ijkcr)
214 cv(cv_mixt_zmom,ijkc) = cv(cv_mixt_zmom,ijkcr)
215 cv(cv_mixt_ener,ijkc) = cv(cv_mixt_ener,ijkcr)
218 IF(
j==1.AND.
k==2)
write(*,*)
i,
j,
k,cv(1:5,ijkc)
227 region%periInput%meanPgrad = global%moduleVar(1)
228 write(*,*) region%procId,
' cprMeanPgrad ', region%periInput%meanPgrad
real(rfreal) function mixtperf_eo_dgpvm(D, G, P, Vm)
**********************************************************************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
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine registerfunction(global, funName, fileName)
subroutine peri_cocprinitsolution(region)
**********************************************************************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 ipcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
**********************************************************************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 errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
CGAL_BEGIN_NAMESPACE void const NT NT NT NT & denom
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)