BHoM / LifeCycleAssessment_Toolkit

GNU Lesser General Public License v3.0
22 stars 5 forks source link

Evaluate method fails when an IElementM has multiple materials applied with different quantity types in some cases #239

Closed enarhi closed 2 years ago

enarhi commented 3 years ago

Description:

Current code tries to run a single quantity type method on all material amounts and their corresponding epd's, but it should run the appropriate quantity type method on a per material basis.

Steps to reproduce:

Attempt to evaluate an IElementM with a material composition consisting of a mass epd and volume epd, with the volume epd containing no density fragment. A list index error will occur as the mass method looks for each mass and its corresponding density, but there are less densities than masses.

Expected behaviour:

Correct evaluation of an element accounting for each material that it is composed of.

vgreen-BH commented 2 years ago

@michaelhoehn @enarhi

This issue came up in our facades work. We are trying to run LCA for a facade opening object with aluminum frame (Volume EPD) and glazing (Area EPD). The method is currently trying to run the glazing material as a volume calculation but is getting an error because it has no width.