Coverage for backend/ahuora-compounds/ahuora_property_packages/combustion/biomass_builder.py: 27%

14 statements  

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

1from .biomass_combustion_rp import BMCombReactionParameterBlock 

2from .biomass_comb_pp import configuration 

3from idaes.models.properties.modular_properties import GenericParameterBlock 

4from typing import List 

5 

6def build_biomass_and_flue_package(compound_list: List[str]): 

7 

8 # Validate compound list 

9 

10 for compound in compound_list: 

11 if compound not in ["biomass", "water", "carbon dioxide", "oxygen", "carbon monoxide", "nitrogen", "ash"]: 

12 raise ValueError(f"Compound {compound} is not valid for biomass and flue package.") 

13 

14 return GenericParameterBlock(**configuration) 

15 

16 

17def build_biomass_combustion_reaction_package(compound_list: List[str], pp=None): 

18 

19 # Validate compound list 

20 

21 for compound in compound_list: 

22 if compound not in ["biomass", "water", "carbon dioxide", "oxygen", "carbon monoxide", "nitrogen"]: 

23 raise ValueError(f"Compound {compound} is not valid for biomass combustion reaction package.") 

24 

25 return BMCombReactionParameterBlock( 

26 property_package=pp 

27 )