diff --git a/biosteam/_system.py b/biosteam/_system.py index 274c1798..9821d637 100644 --- a/biosteam/_system.py +++ b/biosteam/_system.py @@ -211,11 +211,7 @@ def solve_energy_departures(self): departures = solve(A, np.array(b).T).T try: for obj, departure in zip(objs, departures): - try: - obj._update_energy_variable(departure) - except: - print(repr(obj)) - breakpoint() + obj._update_energy_variable(departure) except AttributeError as e: if obj._update_energy_variable: raise e @@ -2425,12 +2421,9 @@ def run_phenomena(self): conf.solve_nonlinearities() conf.solve_energy_departures() conf.solve_material_flows() - print('GOOD!') - # except (NotImplementedError, UnboundLocalError, TypeError, AttributeError, KeyError) as error: - # raise error + except (NotImplementedError, UnboundLocalError, TypeError, KeyError) as error: + raise error except: - print('FAILED X') - # del self._stage_configuration for i in path: i.run() def _solve(self): diff --git a/biosteam/evaluation/_model.py b/biosteam/evaluation/_model.py index 1a68a807..3dab69ae 100644 --- a/biosteam/evaluation/_model.py +++ b/biosteam/evaluation/_model.py @@ -201,32 +201,28 @@ def parameters_from_df(self, df_or_filename, namespace=None): Parameters ---------- - df_or_filename : pandas.DataFrame or file path to a spreadsheet of the following format: - Column titles (these must be included, but others may be added for convenience): - 'Parameter name': String - Name of the parameter. - 'Element': String, optional - 'Kind': String, optional - 'Units': String, optional - 'Baseline': float or int - The baseline value of the parameter. - 'Shape': String, one of ['Uniform', 'Triangular'] - The shape of the parameter distribution. - 'Lower': float or int - The lower value defining the shape of the parameter distribution. - 'Midpoint': float or int - The midpoint value defining the shape of a 'Triangular' parameter distribution. - 'Upper': float or int - The upper value defining the shape of the parameter distribution. - 'Load statement': String - A statement executed to load the value of the parameter. The value is stored in - the variable x. A namespace defined in the namespace during EasyInputModel - initialization may be accessed. - E.g., to load a value into an example distillation unit D101's light key recovery, - ensure 'D101' is a key pointing to the D101 unit object in namespace, then - simply include the load statement: 'D101.Lr = x'. New lines in the statement - may be represented by '\n' or ';'. - + df_or_filename : pandas.DataFrame or file path to a spreadsheet with the following column titles. + + * 'Parameter name' [String] Name of the parameter. + + * 'Element' [String] + + * 'Kind' [String] + + * 'Units' [String] + + * 'Baseline' [float] The baseline value of the parameter. + + * 'Shape' {'Uniform', 'Triangular'} The shape of the parameter distribution. + + * 'Lower' [float] The lower value defining the shape of the parameter distribution. + + * 'Midpoint' [float] The midpoint value defining the shape of a 'Triangular' parameter distribution. + + * 'Upper' [float] The upper value defining the shape of the parameter distribution. + + * 'Load statement' [String] A statement executed to load the value of the parameter. + namespace : dict, optional Dictionary used to update the namespace accessed when executing statements to load values into model parameters. Defaults to the @@ -327,7 +323,7 @@ def parameter(self, setter=None, element=None, kind=None, name=None, Define and register parameter. Parameters - ---------- + ---------* setter : function Should set parameter in the element. element : Unit or :class:`~thermosteam.Stream` diff --git a/biosteam/units/stage.py b/biosteam/units/stage.py index ed8ba6a1..5a7c5802 100644 --- a/biosteam/units/stage.py +++ b/biosteam/units/stage.py @@ -1551,7 +1551,6 @@ def _update_nonlinearities(self): if self._has_vle: for i in self.stages: i._update_nonlinearities() elif self._has_lle: - # pass self.update_lle_variables() def _update_aggretated_nonlinearities(self): diff --git a/docs/index.rst b/docs/index.rst index 74f90ead..13634a3b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -144,47 +144,55 @@ tools for sustainability assessments. Here is a short list of related publicatio * **Software tools**: - - `BioSTEAM: A Fast and Flexible Platform for the Design, Simulation, and Techno-Economic Analysis of Biorefineries under Uncertainty. ACS Sustainable Chem. Eng. 2020 `_ + #. `BioSTEAM: A Fast and Flexible Platform for the Design, Simulation, and Techno-Economic Analysis of Biorefineries under Uncertainty. ACS Sustainable Chem Eng 2020 `_ - - `Thermosteam: BioSTEAM's Premier Thermodynamic Engine. Journal of Open Source Software. 2020 `_ + #. `Thermosteam: BioSTEAM's Premier Thermodynamic Engine. Journal of Open Source Software 2020 `_ - - `QSDsan: an integrated platform for quantitative sustainable design of sanitation and resource recovery systems. Environ. Sci.: Water Res. Technol. 2022 `_ + #. `QSDsan: an integrated platform for quantitative sustainable design of sanitation and resource recovery systems. Environ Sci: Water Res Technol 2022 `_ * **Social, economic, and policy studies**: - - `An agent-based modeling tool supporting bioenergy and bio-product community communication regarding cellulosic bioeconomy development. Renewable and Sustainable Energy Reviews 2022 `_ + #. `An agent-based modeling tool supporting bioenergy and bio-product community communication regarding cellulosic bioeconomy development. Renewable and Sustainable Energy Reviews 2022 `_ - - `Implications of Biorefinery Policy Incentives and Location-Specific Economic Parameters for the Financial Viability of Biofuels. Environ. Sci. Technol. 2023 `_ + #. `Implications of Biorefinery Policy Incentives and Location-Specific Economic Parameters for the Financial Viability of Biofuels. Environ Sci Technol 2023 `_ * **Bioproduct and biofuel studies**: - - `A Microbial Process for the Production of Benzyl Acetate. Nat Chem Eng 2024. `_ + #. `Integration of plant and microbial oil processing at oilcane biorefineries for more sustainable biofuel production. GCB Bioenergy 2024 `_ - - `Characterizing the Opportunity Space for Sustainable Hydrothermal Valorization of Wet Organic Wastes. Environ. Sci. Technol. `_ + #. `Economic and Environmental Sustainability of Bio-Based HMF Production and Recovery from Lignocellulosic Biomass. Green Chem 2024 `_ - - `An End-to-End Pipeline for Succinic Acid Production at an Industrially Relevant Scale Using Issatchenkia Orientalis. Nat Commun. 2023. `_ + #. `Comparative techno-economic and life cycle assessment of electrocatalytic processes for lignin valorization. Green Chem 2024 `_ - - `Metabolic engineering of Yarrowia lipolytica to produce 1,2-diacyl-3-acetyl triacylglycerol. Metabolic Engineering. 2023 `_ + #. `The Economic and Environmental Case for Cattle Manure and Prairie Grass-Derived Sustainable Aviation Fuel. Energy Fuels 2024 `_ - - `Economic and Environmental Sustainability of Vegetative Oil Extraction Strategies at Integrated Oilcane and Oil-sorghum Biorefineries. ACS Sustainable Chem. Eng. 2022 `_ + #. `A Microbial Process for the Production of Benzyl Acetate. Nat Chem Eng 2024. `_ - - `Adsorptive separation and recovery of triacetic acid lactone from fermentation broth. Biofuels Bioprod Bioref 2022 `_ + #. `Characterizing the Opportunity Space for Sustainable Hydrothermal Valorization of Wet Organic Wastes. Environ Sci Technol `_ - - `Rewiring yeast metabolism for producing 2,3-butanediol and two downstream applications: Techno-economic analysis and life cycle assessment of methyl ethyl ketone (MEK) and agricultural biostimulant production. Chemical Engineering Journal 2022 `_ + #. `An End-to-End Pipeline for Succinic Acid Production at an Industrially Relevant Scale Using Issatchenkia Orientalis. Nat Commun 2023 `_ - - `Sustainable Production of Acrylic Acid via 3-Hydroxypropionic Acid from Lignocellulosic Biomass. ACS Sustainable Chem. Eng. 2021 `_ + #. `Metabolic engineering of Yarrowia lipolytica to produce 1,2-diacyl-3-acetyl triacylglycerol. Metabolic Engineering 2023 `_ + + #. `Economic and Environmental Sustainability of Vegetative Oil Extraction Strategies at Integrated Oilcane and Oil-sorghum Biorefineries. ACS Sustainable Chem. Eng. 2022 `_ + + #. `Adsorptive separation and recovery of triacetic acid lactone from fermentation broth. Biofuels Bioprod Bioref 2022 `_ + + #. `Rewiring yeast metabolism for producing 2,3-butanediol and two downstream applications: Techno-economic analysis and life cycle assessment of methyl ethyl ketone (MEK) and agricultural biostimulant production. Chemical Engineering Journal 2022 `_ + + #. `Sustainable Production of Acrylic Acid via 3-Hydroxypropionic Acid from Lignocellulosic Biomass. ACS Sustainable Chem Eng 2021 `_ - - `Renewable linear alpha-olefins by base-catalyzed dehydration of biologically-derived fatty alcohols. Green Chemistry 2021 `_ + #. `Renewable linear alpha-olefins by base-catalyzed dehydration of biologically-derived fatty alcohols. Green Chemistry 2021 `_ - - `Sustainable Lactic Acid Production from Lignocellulosic Biomass. ACS Sustainable Chem. Eng. 2021 `_ + #. `Sustainable Lactic Acid Production from Lignocellulosic Biomass. ACS Sustainable Chem Eng 2021 `_ - - `Techno-Economic Evaluation of Biorefineries Based on Low-Value Feedstocks Using the BioSTEAM Software: A Case Study for Animal Bedding. Processes 2020 `_ + #. `Techno-Economic Evaluation of Biorefineries Based on Low-Value Feedstocks Using the BioSTEAM Software: A Case Study for Animal Bedding. Processes 2020 `_ * **Plastics and recycling**: - - `Comparative Techno-Economic Analysis and Life Cycle Assessment of Producing High-Value Chemicals and Fuels from Waste Plastic via Conventional Pyrolysis and Thermal Oxo-Degradation. Energy Fuels. 2023 `_ + #. `Comparative Techno-Economic Analysis and Life Cycle Assessment of Producing High-Value Chemicals and Fuels from Waste Plastic via Conventional Pyrolysis and Thermal Oxo-Degradation. Energy Fuels 2023 `_ - - `High-purity polypropylene from disposable face masks via solvent-targeted recovery and precipitation. Green Chemistry. 2023 `_ + #. `High-purity polypropylene from disposable face masks via solvent-targeted recovery and precipitation. Green Chemistry 2023 `_ Indices and tables