57 TYPE (t_region
) :: region
63 CHARACTER(CHRLEN) :: rcsidentstring
67 INTEGER :: icoff, ijcoff, inoff, ijnoff, ijkc, ijkcr, ijkn, ijkn1
69 REAL(RFREAL),
POINTER :: xyz(:,:), cv(:,:), dv(:,:)
70 REAL(RFREAL) :: rgas, yp, ym, yc,
dy, muel, refmeanpgrad,
delta
71 REAL(RFREAL) :: rho, pres, vm, eo, xyzcell(3), twopi
72 REAL(RFREAL) :: lambda,ampl,umax,nxwav,nywav,nzwav,span,extn,fy,yscale,ywaves
76 rcsidentstring =
'$RCSfile: PERI_coCnlInitSolutionFlo.F90,v $ $Revision: 1.4 $'
78 global => region%global
80 'PERI_coCnlInitSolutionFlo.F90' )
84 ilev = region%currLevel
90 xyz => region%levels(ilev)%grid%xyz
91 cv => region%levels(ilev)%mixt%cv
92 dv => region%levels(ilev)%mixt%dv
94 IF ((global%flowType==flow_unsteady .AND. &
95 global%currentTime < peri_real_small) .OR. &
96 (global%flowType==flow_steady .AND. global%currentIter==0))
THEN
100 delta = global%refLength
101 muel = global%refVisc
102 rho = global%refDensity
103 pres = global%refPressure
104 refmeanpgrad = region%periInput%meanPgrad
105 cv(cv_mixt_dens,:) = rho
106 cv(cv_mixt_ymom,:) = 0._rfreal
107 cv(cv_mixt_zmom,:) = 0._rfreal
112 ijkc = indijk(
i ,
j ,
k ,icoff,ijcoff)
113 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
114 ijkn1 = indijk(
i ,
j+1,
k ,inoff,ijnoff)
115 dy = xyz(ycoord,ijkn1)-xyz(ycoord,ijkn)
116 yp = xyz(ycoord,ijkn1)
117 ym = xyz(ycoord,ijkn)
118 yc = 0.5_rfreal*(xyz(ycoord,ijkn1)+xyz(ycoord,ijkn))
119 IF (
dy < 0._rfreal)
THEN
120 CALL
errorstop( region%global,err_peri_geo,__line__, &
121 'grid contains negative spacing' )
124 dv(dv_mixt_uvel,ijkc) = -0.5_rfreal/muel*refmeanpgrad* &
127 cv(cv_mixt_xmom,ijkc) = dv(dv_mixt_uvel,ijkc)*rho
129 vm =
sqrt( cv(cv_mixt_xmom,ijkc)*cv(cv_mixt_xmom,ijkc) + &
130 cv(cv_mixt_ymom,ijkc)*cv(cv_mixt_ymom,ijkc) + &
131 cv(cv_mixt_zmom,ijkc)*cv(cv_mixt_zmom,ijkc))/rho
133 cv(cv_mixt_ener,ijkc) = rho*eo
135 DO j = 1, region%nDumCells
136 ijkn = indijk(
i ,
jpcbeg ,
k ,inoff,ijnoff)
137 ijkn1 = indijk(
i ,
jpcend+1 ,
k ,inoff,ijnoff)
138 yp = xyz(ycoord,ijkn1)
139 ym = xyz(ycoord,ijkn)
140 ijkcr = indijk(
i ,
jpcbeg+
j-1,
k ,icoff,ijcoff)
141 ijkc = indijk(
i ,
jpcbeg-
j ,
k ,icoff,ijcoff)
142 IF (ym == region%periInput%minmax(1))
THEN
143 cv(cv_mixt_xmom,ijkc) = -cv(cv_mixt_xmom,ijkcr)
145 ijkcr = indijk(
i ,
jpcend-
j+1,
k ,icoff,ijcoff)
146 ijkc = indijk(
i ,
jpcend+
j ,
k ,icoff,ijcoff)
147 IF (yp == region%periInput%minmax(2))
THEN
148 cv(cv_mixt_xmom,ijkc) = -cv(cv_mixt_xmom,ijkcr)
154 DO k =
kpcbeg-region%nDumCells, kpcend+region%nDumCells
157 ijkc = indijk(
i ,
j ,
k ,icoff,ijcoff)
159 cv(cv_mixt_dens,ijkc) = cv(cv_mixt_dens,ijkcr)
160 cv(cv_mixt_xmom,ijkc) = cv(cv_mixt_xmom,ijkcr)
161 cv(cv_mixt_ymom,ijkc) = cv(cv_mixt_ymom,ijkcr)
162 cv(cv_mixt_zmom,ijkc) = cv(cv_mixt_zmom,ijkcr)
163 cv(cv_mixt_ener,ijkc) = cv(cv_mixt_ener,ijkcr)
172 umax = -0.5_rfreal/muel*refmeanpgrad*
delta*
delta
176 span = xyz(zcoord,indijk(
ipcbeg,
jpcbeg,kpcend+1,inoff,ijnoff ))- &
180 twopi = 2._rfreal*global%pi
182 DO k =
kpcbeg-region%nDumCells, kpcend+region%nDumCells
185 ijkc = indijk(
i ,
j ,
k ,icoff,ijcoff)
187 icorner(2) = indijk(
i+1 ,
j ,
k ,inoff,ijnoff)
188 icorner(3) = indijk(
i ,
j+1 ,
k ,inoff,ijnoff)
189 icorner(4) = indijk(
i+1 ,
j+1 ,
k ,inoff,ijnoff)
190 icorner(5) = indijk(
i ,
j ,
k+1 ,inoff,ijnoff)
191 icorner(6) = indijk(
i+1 ,
j ,
k+1 ,inoff,ijnoff)
192 icorner(7) = indijk(
i ,
j+1 ,
k+1 ,inoff,ijnoff)
193 icorner(8) = indijk(
i+1 ,
j+1 ,
k+1 ,inoff,ijnoff)
195 xyzcell(:) = 0._rfreal
197 xyzcell(1) = xyzcell(1) + xyz(xcoord,
icorner(
n))
198 xyzcell(2) = xyzcell(2) + xyz(ycoord,
icorner(
n))
199 xyzcell(3) = xyzcell(3) + xyz(zcoord,
icorner(
n))
201 xyzcell(1) = 0.125_rfreal*xyzcell(1)
202 xyzcell(2) = 0.125_rfreal*xyzcell(2)
203 xyzcell(3) = 0.125_rfreal*xyzcell(3)
208 ywaves =
sin( nywav*yscale*twopi )
209 fy = ampl*(lambda*yscale)**2/ &
210 (1._rfreal + (lambda*yscale)**4)
213 cv(cv_mixt_xmom,ijkc) = cv(cv_mixt_xmom,ijkc) + &
214 cv(cv_mixt_dens,ijkc)*umax* &
215 ( fy*
sin( nxwav*xyzcell(1)/extn*twopi )+ &
216 fy*
cos( nzwav*xyzcell(3)/span*twopi ) )
224 yscale = xyzcell(2)/
delta
225 ywaves =
sin( nywav/2*yscale*twopi )
227 fy = ampl*(lambda*yscale)**2/ &
228 (1._rfreal + (lambda*yscale)**4)
231 cv(cv_mixt_ymom,ijkc) = cv(cv_mixt_ymom,ijkc) + &
232 cv(cv_mixt_dens,ijkc)*umax* &
233 ( fy*
cos( nxwav*xyzcell(1)/extn*twopi )+ &
234 fy*
cos( nzwav*xyzcell(3)/span*twopi ) )
244 region%periInput%meanPgrad = global%moduleVar(1)
245 write(*,*) region%procId,
' channel MeanPgrad ', 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
subroutine peri_cocnlinitsolution(region)
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
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)
**********************************************************************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 icorner
**********************************************************************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)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)