def test_c1_natural_gas(): params = {"Base Energy Requirement [MW]": 47} electric = EnergySection(source="NGCC w/ CCS", battery=None, params=params) print(electric.compute().values) params = {"Required Thermal Energy [GJ/tCO2]": 6.64} thermal = NgThermalSection(source="Advanced NGCC", battery=None, params=params) print(thermal.compute().values) params = {"Total Capex [$]": 1029} dac = DacSection(params=params) print(dac.compute().values) dac_all = DacModel(electric=electric, thermal=thermal, dac=dac, params=params) print(dac_all.compute().values) assert len(dac_all.compute().series) assert 220 <= dac_all.values["Total Cost [$/tCO2]"] <= 230
def test_c3_nuclear(): params = {"Base Energy Requirement [MW]": 38} electric = EnergySection(source="Advanced Nuclear", battery=None, params=params) params = {"Base Energy Requirement [MW]": 234} thermal = EnergySection(source="Advanced Nuclear", battery=None, params=params) params = {"Total Capex [$]": 936.01} dac = DacSection(params=params) dac_all = DacModel(electric=electric, thermal=thermal, dac=dac, params=params) assert len(dac_all.compute().series) assert 395 <= dac_all.values["Total Cost [$/tCO2]"] <= 405
def test_c1_natural_gas(): params = {"Base Energy Requierement [MW]": 47} electric = EnergySection("NGCC w/ CCS", battery=None, **params) params = {"Base Energy Requierement [MW]": 0} thermal = EnergySection("Advanced NGCC", battery=None, **params) params = {"Total Capex [$]": 1029} dac = DacSection(**params) dac_all = DacModel(electric, thermal, dac, **params) assert len(dac_all.compute().series) assert 220 <= dac_all.values["Total Cost [$/tCO2]"] <= 230
def test_c2_wind(): params = {"Base Energy Requirement [MW]": 38} ebattery = BatterySection(params=params) electric = EnergySection(source="Wind", battery=ebattery, params=params) params = {"Base Energy Requirement [MW]": 234} tbattery = BatterySection(params=params) thermal = EnergySection(source="Wind", battery=tbattery, params=params) params = {"Total Capex [$]": 936.01} dac = DacSection(params=params) dac_all = DacModel(electric=electric, thermal=thermal, dac=dac, params=params) assert len(dac_all.compute().series) assert 385 <= dac_all.values["Total Cost [$/tCO2]"] <= 395
def test_c2_solar(): params = {"Base Energy Requierement [MW]": 38} ebattery = BatterySection(**params) electric = EnergySection("Solar", battery=ebattery, **params) params = {"Base Energy Requierement [MW]": 234} tbattery = BatterySection(**params) thermal = EnergySection("Solar", battery=tbattery, **params) params = {"Total Capex [$]": 936.01} dac = DacSection(**params) dac_all = DacModel(electric, thermal, dac, **params) assert len(dac_all.compute().series) assert 470 <= dac_all.values["Total Cost [$/tCO2]"] <= 490
def test_renewable_models(tech, use_bat, hparams): if use_bat: ebattery = BatterySection(params=hparams) tbattery = BatterySection(params=hparams) else: ebattery = None tbattery = None electric = EnergySection(source=tech, battery=ebattery, params=hparams) thermal = EnergySection(source=tech, battery=tbattery, params=hparams) dac = DacSection(params=hparams) dac_all = DacModel(electric=electric, thermal=thermal, dac=dac, params=hparams) assert len(dac_all.compute().series) assert dac_all.values["Total Cost [$/tCO2]"] > 0
def test_ng_model(hparams): electric = EnergySection(source="NGCC w/ CCS", battery=None, params=hparams) thermal = NgThermalSection(source="Advanced NGCC", battery=None, params=hparams) dac = DacSection(params=hparams) dac_all = DacModel(electric=electric, thermal=thermal, dac=dac, params=hparams) assert len(dac_all.compute().series) assert dac_all.values["Total Cost [$/tCO2]"] > 0
def test_uncertainties(uparams): uparams["Base Energy Requirement [MW]"] = 47 electric = EnergySection(source="NGCC w/ CCS", battery=None, params=uparams) uparams["Required Thermal Energy [GJ/tCO2]"] = 6.64 thermal = NgThermalSection(source="Advanced NGCC", battery=None, params=uparams) uparams["Total Capex [$]"] = 1029 dac = DacSection(params=uparams) dac_all = DacModel(electric=electric, thermal=thermal, dac=dac, params=uparams) assert len(dac_all.compute().series) assert 220 <= dac_all.values["Total Cost [$/tCO2]"] <= 230 assert isinstance(dac_all.values["Total Cost [$/tCO2]"], uncertainties.core.AffineScalarFunc)
def test_default_parameters(): dac = DacSection() assert dac.params["Scale [tCO2/year]"] == 1000000
def test_to_pandas(): dac = DacSection() assert dac.values == {} dac.compute() assert dac.values assert len(dac.series)
def test_update_parameters(): dac = DacSection(params={"Scale [tCO2/year]": 10}) assert dac.params["Scale [tCO2/year]"] == 10