73 INTEGER,
INTENT(IN) :: icgbeg,icgend
74 TYPE(t_region
),
POINTER :: pregion
80 CHARACTER(CHRLEN) :: rcsidentstring
81 INTEGER :: icg,indcp,indmol
82 REAL(RFREAL) :: cpgasref,gc,ggas,ggasref
83 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv,pgv
88 REAL(RFREAL) :: cp,gcg,gcm,imm,immg,mmg,phip,
r,yg,yi
89 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcvspec
97 rcsidentstring =
'$RCSfile: RFLU_SetGasVars.F90,v $ $Revision: 1.10 $'
99 global => pregion%global
102 'RFLU_SetGasVars.F90')
108 pcv => pregion%mixt%cv
109 pgv => pregion%mixt%gv
112 pcvspec => pregion%spec%cv
115 indcp = pregion%mixtInput%indCp
116 indmol = pregion%mixtInput%indMol
118 cpgasref = global%refCp
119 ggasref = global%refGamma
125 SELECT CASE ( pregion%mixtInput%fluidModel )
131 CASE ( fluid_model_incomp )
137 CASE ( fluid_model_comp )
138 SELECT CASE ( pregion%mixtInput%gasModel )
144 CASE ( gas_model_tcperf )
147 DO icg = icgbeg,icgend
149 pgv(gv_mixt_cp ,icg*indcp ) = cpgasref
156 CASE ( gas_model_mixt_tcperf )
158 IF ( pregion%spec%cvState /= cv_mixt_state_prim )
THEN
159 CALL
errorstop(global,err_cv_state_invalid,__line__)
162 DO icg = icgbeg,icgend
166 DO ispec = 1,pregion%specInput%nSpecies
167 pspectype => pregion%specInput%specType(ispec)
169 imm = imm + pcvspec(ispec,icg)/pspectype%pMaterial%molw
170 cp = cp + pcvspec(ispec,icg)*pspectype%pMaterial%spht
173 pgv(gv_mixt_mol,icg) = 1.0_rfreal/imm
174 pgv(gv_mixt_cp ,icg) = cp
177 CALL
errorstop(global,err_reached_default,__line__)
185 CASE ( gas_model_mixt_pseudo )
187 IF ( pregion%spec%cvState /= cv_mixt_state_prim )
THEN
188 CALL
errorstop(global,err_cv_state_invalid,__line__)
191 DO icg = icgbeg,icgend
192 r = pcv(cv_mixt_dens,icg)
199 DO ispec = 1,pregion%specInput%nSpecies
200 pspectype => pregion%specInput%specType(ispec)
202 yi = pcvspec(ispec,icg)
204 cp = cp + yi*pspectype%pMaterial%spht
206 IF ( pspectype%discreteFlag .EQV. .true. )
THEN
207 phip = phip +
r*yi/pspectype%pMaterial%dens
209 immg = immg + yi/pspectype%pMaterial%molw
219 pgv(gv_mixt_cp ,icg) = cp
222 CALL
errorstop(global,err_reached_default,__line__)
229 CASE ( gas_model_mixt_gasliq )
231 IF ( pregion%spec%cvState /= cv_mixt_state_prim )
THEN
232 CALL
errorstop(global,err_cv_state_invalid,__line__)
235 DO icg = icgbeg,icgend
236 pgv(gv_mixt_mol,icg*indmol) = &
237 pregion%specInput%specType(1)%pMaterial%molw
238 pgv(gv_mixt_cp ,icg*indcp ) = &
239 pregion%specInput%specType(1)%pMaterial%spht
243 CALL
errorstop(global,err_reached_default,__line__)
251 CALL
errorstop(global,err_reached_default,__line__)
259 CALL
errorstop(global,err_reached_default,__line__)
real(rfreal) function mixtperf_r_m(M)
subroutine registerfunction(global, funName, fileName)
real(rfreal) function mixtperf_r_cpg(Cp, G)
real(rfreal) function mixtperf_m_r(R)
subroutine rflu_setgasvars(pRegion, icgBeg, icgEnd)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)