damage categories are translated to normal impact categories by aggregating the characterization factors of a flow for the respective impact categories into a new characterization factor applying the corresponding damage factors
two LCIA methods are created in this case:
{method} - Midpoint contains the impact categories
{method} - Endpoint contains the damage categories
if the LCIA method contains damage categories, possible normalization and weighting sets are added to the {method} - Endpoint
normalization values are applied by multiplication in SimaPro but in openLCA the LCIA result is divided by the normalization value; thus we need do invert these values in the import
The import can be tested by generating test processes that contain random values for elementary flows for different compartments. openLCA should give the same results as SimaPro. The script below takes a SimaPro CSV file and generates such a process:
import java.io.File;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
import org.openlca.simapro.csv.CsvDataSet;
import org.openlca.simapro.csv.Numeric;
import org.openlca.simapro.csv.SimaProCsv;
import org.openlca.simapro.csv.enums.ElementaryFlowType;
import org.openlca.simapro.csv.enums.ProcessCategory;
import org.openlca.simapro.csv.enums.ProcessType;
import org.openlca.simapro.csv.enums.SubCompartment;
import org.openlca.simapro.csv.process.ElementaryExchangeRow;
import org.openlca.simapro.csv.process.ProcessBlock;
import org.openlca.simapro.csv.process.ProductOutputRow;
public class StepTest {
public static void main(String[] args) {
var dir = new File("C:/Users/ms/Desktop/rems/stepw");
var methodFile = "ei99_method.csv";
var subComps = new EnumMap<ElementaryFlowType, List<SubCompartment>>(
ElementaryFlowType.class);
for (var type : ElementaryFlowType.values()) {
var subs = new ArrayList<SubCompartment>();
subs.add(SubCompartment.UNSPECIFIED);
for (var subComp : SubCompartment.values()) {
if (subComp.flowType() == type) {
subs.add(subComp);
}
}
subComps.put(type, subs);
}
var method = SimaProCsv.read(new File(dir, methodFile));
var product = new ProductOutputRow()
.name("Test product")
.amount(Numeric.of(1))
.allocation(Numeric.of(100))
.unit("kg")
.wasteType("not defined")
.category("Others");
var out = new CsvDataSet();
out.header().formatVersion("7.0.0");
out.quantities().addAll(method.quantities());
out.units().addAll(method.units());
var process = new ProcessBlock()
.name("Test process")
.identifier("GreenDel000006567400002")
.processType(ProcessType.UNIT_PROCESS)
.category(ProcessCategory.MATERIAL);
process.products().add(product);
var rand = ThreadLocalRandom.current();
for (var type : ElementaryFlowType.values()) {
for (var flow : method.getElementaryFlows(type)) {
out.getElementaryFlows(type).add(flow);
var subs = subComps.get(type);
int isub = rand.nextInt(subs.size());
var exchange = new ElementaryExchangeRow()
.name(flow.name())
.subCompartment(subs.get(isub).toString())
.unit(flow.unit())
.amount(Numeric.of(rand.nextDouble()));
process.exchangesOf(type).add(exchange);
}
}
out.processes().add(process);
out.write(new File(dir, methodFile + "_process.csv"));
}
}
{method} - Midpoint
contains the impact categories{method} - Endpoint
contains the damage categories{method} - Endpoint
The import can be tested by generating test processes that contain random values for elementary flows for different compartments. openLCA should give the same results as SimaPro. The script below takes a SimaPro CSV file and generates such a process: