55 TYPE (t_region
) :: region
61 CHARACTER(CHRLEN) :: rcsidentstring
64 INTEGER :: ijkcr, ijkn, ijkn1
65 REAL(RFREAL),
POINTER :: xyz(:,:), cofg(:,:), cv(:,:)
66 REAL(RFREAL) :: rgas, yc, muel, refmeanpgrad,
delta
68 REAL(RFREAL) :: lambda,ampl,umax,nxwav,nywav,nzwav,span,extn,fy,yscale,ywaves
72 rcsidentstring =
'$RCSfile: PERI_coCnlInitSolutionFlu.F90,v $ $Revision: 1.5 $'
74 global => region%global
76 'PERI_coCnlInitSolutionFlu.F90' )
80 xyz => region%grid%xyz
81 cofg => region%grid%cofg
84 IF ((global%flowType==flow_unsteady .AND. &
85 global%currentTime < peri_real_small) .OR. &
86 (global%flowType==flow_steady .AND. global%currentIter==0))
THEN
90 delta = global%refLength
92 rho = global%refDensity
93 pres = global%refPressure
94 refmeanpgrad = region%periInput%meanPgrad
95 cv(cv_mixt_dens,:) = rho
96 cv(cv_mixt_ymom,:) = 0._rfreal
97 cv(cv_mixt_zmom,:) = 0._rfreal
99 DO ijkc = 1, region%grid%nCellsTot
101 yc = cofg(ycoord,ijkc)
102 cv(cv_mixt_xmom,ijkc) = -0.5_rfreal/muel*refmeanpgrad* &
105 vm =
sqrt( cv(cv_mixt_xmom,ijkc)*cv(cv_mixt_xmom,ijkc) + &
106 cv(cv_mixt_ymom,ijkc)*cv(cv_mixt_ymom,ijkc) + &
107 cv(cv_mixt_zmom,ijkc)*cv(cv_mixt_zmom,ijkc))/rho
109 cv(cv_mixt_ener,ijkc) = rho*eo
114 xmin = 100000._rfreal
115 xmax = -100000._rfreal
116 zmin = 100000._rfreal
117 zmax = -100000._rfreal
118 DO ijkv = 1,region%grid%nVertTot
127 umax = -0.5_rfreal/muel*refmeanpgrad*
delta*
delta
133 twopi = 2._rfreal*global%pi
135 DO ijkc = 1,region%grid%nCellsTot
139 xyzcell(1:3) = cofg(xcoord:zcoord,ijkc)
142 ywaves =
sin( nywav*yscale*twopi )
143 fy = ampl*(lambda*yscale)**2/ &
144 (1._rfreal + (lambda*yscale)**4)
147 cv(cv_mixt_xmom,ijkc) = cv(cv_mixt_xmom,ijkc) + &
148 cv(cv_mixt_dens,ijkc)*umax* &
149 ( fy*
sin( nxwav*xyzcell(1)/extn*twopi )+ &
150 fy*
sin( nzwav*xyzcell(3)/span*twopi ) )
151 cv(cv_mixt_zmom,ijkc) = cv(cv_mixt_zmom,ijkc) + &
152 cv(cv_mixt_dens,ijkc)*umax* &
153 ( fy*
sin( nxwav*xyzcell(1)/extn*twopi )+ &
154 fy*
sin( nzwav*xyzcell(3)/span*twopi ) )
176 region%periInput%meanPgrad = global%moduleVar(1)
177 write(*,*) global%myProcId,
' channel MeanPgrad ', region%periInput%meanPgrad
real(rfreal) function mixtperf_eo_dgpvm(D, G, P, Vm)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine peri_cocnlinitsolution(region)
subroutine registerfunction(global, funName, fileName)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine deregisterfunction(global)