Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | FuelSupplyNum | |||
logical, | intent(inout) | :: | ErrorsFound |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE SetupFuelConstituentData(FuelSupplyNum, ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR B Griffith
! DATE WRITTEN Aug 2005,
! MODIFIED na
! RE-ENGINEERED July/Aug 2006, extracted to own module. added liquid fuel option
! PURPOSE OF THIS SUBROUTINE:
! Fill data structure for gas phase thermochemistry
! METHODOLOGY EMPLOYED:
! Hardcoded data from NIST is filled into data structure one time only
! REFERENCES:
! na
! USE STATEMENTS:
! na
USE InputProcessor, ONLY: FindItemInList, FindItem
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, Intent(IN) :: FuelSupplyNum
LOGICAL, INTENT(INOUT) :: ErrorsFound
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumHardCodedConstituents !number of gases included in data
REAL(r64) :: LHVfuel ! lower heating value of fuel, working var
REAL(r64) :: HHVfuel ! higher heating value of fuel, working var
REAL(r64) :: O2Stoic ! stochiometric oxygen coef in chemical equation (15)
REAL(r64) :: CO2ProdStoic ! product gases carbon dioxide coeff
REAL(r64) :: H20ProdStoic ! product gases water coeff
INTEGER :: i ! loop index
Character(Len=maxnamelength) :: thisName ! working string var
INTEGER :: thisGasID ! working index in Gas phase data structure
INTEGER :: CO2dataID ! hard wired to CO2 index in gas data struct
INTEGER :: WaterDataID ! hard wired to Water index in gas data struct
REAL(r64) :: LHVi !working var for lower heating value calc
REAL(r64) :: HHVi !working var for higher heating value calc
! INTEGER :: thisConstituent
REAL(r64) :: MWfuel
!unused REAL(r64) :: DelfHfuel
!unused REAL(r64) :: h_i
!unused REAL(r64) :: LHV
NumHardCodedConstituents = 14
IF (.NOT. ALLOCATED(GasPhaseThermoChemistryData)) THEN
ALLOCATE(GasPhaseThermoChemistryData(NumHardCodedConstituents))
endif
! Carbon Dioxide (CO2) Temp K 298-1200 (Chase 1998)
GasPhaseThermoChemistryData(1)%ConstituentName = 'CarbonDioxide'
GasPhaseThermoChemistryData(1)%ConstituentFormula = 'CO2'
GasPhaseThermoChemistryData(1)%StdRefMolarEnthOfForm = -393.5224d0 !KJ/mol
GasPhaseThermoChemistryData(1)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(1)%ShomateA = 24.99735d0
GasPhaseThermoChemistryData(1)%ShomateB = 55.18696d0
GasPhaseThermoChemistryData(1)%ShomateC = -33.69137d0
GasPhaseThermoChemistryData(1)%ShomateD = 7.948387d0
GasPhaseThermoChemistryData(1)%ShomateE = -0.136638d0
GasPhaseThermoChemistryData(1)%ShomateF = -403.6075d0
GasPhaseThermoChemistryData(1)%ShomateG = 228.2431d0
GasPhaseThermoChemistryData(1)%ShomateH = -393.5224d0
GasPhaseThermoChemistryData(1)%NumCarbons = 1.0d0
GasPhaseThermoChemistryData(1)%NumHydrogens = 0.0d0
GasPhaseThermoChemistryData(1)%NumOxygens = 2.0d0
GasPhaseThermoChemistryData(1)%MolecularWeight = 44.01d0
! Nitrogen (N2) Temp (K) 298-6000
GasPhaseThermoChemistryData(2)%ConstituentName = 'Nitrogen'
GasPhaseThermoChemistryData(2)%ConstituentFormula = 'N2'
GasPhaseThermoChemistryData(2)%StdRefMolarEnthOfForm = 0.0d0 !
GasPhaseThermoChemistryData(2)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(2)%ShomateA = 26.092d0
GasPhaseThermoChemistryData(2)%ShomateB = 8.218801d0
GasPhaseThermoChemistryData(2)%ShomateC = -1.976141d0
GasPhaseThermoChemistryData(2)%ShomateD = 0.159274d0
GasPhaseThermoChemistryData(2)%ShomateE = 0.044434d0
GasPhaseThermoChemistryData(2)%ShomateF = -7.98923d0
GasPhaseThermoChemistryData(2)%ShomateG = 221.02d0
GasPhaseThermoChemistryData(2)%ShomateH = 0.000d0
GasPhaseThermoChemistryData(2)%NumCarbons = 0.0d0
GasPhaseThermoChemistryData(2)%NumHydrogens = 0.0d0
GasPhaseThermoChemistryData(2)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(2)%MolecularWeight = 28.01d0
! Oxygen (O2) Temp (K) 298-6000
GasPhaseThermoChemistryData(3)%ConstituentName = 'Oxygen'
GasPhaseThermoChemistryData(3)%ConstituentFormula = 'O2'
GasPhaseThermoChemistryData(3)%StdRefMolarEnthOfForm = 0.0d0
GasPhaseThermoChemistryData(3)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(3)%ShomateA = 29.659d0
GasPhaseThermoChemistryData(3)%ShomateB = 6.137261d0
GasPhaseThermoChemistryData(3)%ShomateC = -1.186521d0
GasPhaseThermoChemistryData(3)%ShomateD = 0.095780d0
GasPhaseThermoChemistryData(3)%ShomateE = -0.219663d0
GasPhaseThermoChemistryData(3)%ShomateF = -9.861391d0
GasPhaseThermoChemistryData(3)%ShomateG = 237.948d0
GasPhaseThermoChemistryData(3)%ShomateH = 0.0d0
GasPhaseThermoChemistryData(3)%NumCarbons = 0.0d0
GasPhaseThermoChemistryData(3)%NumHydrogens = 0.0d0
GasPhaseThermoChemistryData(3)%NumOxygens = 2.0d0
GasPhaseThermoChemistryData(3)%MolecularWeight = 32.00d0
! Water (H2O) Temp K 300-1700
! need lower temperature range for Shomate coef for Water Vapor..
GasPhaseThermoChemistryData(4)%ConstituentName = 'Water'
GasPhaseThermoChemistryData(4)%ConstituentFormula = 'H2O'
GasPhaseThermoChemistryData(4)%StdRefMolarEnthOfForm = -241.8264d0 !KJ/mol
GasPhaseThermoChemistryData(4)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(4)%ShomateA = 29.0373d0
GasPhaseThermoChemistryData(4)%ShomateB = 10.2573d0
GasPhaseThermoChemistryData(4)%ShomateC = 2.81048d0
GasPhaseThermoChemistryData(4)%ShomateD = -0.95914d0
GasPhaseThermoChemistryData(4)%ShomateE = 0.11725d0
GasPhaseThermoChemistryData(4)%ShomateF = -250.569d0
GasPhaseThermoChemistryData(4)%ShomateG = 223.3967d0
GasPhaseThermoChemistryData(4)%ShomateH = -241.8264d0
GasPhaseThermoChemistryData(4)%NumCarbons = 0.0d0
GasPhaseThermoChemistryData(4)%NumHydrogens = 2.0d0
GasPhaseThermoChemistryData(4)%NumOxygens = 1.0d0
GasPhaseThermoChemistryData(4)%MolecularWeight = 18.02d0
! Argon (Ar) Temp K 298-600
GasPhaseThermoChemistryData(5)%ConstituentName = 'Argon'
GasPhaseThermoChemistryData(5)%ConstituentFormula = 'Ar'
GasPhaseThermoChemistryData(5)%StdRefMolarEnthOfForm = 0.0d0
GasPhaseThermoChemistryData(5)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(5)%ShomateA = 20.786d0
GasPhaseThermoChemistryData(5)%ShomateB = 2.825911d-07
GasPhaseThermoChemistryData(5)%ShomateC = -1.464191d-07
GasPhaseThermoChemistryData(5)%ShomateD = 1.092131d-08
GasPhaseThermoChemistryData(5)%ShomateE = -3.661371d-08
GasPhaseThermoChemistryData(5)%ShomateF = -6.19735d0
GasPhaseThermoChemistryData(5)%ShomateG = 179.999d0
GasPhaseThermoChemistryData(5)%ShomateH = 0.0d0
GasPhaseThermoChemistryData(5)%NumCarbons = 0.0d0
GasPhaseThermoChemistryData(5)%NumHydrogens = 0.0d0
GasPhaseThermoChemistryData(5)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(5)%MolecularWeight = 39.95d0
! Hydrogen (H2) Temp K 298-1000
GasPhaseThermoChemistryData(6)%ConstituentName = 'Hydrogen'
GasPhaseThermoChemistryData(6)%ConstituentFormula = 'H2'
GasPhaseThermoChemistryData(6)%StdRefMolarEnthOfForm = 0.0d0
GasPhaseThermoChemistryData(6)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(6)%ShomateA = 33.066178d0
GasPhaseThermoChemistryData(6)%ShomateB = -11.363417d0
GasPhaseThermoChemistryData(6)%ShomateC = 11.432816d0
GasPhaseThermoChemistryData(6)%ShomateD = -2.772874d0
GasPhaseThermoChemistryData(6)%ShomateE = -0.158558d0
GasPhaseThermoChemistryData(6)%ShomateF = -9.980797d0
GasPhaseThermoChemistryData(6)%ShomateG = 172.707974d0
GasPhaseThermoChemistryData(6)%ShomateH = 0.0d0
GasPhaseThermoChemistryData(6)%NumCarbons = 0.0d0
GasPhaseThermoChemistryData(6)%NumHydrogens = 2.0d0
GasPhaseThermoChemistryData(6)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(6)%MolecularWeight = 2.02d0
! Methane (CH4) Temp K 298-1300
GasPhaseThermoChemistryData(7)%ConstituentName = 'Methane'
GasPhaseThermoChemistryData(7)%ConstituentFormula = 'CH4'
GasPhaseThermoChemistryData(7)%StdRefMolarEnthOfForm = -74.8731d0 !KJ/mol (Chase 1998)
GasPhaseThermoChemistryData(7)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(7)%ShomateA = -0.703029d0
GasPhaseThermoChemistryData(7)%ShomateB = 108.4773d0
GasPhaseThermoChemistryData(7)%ShomateC = -42.52157d0
GasPhaseThermoChemistryData(7)%ShomateD = 5.862788d0
GasPhaseThermoChemistryData(7)%ShomateE = 0.678565d0
GasPhaseThermoChemistryData(7)%ShomateF = -76.84376d0
GasPhaseThermoChemistryData(7)%ShomateG = 158.7163d0
GasPhaseThermoChemistryData(7)%ShomateH = -74.87310d0
GasPhaseThermoChemistryData(7)%NumCarbons = 1.0d0
GasPhaseThermoChemistryData(7)%NumHydrogens = 4.0d0
GasPhaseThermoChemistryData(7)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(7)%MolecularWeight = 16.04d0
! Ethane (C2H6)
GasPhaseThermoChemistryData(8)%ConstituentName = 'Ethane'
GasPhaseThermoChemistryData(8)%ConstituentFormula = 'C2H6'
GasPhaseThermoChemistryData(8)%StdRefMolarEnthOfForm = -83.8605d0 ! -83.8 !KJ/mol (Pittam and Pilcher 1972)
GasPhaseThermoChemistryData(8)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(8)%ShomateA = -3.03849d0
GasPhaseThermoChemistryData(8)%ShomateB = 199.202d0
GasPhaseThermoChemistryData(8)%ShomateC = -84.9812d0
GasPhaseThermoChemistryData(8)%ShomateD = 11.0348d0
GasPhaseThermoChemistryData(8)%ShomateE = 0.30348d0
GasPhaseThermoChemistryData(8)%ShomateF = -90.0633d0
GasPhaseThermoChemistryData(8)%ShomateG = -999.d0
GasPhaseThermoChemistryData(8)%ShomateH = -83.8605d0
GasPhaseThermoChemistryData(8)%NumCarbons = 2.0d0
GasPhaseThermoChemistryData(8)%NumHydrogens = 6.0d0
GasPhaseThermoChemistryData(8)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(8)%MolecularWeight = 30.07d0
GasPhaseThermoChemistryData(8)%NASA_A1 = 0.14625388d+01
GasPhaseThermoChemistryData(8)%NASA_A2 = 0.15494667d-01
GasPhaseThermoChemistryData(8)%NASA_A3 = 0.05780507d-04
GasPhaseThermoChemistryData(8)%NASA_A4 = -0.12578319d-07
GasPhaseThermoChemistryData(8)%NASA_A5 = 0.04586267d-10
GasPhaseThermoChemistryData(8)%NASA_A6 = -0.11239176d+05
GasPhaseThermoChemistryData(8)%NASA_A7 = 0.14432295d+02
! Propane (C3H8)
GasPhaseThermoChemistryData(9)%ConstituentName = 'Propane'
GasPhaseThermoChemistryData(9)%ConstituentFormula = 'C3H8'
GasPhaseThermoChemistryData(9)%StdRefMolarEnthOfForm = -103.855d0 ! -104.7 !kJ/mol (Pittam and Pilcher 1972)
GasPhaseThermoChemistryData(9)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(9)%ShomateA = -23.1747d0
GasPhaseThermoChemistryData(9)%ShomateB = 363.742d0
GasPhaseThermoChemistryData(9)%ShomateC = -222.981d0
GasPhaseThermoChemistryData(9)%ShomateD = 56.253d0
GasPhaseThermoChemistryData(9)%ShomateE = 0.61164d0
GasPhaseThermoChemistryData(9)%ShomateF = -109.206d0
GasPhaseThermoChemistryData(9)%ShomateG = -999.d0
GasPhaseThermoChemistryData(9)%ShomateH = -103.855d0
GasPhaseThermoChemistryData(9)%NumCarbons = 3.0d0
GasPhaseThermoChemistryData(9)%NumHydrogens = 8.0d0
GasPhaseThermoChemistryData(9)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(9)%MolecularWeight = 44.10d0
GasPhaseThermoChemistryData(9)%NASA_A1 = 0.08969208d+01
GasPhaseThermoChemistryData(9)%NASA_A2 = 0.02668986d+00
GasPhaseThermoChemistryData(9)%NASA_A3 = 0.05431425d-04
GasPhaseThermoChemistryData(9)%NASA_A4 = -0.02126000d-06
GasPhaseThermoChemistryData(9)%NASA_A5 = 0.09243330d-10
GasPhaseThermoChemistryData(9)%NASA_A6 = -0.13954918d+05
GasPhaseThermoChemistryData(9)%NASA_A7 = 0.01935533d+03
! Butane (C4H10)
GasPhaseThermoChemistryData(10)%ConstituentName = 'Butane'
GasPhaseThermoChemistryData(10)%ConstituentFormula = 'C4H10'
GasPhaseThermoChemistryData(10)%StdRefMolarEnthOfForm = -133.218d0 ! -125.6 !kJ/mol (Pittam and Pilcher 1972)
GasPhaseThermoChemistryData(10)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(10)%ShomateA = -5.24343d0
GasPhaseThermoChemistryData(10)%ShomateB = 426.442d0
GasPhaseThermoChemistryData(10)%ShomateC = -257.955d0
GasPhaseThermoChemistryData(10)%ShomateD = 66.535d0
GasPhaseThermoChemistryData(10)%ShomateE = -0.26994d0
GasPhaseThermoChemistryData(10)%ShomateF = -149.365d0
GasPhaseThermoChemistryData(10)%ShomateG = -999.d0
GasPhaseThermoChemistryData(10)%ShomateH = -133.218d0
GasPhaseThermoChemistryData(10)%NumCarbons = 4.0d0
GasPhaseThermoChemistryData(10)%NumHydrogens = 10.0d0
GasPhaseThermoChemistryData(10)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(10)%MolecularWeight = 58.12d0
GasPhaseThermoChemistryData(10)%NASA_A1 = -0.02256618d+02
GasPhaseThermoChemistryData(10)%NASA_A2 = 0.05881732d+00
GasPhaseThermoChemistryData(10)%NASA_A3 = -0.04525782d-03
GasPhaseThermoChemistryData(10)%NASA_A4 = 0.02037115d-06
GasPhaseThermoChemistryData(10)%NASA_A5 = -0.04079458d-10
GasPhaseThermoChemistryData(10)%NASA_A6 = -0.01760233d+06
GasPhaseThermoChemistryData(10)%NASA_A7 = 0.03329595d+03
! Pentane (C5H12)
GasPhaseThermoChemistryData(11)%ConstituentName = 'Pentane'
GasPhaseThermoChemistryData(11)%ConstituentFormula = 'C5H12'
GasPhaseThermoChemistryData(11)%StdRefMolarEnthOfForm = -146.348d0 ! -146.8 !kJ/mol (Good 1970)
GasPhaseThermoChemistryData(11)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(11)%ShomateA = -34.9431d0
GasPhaseThermoChemistryData(11)%ShomateB = 576.777d0
GasPhaseThermoChemistryData(11)%ShomateC = -338.353d0
GasPhaseThermoChemistryData(11)%ShomateD = 76.8232d0
GasPhaseThermoChemistryData(11)%ShomateE = 1.00948d0
GasPhaseThermoChemistryData(11)%ShomateF = -155.348d0
GasPhaseThermoChemistryData(11)%ShomateG = -999.d0
GasPhaseThermoChemistryData(11)%ShomateH = -146.348d0
GasPhaseThermoChemistryData(11)%NumCarbons = 5.0d0
GasPhaseThermoChemistryData(11)%NumHydrogens = 12.0d0
GasPhaseThermoChemistryData(11)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(11)%MolecularWeight = 72.15d0
GasPhaseThermoChemistryData(11)%NASA_A1 = 0.01877907d+02
GasPhaseThermoChemistryData(11)%NASA_A2 = 0.04121645d+00
GasPhaseThermoChemistryData(11)%NASA_A3 = 0.12532337d-04
GasPhaseThermoChemistryData(11)%NASA_A4 = -0.03701536d-06
GasPhaseThermoChemistryData(11)%NASA_A5 = 0.15255685d-10
GasPhaseThermoChemistryData(11)%NASA_A6 = -0.02003815d+06
GasPhaseThermoChemistryData(11)%NASA_A7 = 0.01877256d+03
! Hexane (C6H14)
GasPhaseThermoChemistryData(12)%ConstituentName = 'Hexane'
GasPhaseThermoChemistryData(12)%ConstituentFormula = 'C6H14'
GasPhaseThermoChemistryData(12)%StdRefMolarEnthOfForm = -166.966d0 ! -167.2 !kJ/mol (Prosen and Rossini 1945)
GasPhaseThermoChemistryData(12)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(12)%ShomateA = -46.7786d0
GasPhaseThermoChemistryData(12)%ShomateB = 711.187d0
GasPhaseThermoChemistryData(12)%ShomateC = -438.39d0
GasPhaseThermoChemistryData(12)%ShomateD = 103.784d0
GasPhaseThermoChemistryData(12)%ShomateE = 1.23887d0
GasPhaseThermoChemistryData(12)%ShomateF = -176.813d0
GasPhaseThermoChemistryData(12)%ShomateG = -999.d0
GasPhaseThermoChemistryData(12)%ShomateH = -166.966d0
GasPhaseThermoChemistryData(12)%NumCarbons = 6.0d0
GasPhaseThermoChemistryData(12)%NumHydrogens = 14.0d0
GasPhaseThermoChemistryData(12)%NumOxygens = 0.0d0
GasPhaseThermoChemistryData(12)%MolecularWeight = 86.18d0
GasPhaseThermoChemistryData(12)%NASA_A1 = 0.01836174d+02
GasPhaseThermoChemistryData(12)%NASA_A2 = 0.05098461d+00
GasPhaseThermoChemistryData(12)%NASA_A3 = 0.12595857d-04
GasPhaseThermoChemistryData(12)%NASA_A4 = -0.04428362d-06
GasPhaseThermoChemistryData(12)%NASA_A5 = 0.01872237d-09
GasPhaseThermoChemistryData(12)%NASA_A6 = -0.02292749d+06
GasPhaseThermoChemistryData(12)%NASA_A7 = 0.02088145d+03
! Methanol (CH3OH)
! No Shomate coefficients???
GasPhaseThermoChemistryData(13)%ConstituentName = 'Methanol'
GasPhaseThermoChemistryData(13)%ConstituentFormula = 'CH3OH'
GasPhaseThermoChemistryData(13)%StdRefMolarEnthOfForm = -201.102d0 ! -201.0 !kJ/mol (Hine and Arata 1976)
GasPhaseThermoChemistryData(13)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(13)%ShomateA = 14.1952d0
GasPhaseThermoChemistryData(13)%ShomateB = 97.7218d0
GasPhaseThermoChemistryData(13)%ShomateC = -9.73279d0
GasPhaseThermoChemistryData(13)%ShomateD = -12.8461d0
GasPhaseThermoChemistryData(13)%ShomateE = 0.15819d0
GasPhaseThermoChemistryData(13)%ShomateF = -209.037d0
GasPhaseThermoChemistryData(13)%ShomateG = -999.d0
GasPhaseThermoChemistryData(13)%ShomateH = -201.102d0
GasPhaseThermoChemistryData(13)%NumCarbons = 1.0d0
GasPhaseThermoChemistryData(13)%NumHydrogens = 4.0d0
GasPhaseThermoChemistryData(13)%NumOxygens = 1.0d0
GasPhaseThermoChemistryData(13)%MolecularWeight = 32.04d0
GasPhaseThermoChemistryData(13)%NASA_A1 = 0.02660115d+02
GasPhaseThermoChemistryData(13)%NASA_A2 = 0.07341508d-01
GasPhaseThermoChemistryData(13)%NASA_A3 = 0.07170050d-04
GasPhaseThermoChemistryData(13)%NASA_A4 = -0.08793194d-07
GasPhaseThermoChemistryData(13)%NASA_A5 = 0.02390570d-10
GasPhaseThermoChemistryData(13)%NASA_A6 = -0.02535348d+06
GasPhaseThermoChemistryData(13)%NASA_A7 = 0.11232631d+02
! Ethanol (C2H5OH)
! No Shomate coefficients???
GasPhaseThermoChemistryData(14)%ConstituentName = 'Ethanol'
GasPhaseThermoChemistryData(14)%ConstituentFormula = 'C2H5OH'
GasPhaseThermoChemistryData(14)%StdRefMolarEnthOfForm = -234.441d0 ! -235.3 !kJ/mol (Green 1960)
GasPhaseThermoChemistryData(14)%ThermoMode = NISTShomate
GasPhaseThermoChemistryData(14)%ShomateA = -8.87256d0
GasPhaseThermoChemistryData(14)%ShomateB = 282.389d0
GasPhaseThermoChemistryData(14)%ShomateC = -178.85d0
GasPhaseThermoChemistryData(14)%ShomateD = 46.3528d0
GasPhaseThermoChemistryData(14)%ShomateE = 0.48364d0
GasPhaseThermoChemistryData(14)%ShomateF = -241.239d0
GasPhaseThermoChemistryData(14)%ShomateG = -999.d0
GasPhaseThermoChemistryData(14)%ShomateH = -234.441d0
GasPhaseThermoChemistryData(14)%NumCarbons = 2.0d0
GasPhaseThermoChemistryData(14)%NumHydrogens = 6.0d0
GasPhaseThermoChemistryData(14)%NumOxygens = 1.0d0
GasPhaseThermoChemistryData(14)%MolecularWeight = 46.07d0
GasPhaseThermoChemistryData(14)%NASA_A1 = 0.18461027d+01
GasPhaseThermoChemistryData(14)%NASA_A2 = 0.20475008d-01
GasPhaseThermoChemistryData(14)%NASA_A3 = 0.39904089d-05
GasPhaseThermoChemistryData(14)%NASA_A4 = -0.16585986d-07
GasPhaseThermoChemistryData(14)%NASA_A5 = 0.73090440d-11
GasPhaseThermoChemistryData(14)%NASA_A6 = -0.29663086d+05
GasPhaseThermoChemistryData(14)%NASA_A7 = 0.17289993d+02
If (FuelSupply(FuelSupplyNum)%FuelTypeMode == fuelModeGaseousConstituents) then
! now calculate LHV of fuel for entire simulation
! sum over each constituent
O2Stoic = 0.0d0
CO2ProdStoic = 0.0d0
H20ProdStoic = 0.0d0
CO2dataID = 1 !hard-coded above
WaterDataID = 4 !hard-coded above
! Loop over fuel constituents and do one-time setup
DO i=1, FuelSupply(FuelSupplyNum)%NumConstituents
thisName = FuelSupply(FuelSupplyNum)%ConstitName(i)
thisGasID = FindItem(thisName, GasPhaseThermoChemistryData%ConstituentName, NumHardCodedConstituents)
FuelSupply(FuelSupplyNum)%GasLibID(i) = thisGasID
IF (thisGasID == 0) THEN
CALL ShowSevereError('Fuel constituent not found in thermochemistry data: '//trim(thisName ))
errorsfound = .true.
ENDif
!for this fuel mixture, figure stoichiometric oxygen requirement
O2Stoic = O2Stoic + FuelSupply(FuelSupplyNum)%ConstitMolalFract(i) * &
( GasPhaseThermoChemistryData(thisGasID)%NumCarbons &
+ GasPhaseThermoChemistryData(thisGasID)%NumHydrogens / 4.0d0 &
- GasPhaseThermoChemistryData(thisGasID)%NumOxygens / 2.0d0 )
! for this fuel mixture, figure stoichiometric Carbon Dioxide in Product Gases
CO2ProdStoic = CO2ProdStoic + FuelSupply(FuelSupplyNum)%ConstitMolalFract(i) * &
GasPhaseThermoChemistryData(thisGasID)%NumCarbons
H20ProdStoic = H20ProdStoic + FuelSupply(FuelSupplyNum)%ConstitMolalFract(i) * &
GasPhaseThermoChemistryData(thisGasID)%NumHydrogens / 2.0d0
ENDDO
FuelSupply(FuelSupplyNum)%StoicOxygenRate = O2Stoic
FuelSupply(FuelSupplyNum)%CO2ProductGasCoef = CO2ProdStoic
FuelSupply(FuelSupplyNum)%H20ProductGasCoef = H20ProdStoic
!Calculate LHV for an NdotFuel of 1.0
LHVfuel = 0.0d0
DO i=1, FuelSupply(FuelSupplyNum)%NumConstituents
thisGasID = FuelSupply(FuelSupplyNum)%GasLibID(i)
IF (GasPhaseThermoChemistryData(thisGasID)%NumHydrogens == 0.0d0) THEN
LHVi = 0.0d0
ELSE
LHVi = GasPhaseThermoChemistryData(thisGasID)%StdRefMolarEnthOfForm &
- GasPhaseThermoChemistryData(thisGasID)%NumCarbons &
* GasPhaseThermoChemistryData(CO2dataID)%StdRefMolarEnthOfForm &
- (GasPhaseThermoChemistryData(thisGasID)%NumHydrogens/2.0d0) &
* GasPhaseThermoChemistryData(WaterDataID)%StdRefMolarEnthOfForm
ENDIF
LHVfuel = LHVfuel + LHVi * FuelSupply(FuelSupplyNum)%ConstitMolalFract(i)
ENDDO
FuelSupply(FuelSupplyNum)%LHV = LHVfuel
!Calculate HHV for an NdotFuel of 1.0
HHVfuel = 0.0d0
DO i=1, FuelSupply(FuelSupplyNum)%NumConstituents
thisGasID = FuelSupply(FuelSupplyNum)%GasLibID(i)
IF (GasPhaseThermoChemistryData(thisGasID)%NumHydrogens == 0.0d0) THEN
HHVi = 0.0d0
ELSE
HHVi = GasPhaseThermoChemistryData(thisGasID)%StdRefMolarEnthOfForm &
- GasPhaseThermoChemistryData(thisGasID)%NumCarbons &
* GasPhaseThermoChemistryData(CO2dataID)%StdRefMolarEnthOfForm &
- (GasPhaseThermoChemistryData(thisGasID)%NumHydrogens/2.0d0) &
* GasPhaseThermoChemistryData(WaterDataID)%StdRefMolarEnthOfForm &
+ (GasPhaseThermoChemistryData(thisGasID)%NumHydrogens/2.0d0) &
* (GasPhaseThermoChemistryData(WaterDataID)%StdRefMolarEnthOfForm + 285.8304d0)
ENDIF
HHVfuel = HHVfuel + HHVi * FuelSupply(FuelSupplyNum)%ConstitMolalFract(i)
ENDDO
!Calculate Molecular Weight for this fuel
MWfuel = 0.0d0
DO I=1, FuelSupply(FuelsupplyNum)%NumConstituents
thisGasID = FuelSupply(FuelSupplyNum)%GasLibID(i)
MWfuel = MWfuel + &
FuelSupply(FuelSupplyNum)%ConstitMolalFract(i)*GasPhaseThermoChemistryData(thisGasID)%MolecularWeight
ENDDO
FuelSupply(FuelSupplyNum)%MW = MWfuel
FuelSupply(FuelSupplyNum)%KmolPerSecToKgPerSec = MWfuel !TODO check this, guessing on conversion...
FuelSupply(FuelSupplyNum)%HHV = 1000000.0d0 * HHVfuel / MWfuel ! (1000/k) (1000/k) (kJ/mol)/(g/mol) = J/kg
FuelSupply(FuelSupplyNum)%LHVJperkg = FuelSupply(FuelSupplyNum)%LHV * 1000000.0d0 / FuelSupply(FuelSupplyNum)%MW
ELSEIF(FuelSupply(FuelSupplyNum)%FuelTypeMode == fuelModeGenericLiquid) THEN
FuelSupply(FuelSupplyNum)%LHV = FuelSupply(FuelSupplyNum)%LHVliquid &
* FuelSupply(FuelSupplyNum)%MW /1000000.0d0 ! J/kg * g/mol (k/1000) (k/10000)
ELSE
ENDIF
! report Heating Values in EIO.
WRITE(OutputFileInits, '(A)') '! <Fuel Supply>, Fuel Supply Name, Lower Heating Value [J/kmol], Lower Heating Value [kJ/kg], ' &
// 'Higher Heating Value [KJ/kg], Molecular Weight [g/mol] '
WRITE(OutputFileInits, 501) TRIM(FuelSupply(FuelSupplyNum)%Name) , FuelSupply(FuelSupplyNum)%LHV*1000000.0d0, &
FuelSupply(FuelSupplyNum)%LHVJperkg/ 1000.0d0 , FuelSupply(FuelSupplyNum)%HHV / 1000.0d0 , &
FuelSupply(FuelSupplyNum)%MW
501 FORMAT(' Fuel Supply, ', A, ',', G13.6E2, ',' , G13.6E2, ',' , G13.6E2, ',', G13.6E2)
RETURN
END SUBROUTINE SetupFuelConstituentData