Coverage for backend/ahuora-compounds/ahuora_property_packages/combustion/biomass_comb_pp.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-07-22 05:22 +0000

1""" 

2Property package for the combustion of biomass in air 

3""" 

4# Import Pyomo units 

5from pyomo.environ import units as pyunits 

6 

7# Import IDAES cores 

8from idaes.core import VaporPhase, Component, SolidPhase 

9import idaes.logger as idaeslog 

10 

11from idaes.models.properties.modular_properties.state_definitions import FTPx 

12from idaes.models.properties.modular_properties.eos.ideal import Ideal 

13from idaes.models.properties.modular_properties.pure import ConstantProperties 

14from idaes.models.properties.modular_properties.pure import NIST 

15from idaes.core import PhaseType as PT 

16 

17 

18# Set up logger 

19_log = idaeslog.getLogger(__name__) 

20 

21 

22# --------------------------------------------------------------------- 

23# Configuration dictionary for an ideal Benzene-Toluene system 

24 

25# Data Sources: 

26# [1] The Properties of Gases and Liquids (1987) 

27# 4th edition, Chemical Engineering Series - Robert C. Reid 

28# [2] Perry's Chemical Engineers' Handbook 7th Ed. 

29# [3] Engineering Toolbox, https://www.engineeringtoolbox.com 

30# Retrieved 1st December, 2019 

31#[4]NIST 

32#[5] wagner, Ewers, et al.,1976 

33#[6] Suehiro, Nakajima, et al., 1996 

34#[7] Jacobsen, Stewart, et al., 1986 

35# [8] Cardoso, 1915 

36 

37configuration = { 

38 # Specifying components 

39 "components": { 

40 # https://github.com/IDAES/idaes-pse/blob/main/idaes/models/properties/modular_properties/pure/ConstantProperties.py 

41 #constant[solid]properties (pure) 

42 # parameters: : cp_mol, enth_mol_form, entr_mol_form, dens_mol() 

43 "biomass": { 

44 "type": Component, 

45 "elemental_composition": {"C":6, "H": 10, "O": 5}, #[] cellulose composition C6,H10,O5 

46 "enth_mol_sol_comp": ConstantProperties.Constant, 

47 "cp_mol_sol_comp": ConstantProperties.Constant, 

48 

49 "dens_mol_sol_comp": ConstantProperties.Constant, 

50 'valid_phase_types': PT.solidPhase, 

51 "parameter_data": { 

52 "mw": (162.1394, pyunits.g / pyunits.mol), 

53 "cp_mol_sol_comp_coeff": (243.2091, pyunits.J/pyunits.mol/pyunits.K), 

54 "dens_mol_sol_comp_coeff": (2960.415544, pyunits.mol/pyunits.m**3), 

55 "enth_mol_form_sol_comp_ref": (0, pyunits.kJ/pyunits.mol), 

56 "enrt_mol_form_sol_comp_ref": (158.1, pyunits.J/pyunits.mol/pyunits.K) 

57 }, 

58 }, 

59 

60 "ash": { 

61 "type": Component, 

62 "elemental_composition": {"Random":1}, #mainly SiO2, Al2O3, CaO, Fe2O3, MgO 

63 "cp_mol_sol_comp": ConstantProperties.Constant, 

64 "enth_mol_sol_comp": ConstantProperties.Constant, 

65 "dens_mol_sol_comp": ConstantProperties.Constant, 

66 'valid_phase_types': PT.solidPhase, 

67 "parameter_data": { 

68 "mw": (66.37, pyunits.g / pyunits.mol), 

69 "cp_mol_sol_comp_coeff": (68.27, pyunits.J/pyunits.mol/pyunits.K), #Cp weighted average by composition of constituents 

70 "dens_mol_sol_comp_coeff": (2960.415544, pyunits.mol/pyunits.m**3), #ignore 

71 "enth_mol_form_sol_comp_ref": (0, pyunits.kJ/pyunits.mol), #ignore 

72 "enrt_mol_form_sol_comp_ref": (158.1, pyunits.J/pyunits.mol/pyunits.K) #ignoer 

73 }, 

74 }, 

75 

76 "O2": { 

77 "type": Component, 

78 "elemental_composition": {"O":2}, 

79 "enth_mol_ig_comp": NIST, 

80 "cp_mol_ig_comp": NIST, 

81 'valid_phase_types': PT.vaporPhase, 

82 "parameter_data": { 

83 "mw": (31.9988, pyunits.g / pyunits.mol), # [4] 

84 "pressure_crit": (50.43e5, pyunits.Pa), # [8] 

85 "temperature_crit": (154.58, pyunits.K), # [8] 

86 "cp_mol_ig_comp_coeff": { # valid range 100 K - 700 K 

87 # "A": (31.32234 , pyunits.J / pyunits.mol / pyunits.K), # [4] 

88 # "B": (-20.23531, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-1), 

89 # "C": (57.86644, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-2), 

90 # "D": (-36.50624, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-3), 

91 # "E": (-0.007374, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**2), 

92 # "F": (-8.903471, pyunits.kJ / pyunits.mol), 

93 # "G": (246.7945, pyunits.J / pyunits.mol /pyunits.K), 

94 # "H": (0, pyunits.kJ / pyunits.mol) 

95 "A": (30.03235 , pyunits.J / pyunits.mol / pyunits.K), # [4] #valid range 700-2000 

96 "B": (8.772972, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-1), 

97 "C": (-3.988133, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-2), 

98 "D": (0.788313, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-3), 

99 "E": (-0.741599, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**2), 

100 "F": (-11.32468, pyunits.kJ / pyunits.mol), 

101 "G": (236.1663, pyunits.J / pyunits.mol /pyunits.K), 

102 "H": (0, pyunits.kJ / pyunits.mol) 

103 }, 

104 

105 "enth_mol_form_vap_comp_ref": (0, pyunits.kJ / pyunits.mol), # [4] 

106 

107 }, 

108 }, 

109 "CO2": { 

110 "type": Component, 

111 "elemental_composition": {"O":2, "C":1}, 

112 "enth_mol_ig_comp": NIST, 

113 "cp_mol_ig_comp": NIST, 

114 'valid_phase_types': PT.vaporPhase, 

115 "parameter_data": { 

116 "mw": (44.0095, pyunits.g / pyunits.mol), # [4] 

117 "pressure_crit": (73.80e5, pyunits.Pa), # [[6] 

118 "temperature_crit": (304.18, pyunits.K), # [6] 

119 "cp_mol_ig_comp_coeff": { #valid range 298 K - 1200 K 

120 "A": (24.99735 , pyunits.J / pyunits.mol / pyunits.K), # [4] 

121 "B": (55.18696, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-1), 

122 "C": (-33.69137, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-2), 

123 "D": (7.948387, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-3), 

124 "E": (-0.136638, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**2), 

125 "F": (-403.6075, pyunits.kJ / pyunits.mol), 

126 "G": (228.2431, pyunits.J / pyunits.mol /pyunits.K), 

127 "H": (-393.5224, pyunits.kJ / pyunits.mol), 

128 }, 

129 "enth_mol_form_vap_comp_ref": (0, pyunits.kJ / pyunits.mol), # [4] 

130 

131 }, 

132 }, 

133 "CO": { 

134 "type": Component, 

135 "elemental_composition": {"O":1, "C":1}, 

136 "enth_mol_ig_comp": NIST, 

137 "cp_mol_ig_comp": NIST, 

138 'valid_phase_types': PT.vaporPhase, 

139 "parameter_data": { 

140 "mw": (28.0101, pyunits.g / pyunits.mol), # [4] 

141 "pressure_crit": (34.9875e5, pyunits.Pa), # [[6] 

142 "temperature_crit": (134.45, pyunits.K), # [6] 

143 "cp_mol_ig_comp_coeff": { #(valid range: 298-1300K) 

144 "A": (25.56759 , pyunits.J / pyunits.mol / pyunits.K), # [4]  

145 "B": (6.096130, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-1), 

146 "C": (4.054656, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-2), 

147 "D": (-2.671301 , pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-3), 

148 "E": (0.131021, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**2), 

149 "F": (-118.0089, pyunits.kJ / pyunits.mol), 

150 "G": (227.3665, pyunits.J / pyunits.mol /pyunits.K), 

151 "H": (-110.5271, pyunits.kJ / pyunits.mol), 

152 }, 

153 "enth_mol_form_vap_comp_ref": (0, pyunits.kJ / pyunits.mol), # [4] 

154 

155 }, 

156 }, 

157 "H2O": { 

158 "type": Component, 

159 "elemental_composition":{"H":2,"O":1}, 

160 "enth_mol_ig_comp": NIST, 

161 "cp_mol_ig_comp": NIST, 

162 "pressure_sat_comp": NIST, 

163 'valid_phase_types': PT.vaporPhase, 

164 "parameter_data": { 

165 "mw": (18.0153e-3, pyunits.kg / pyunits.mol), # [4] 

166 "pressure_crit": (220.64e5, pyunits.Pa), # [4] 

167 "temperature_crit": (647, pyunits.K), # [4] 

168 "cp_mol_ig_comp_coeff": { #valid range 500 K- 1700 K 

169 "A": (30.09200,pyunits.J / pyunits.mol / pyunits.K,), # [4]  

170 "B": (6.832514,pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-1,), 

171 "C": (6.793435,pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-2,), 

172 "D": (-2.534480,pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-3,), 

173 "E": (0.082139,pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**2,), 

174 "F": (-250.8810, pyunits.kJ / pyunits.mol), 

175 "G": (223.3967, pyunits.J / pyunits.mol / pyunits.K), 

176 "H": (-241.8264, pyunits.kJ / pyunits.mol), 

177 }, 

178 "enth_mol_form_vap_comp_ref": (0, pyunits.J / pyunits.mol), # [4] 

179 

180 "pressure_sat_comp_coeff": { 

181 "A": (4.6543, None), # [4], temperature range 255.9 K - 373 K 

182 "B": (1435.264, pyunits.K), 

183 "C": (-64.848, pyunits.K), 

184 }, 

185 }, 

186 }, 

187 "N2": { 

188 "type": Component, 

189 "elemental_composition": {"N":2}, 

190 "enth_mol_ig_comp": NIST, 

191 "cp_mol_ig_comp": NIST, 

192 'valid_phase_types': PT.vaporPhase, 

193 "parameter_data": { 

194 "mw": (28.0134, pyunits.g / pyunits.mol), # [4] 

195 "pressure_crit": (33.978e5, pyunits.Pa), # [[7] 

196 "temperature_crit": (126.19, pyunits.K), # [7] 

197 "cp_mol_ig_comp_coeff": { #valid range 100 K to 500 K 

198 "A": (28.98641 , pyunits.J / pyunits.mol / pyunits.K), # [4] 

199 "B": (1.853978, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-1), 

200 "C": (-9.647459 , pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-2), 

201 "D": (16.63537 , pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**-3), 

202 "E": (0.000117, pyunits.J * pyunits.mol**-1 * pyunits.K**-1 * pyunits.kiloK**2), 

203 "F": (-8.671914, pyunits.kJ / pyunits.mol), 

204 "G": (226.4168, pyunits.J / pyunits.mol /pyunits.K), 

205 "H": (0, pyunits.kJ / pyunits.mol) 

206 }, 

207 "enth_mol_form_vap_comp_ref": (0, pyunits.kJ / pyunits.mol), # [4] 

208 }, 

209 }, 

210 }, 

211 

212# Specifying phases 

213"phases": { 

214 "Vap": {"type": VaporPhase, "equation_of_state": Ideal},#Pv=nT 

215 "Sol": {"type": SolidPhase, "equation_of_state": Ideal} 

216 

217}, 

218# Set base units of measurement 

219"base_units": { 

220 "time": pyunits.s, 

221 "length": pyunits.m, 

222 "mass": pyunits.kg, 

223 "amount": pyunits.mol, 

224 "temperature": pyunits.K, 

225}, 

226# Specifying state definition 

227"state_definition": FTPx, 

228"state_bounds": { 

229 "flow_mol": (0, 100, 1000, pyunits.mol / pyunits.s), 

230 "temperature": (273.15, 300, 2500, pyunits.K), 

231 "pressure": (5e3, 1e5, 1e6, pyunits.Pa), 

232}, 

233"pressure_ref": (1e5, pyunits.Pa), 

234"temperature_ref": (300, pyunits.K), 

235 

236"include_enthalpy_of_formation":(False) 

237}