71 INTEGER,
INTENT(IN) :: ispec
72 TYPE(t_region
),
POINTER :: pregion
73 TYPE(t_patch),
POINTER :: ppatch
79 CHARACTER(CHRLEN) :: rcsidentstring
80 INTEGER :: bctype,c1,ifl
81 REAL(RFREAL) :: flx,gx,gy,gz,nx,ny,nz,nm,sd1x,sd1y,sd1z,sdf,taucoef
82 REAL(RFREAL),
DIMENSION(:),
POINTER :: pmfmixt
83 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: psd,pcvspec,ptvmixt,rhsmixt,rhsspec
85 TYPE(t_grid),
POINTER :: pgrid
91 rcsidentstring =
'$RCSfile: SPEC_EqEulCorrPatch.F90,v $ $Revision: 1.6 $'
93 global => pregion%global
96 'SPEC_EqEulCorrPatch.F90')
102 pgrid => pregion%grid
103 pmfmixt => ppatch%mfMixt
105 psd => pregion%mixt%sd
106 pcvspec => pregion%spec%cv
107 ptvmixt => pregion%mixt%tv
108 rhsmixt => pregion%mixt%rhs
109 rhsspec => pregion%spec%rhs
111 bctype = ppatch%bcType
113 taucoef = pregion%specInput%specType(ispec)%tauCoefficient
119 IF ( pregion%specInput%specType(ispec)%discreteFlag .EQV. .false. )
THEN
120 CALL
errorstop(global,err_illegal_value,__line__)
123 IF ( pregion%specInput%specType(ispec)%velocityMethod /= &
124 spec_methv_eqeul )
THEN
125 CALL
errorstop(global,err_illegal_value,__line__)
128 IF ( taucoef <= 0.0_rfreal )
THEN
129 CALL
errorstop(global,err_illegal_value,__line__)
132 IF ( pregion%mixtInput%indSd /= 1 )
THEN
133 CALL
errorstop(global,err_illegal_value,__line__)
136 IF ( pregion%mixt%cvState /= cv_mixt_state_cons )
THEN
137 CALL
errorstop(global,err_cv_state_invalid,__line__)
144 IF ( (global%accelOn .EQV. .true.) .AND. &
145 (pregion%specInput%specType(ispec)%settlingFlag .EQV. .true.) )
THEN
159 SELECT CASE ( bctype )
165 CASE ( bc_inflow_totang,bc_inflow_veltemp )
172 DO ifl = 1,ppatch%nBFaces
173 c1 = ppatch%bf2c(ifl)
175 nx = ppatch%fn(xcoord,ifl)
176 ny = ppatch%fn(ycoord,ifl)
177 nz = ppatch%fn(zcoord,ifl)
178 nm = ppatch%fn(xyzmag,ifl)
180 sd1x = psd(sd_xmom,c1)
181 sd1y = psd(sd_ymom,c1)
182 sd1z = psd(sd_zmom,c1)
184 sdf = ((sd1x-gx)*nx + (sd1y-gy)*ny + (sd1z-gz)*nz)/ptvmixt(tv_mixt_muel,c1)
186 flx = -taucoef*sdf*pcvspec(ispec,c1)*nm
188 rhsspec(ispec,c1) = rhsspec(ispec,c1) + flx
190 rhsmixt(cv_mixt_dens,c1) = rhsmixt(cv_mixt_dens,c1) + flx
203 CASE ( bc_noslipwall_hflux,bc_noslipwall_temp )
210 DO ifl = 1,ppatch%nBFaces
211 c1 = ppatch%bf2c(ifl)
213 IF ( pmfmixt(ifl) > 0.0_rfreal )
THEN
214 nx = ppatch%fn(xcoord,ifl)
215 ny = ppatch%fn(ycoord,ifl)
216 nz = ppatch%fn(zcoord,ifl)
217 nm = ppatch%fn(xyzmag,ifl)
219 sd1x = psd(sd_xmom,c1)
220 sd1y = psd(sd_ymom,c1)
221 sd1z = psd(sd_zmom,c1)
223 sdf = ((sd1x-gx)*nx + (sd1y-gy)*ny + (sd1z-gz)*nz)/ptvmixt(tv_mixt_muel,c1)
225 flx = -taucoef*sdf*pcvspec(ispec,c1)*nm
227 rhsspec(ispec,c1) = rhsspec(ispec,c1) + flx
229 rhsmixt(cv_mixt_dens,c1) = rhsmixt(cv_mixt_dens,c1) + flx
237 CASE ( bc_injection )
250 CALL
errorstop(global,err_reached_default,__line__)
subroutine registerfunction(global, funName, fileName)
subroutine spec_eqeulcorrpatch(pRegion, pPatch, iSpec)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)