62 TYPE(t_region
),
POINTER :: regions(:)
68 CHARACTER(CHRLEN) :: rcsidentstring
71 TYPE(t_patch),
POINTER :: patches(:)
74 REAL(RFREAL) :: rgas, gamma, gogampls, cpreps, headpres, headtemp, headsv
75 REAL(RFREAL) :: minj,
denom, choklen,
delta, mfrat, phi, meanpgrad
78 REAL(RFREAL) :: ucubulk, skinfriction, tauwall
83 rcsidentstring =
'$RCSfile: PERI_DerivedInputValues.F90,v $'
85 global => regions(1)%global
87 'PERI_DerivedInputValues.F90' )
92 DO ireg=1,global%nRegions
94 IF (regions(ireg)%procid==global%myProcid .AND. &
95 regions(ireg)%active==active)
THEN
97 patches => regions(ireg)%levels(1)%patches(:)
100 DO ireg = lbound(regions,1),ubound(regions,1)
102 patches => regions(ireg)%patches(:)
105 input => regions(ireg)%periInput
106 IF (
input%flowKind==peri_flow_cpr)
THEN
110 input%headPres = global%refPressure
111 gamma = global%refGamma
112 rgas = global%refCp*(1._rfreal - 1._rfreal/gamma)
113 input%headTemp = global%refPressure/global%refDensity/rgas
117 gogampls = gamma / (gamma + 1._rfreal)
118 cpreps =
input%cprEpsilon
119 headpres =
input%headPres
120 headtemp =
input%headTemp
121 headsv =
sqrt( gamma*rgas*headtemp )
122 IF (patches(3)%bcType >= bc_injection .AND. &
123 patches(3)%bcType <= bc_injection+ &
125 minj = patches(3)%mixt%vals(bcdat_inject_mfrate,0)
127 CALL
errorstop( regions(ireg)%global,err_peri_cprbc,__line__, &
128 'cpr injection bc should be on patch 3 and 4' )
130 denom = headsv*minj*
sqrt( 2._rfreal*(gamma+1._rfreal) )
131 choklen = headpres*gamma/
denom
132 delta = global%refLength
133 mfrat = 1._rfreal/cpreps/choklen
134 phi =
sqrt(1._rfreal - mfrat*mfrat)
135 meanpgrad= -gogampls*mfrat/phi*headpres/(choklen*
delta)
138 meanpgrad= meanpgrad/cpreps
142 input%nVar = cpr_nvar
143 input%minjRate = minj
144 input%meanPgrad = meanpgrad
147 ELSEIF (
input%flowKind==peri_flow_channel)
THEN
155 IF (global%refRenum > cnl_critreyn)
THEN
157 ucubulk = 1.28_rfreal*(2._rfreal*global%refRenum)**(-0.0116_rfreal)
158 skinfriction = 0.073_rfreal*(2._rfreal*global%refRenum)**(-0.25_rfreal)
162 skinfriction = 6._rfreal/(global%refRenum*ucubulk*ucubulk)
166 input%cnlCvel = ucubulk*global%refVelocity
167 input%cnlUtau = global%refVelocity*(0.5_rfreal*skinfriction)**0.5_rfreal
168 tauwall = global%refDensity*
input%cnlUtau**2._rfreal
169 input%cnlRetau=
input%cnlUtau/global%refVelocity*global%refRenum
172 input%meanPgrad = -tauwall/global%refLength
173 input%bulkmFlux = 2._rfreal*global%refLength*global%refVelocity* &
177 IF (
input%pgradType == cnl_pgrad_tauwall) pgtauwall = .true.
179 ELSEIF (
input%flowKind==peri_flow_bola)
THEN
191 DO ireg=1,global%nRegions
193 IF (regions(ireg)%procid==global%myProcid .AND. &
194 regions(ireg)%active==active)
THEN
197 DO ireg = lbound(regions,1),ubound(regions,1)
200 input => regions(ireg)%periInput
201 IF (
input%flowKind==peri_flow_channel)
THEN
202 IF (pgtauwall)
input%pgradType = cnl_pgrad_tauwall
subroutine registerfunction(global, funName, fileName)
subroutine input(X, NNODE, NDC, NCELL, NFCE, NBPTS, NBFACE, ITYP, NPROP, XBNDY, XFAR, YFAR, ZFAR)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
CGAL_BEGIN_NAMESPACE void const NT NT NT NT & denom