71 INTEGER,
INTENT(IN) :: ispec
72 TYPE(t_region
),
POINTER :: pregion
78 CHARACTER(CHRLEN) :: rcsidentstring
79 INTEGER :: icg,ispeceev
80 REAL(RFREAL) :: gx,gy,gz,irg,tau,taucoef,tee,tg,ug,uee,vg,vee,wg,wee
81 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcvg,pdvg,psd,ptvg
82 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: peev
84 TYPE(t_grid),
POINTER :: pgrid
91 rcsidentstring =
'$RCSfile: SPEC_RFLU_SetEEv.F90,v $ $Revision: 1.5 $'
93 global => pregion%global
96 'SPEC_RFLU_SetEEv.F90')
102 pgrid => pregion%grid
103 psd => pregion%mixt%sd
104 pcvg => pregion%mixt%cv
105 pdvg => pregion%mixt%dv
106 ptvg => pregion%mixt%tv
107 peev => pregion%spec%eev
109 pspectype => pregion%specInput%specType(ispec)
111 taucoef = pspectype%tauCoefficient
112 ispeceev = pspectype%iSpec2iSpecEEv
118 IF ( pspectype%discreteFlag .EQV. .false. )
THEN
119 CALL
errorstop(global,err_illegal_value,__line__)
122 IF ( pspectype%velocityMethod /= spec_methv_eqeul )
THEN
123 CALL
errorstop(global,err_illegal_value,__line__)
126 IF ( taucoef <= 0.0_rfreal )
THEN
127 CALL
errorstop(global,err_illegal_value,__line__)
130 IF ( pregion%mixtInput%indSd /= 1 )
THEN
131 CALL
errorstop(global,err_illegal_value,__line__)
134 IF ( pregion%mixt%cvState /= cv_mixt_state_cons )
THEN
135 CALL
errorstop(global,err_cv_state_invalid,__line__)
142 IF ( pspectype%settlingFlag .EQV. .true. )
THEN
143 IF ( global%accelOn .EQV. .true. )
THEN
162 DO icg = 1,pgrid%nCellsTot
163 irg = 1.0_rfreal/pcvg(cv_mixt_dens,icg)
164 ug = irg*pcvg(cv_mixt_xmom,icg)
165 vg = irg*pcvg(cv_mixt_ymom,icg)
166 wg = irg*pcvg(cv_mixt_zmom,icg)
167 tg = pdvg(dv_mixt_temp,icg)
169 tau = taucoef/ptvg(tv_mixt_muel,icg)
171 uee = ug - tau*(psd(sd_xmom,icg) - gx)
172 vee = vg - tau*(psd(sd_ymom,icg) - gy)
173 wee = wg - tau*(psd(sd_zmom,icg) - gz)
177 peev(eev_spec_xvel,ispeceev,icg) = uee
178 peev(eev_spec_yvel,ispeceev,icg) = vee
179 peev(eev_spec_zvel,ispeceev,icg) = wee
180 peev(eev_spec_temp,ispeceev,icg) = tee
subroutine registerfunction(global, funName, fileName)
subroutine spec_rflu_seteev(pRegion, iSpec)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)