Sofc¶
SOFC Power Plant Example¶
This notebook runs the SOFC power plant model over a range of net power outputs from 650 MW to 200 MW. The SOFC model is based on case ANGFC3B in the NETL report "Techno-Economic Analysis of Natural Gas Fuel Cell Plant Configurations" April 2022 https://www.netl.doe.gov/projects/files/TechnoEconomicAnalysisofNaturalGasFuelCellPlantConfigurations_043022.pdf
Module Imports¶
import os
import numpy as np
import pandas as pd
import pytest
from IPython.core.display import SVG
import pyomo.environ as pyo
from pyomo.environ import units as pyunits
from pyomo.util.infeasible import log_infeasible_constraints
import idaes
from idaes.core.solvers import use_idaes_solver_configuration_defaults
import idaes.core.util as iutil
from sofc import (
get_model,
initialize,
add_tags,
write_pfd,
make_stream_table
)
from sofc_costing import (
get_capital_cost,
get_fixed_costs,
get_variable_costs
)
Make Output Directories¶
This notebook can produce a large number of output files. To make it easier to manage, some subdirectories are used to organize output. This ensures that the directories exist.
# Make a directory if it doesn't exist
def make_directory(path):
if not os.path.exists(path):
os.mkdir(path)
make_directory("data")
make_directory("data_pfds")
make_directory("data_tabulated")
Global Solver Settings¶
Use the IDAES configuration system for solver settings. These will apply to all Ipopt instances created, including the ones created in initialization methods.
use_idaes_solver_configuration_defaults()
idaes.cfg.ipopt.options.nlp_scaling_method = "user-scaling"
idaes.cfg.ipopt.options.linear_solver = "ma57"
idaes.cfg.ipopt.options.OF_ma57_automatic_scaling = "yes"
idaes.cfg.ipopt.options.ma57_pivtol = 1e-5
idaes.cfg.ipopt.options.ma57_pivtolmax = 0.1
idaes.cfg.ipopt.options.bound_push = 1e-20
solver = pyo.SolverFactory("ipopt")
Create the SOFC model¶
Create the SOFC model and initialize it or read the saved initialization if available. The base SOFC model is configured to match the NGFC report.
def get_base_sofc_model():
m = get_model()
save_name = "sofc_init.json.gz"
if os.path.exists(save_name):
iutil.from_json(m, fname=save_name, wts=iutil.StoreSpec(suffix=False))
print("Loading initialized model from json")
else:
initialize(m)
iutil.to_json(m, fname=save_name)
print("Solving initialized model")
res = solver.solve(m, tee=True)
return m
Design Optimization¶
Optimize the heat exchanger sizes at the nameplate capacity of 650 MW.
m = get_base_sofc_model()
# add costs
get_capital_cost(m)
get_fixed_costs(m)
get_variable_costs(m)
# setup design optimization problem
m.fs.obj = pyo.Objective(
expr=m.fs.costing.annualized_tasc + m.fs.costing.total_fixed_OM_cost + m.fs.costing.total_variable_OM_cost[0]
)
# unfix decision vars
m.fs.anode_hx.area.unfix()
m.fs.cathode_hx.area.unfix()
m.fs.air_blower.inlet.flow_mol.unfix()
m.fs.cathode_recycle.split_fraction[0, 'recycle_outlet'].unfix()
m.fs.sofc.OTC.unfix()
m.fs.sofc.OTC.setlb(2.099)
m.fs.sofc.OTC.setub(2.2)
# add sofc operational constraints
@m.fs.Constraint()
def maximum_cell_temperature(fs):
return m.fs.sofc.max_cell_temperature <= 750
@m.fs.Constraint()
def maximum_cell_temperature_change(fs):
return m.fs.sofc.deltaT_cell <= 100
# enforce net power = 650 MW
m.fs.net_power_MW = pyo.Var(
m.fs.time,
initialize=650,
bounds=(100, 900),
units=pyunits.MW)
@m.fs.Constraint(m.fs.time)
def net_power_constraint(fs, t):
return fs.net_power_MW[t] == pyunits.convert(fs.net_power[t], pyunits.MW)
m.fs.anode_mix.feed_inlet.flow_mol.unfix()
m.fs.net_power_MW.fix(650)
save_name = "sofc_design_opt.json.gz"
if os.path.exists(save_name):
iutil.from_json(m, fname=save_name, wts=iutil.StoreSpec(suffix=False))
print("Loading optimized design from json")
else:
res = solver.solve(m, tee=True)
iutil.to_json(m, fname=save_name)
Loading initialized model from json Solving initialized model WARNING: model contains export suffix 'fs.flash.control_volume.properties_out[0.0].scaling_factor' that contains 12 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.flash.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.condenser.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.condenser.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.condenser.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.flue_gas_translator.properties_out[0.0].scaling_factor' that contains 6 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.flue_gas_translator.properties_in[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_HRSG.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_HRSG.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_HRSG.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor.control_volume.properties_out[0.0].scaling_factor' that contains 13 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.combustor_mix.mixed_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.combustor_mix.oxygen_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.combustor_mix.anode_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor_translator.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor_translator.properties_in[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.ASU_O2_outlet.control_volume.properties_out[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.ASU_O2_outlet.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.asu.O2_outlet_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.asu.N2_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.asu.mixed_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s2.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s2.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s2.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s2.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s2.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s2.control_volume.properties_in[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s1.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s1.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s1.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s1.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s1.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s1.control_volume.properties_in[0.0].scaling_factor' that contains 16 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hrsg.control_volume.properties_out[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hrsg.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hrsg.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_blower.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_blower.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_blower.control_volume.properties_in[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_recycle.recycle_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_recycle.exhaust_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_recycle.mixed_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_heat.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_heat.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_translator.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_translator.properties_in[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode.ion_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode.air_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode.mixed_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_mix.mixed_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_mix.recycle_inlet_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_mix.air_inlet_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.cold_side.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.cold_side.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.hot_side.properties_out[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.hot_side.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.hot_side.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.scaling_factor' that contains 3 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_blower.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_blower.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_blower.control_volume.properties_in[0.0].scaling_factor' that contains 17 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.recycle_translator.properties_out[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.recycle_translator.properties_in[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_blower.properties_isentropic[0.0].scaling_factor' that contains 12 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_blower.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_blower.control_volume.properties_in[0.0].scaling_factor' that contains 12 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_recycle.recycle_outlet_state[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_recycle.exhaust_outlet_state[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_recycle.mixed_state[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.control_volume.scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.scaling_factor' that contains 4 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.fuel_cell_mix.mixed_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.fuel_cell_mix.ion_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.fuel_cell_mix.fuel_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_translator.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_translator.properties_in[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.control_volume.properties_in[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.control_volume.scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.scaling_factor' that contains 2 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.cold_side.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.cold_side.properties_in[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.cold_side.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.hot_side.properties_out[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.hot_side.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.hot_side.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.scaling_factor' that contains 3 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_mix.mixed_state[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_mix.recycle_inlet_state[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_mix.feed_inlet_state[0.0].scaling_factor' that contains 24 component keys that are not exported as part of the NL file. Skipping. Ipopt 3.13.2: nlp_scaling_method=user-scaling tol=1e-06 max_iter=200 linear_solver=ma57 ma57_pivtol=1e-05 ma57_pivtolmax=0.1 bound_push=1e-20 option_file_name=/tmp/tmp6jtm20qk_ipopt.opt Using option file "/tmp/tmp6jtm20qk_ipopt.opt". ****************************************************************************** This program contains Ipopt, a library for large-scale nonlinear optimization. Ipopt is released as open source code under the Eclipse Public License (EPL). For more information visit http://projects.coin-or.org/Ipopt This version of Ipopt was compiled from source code available at https://github.com/IDAES/Ipopt as part of the Institute for the Design of Advanced Energy Systems Process Systems Engineering Framework (IDAES PSE Framework) Copyright (c) 2018-2019. See https://github.com/IDAES/idaes-pse. This version of Ipopt was compiled using HSL, a collection of Fortran codes for large-scale scientific computation. All technical papers, sales and publicity material resulting from use of the HSL codes within IPOPT must contain the following acknowledgement: HSL, a collection of Fortran codes for large-scale scientific computation. See http://www.hsl.rl.ac.uk. ****************************************************************************** This is Ipopt version 3.13.2, running with linear solver ma57. Number of nonzeros in equality constraint Jacobian...: 116906 Number of nonzeros in inequality constraint Jacobian.: 0 Number of nonzeros in Lagrangian Hessian.............: 4832 Total number of variables............................: 3173 variables with only lower bounds: 109 variables with lower and upper bounds: 1426 variables with only upper bounds: 5 Total number of equality constraints.................: 3173 Total number of inequality constraints...............: 0 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 0 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 0.0000000e+00 3.51e+01 1.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 Reallocating memory for MA57: lfact (5856712) 1 0.0000000e+00 2.27e+01 7.25e+06 -1.0 2.10e+01 - 2.84e-01 1.00e+00H 1 2 0.0000000e+00 8.82e-02 3.36e+05 -1.0 1.00e+00 - 9.53e-01 1.00e+00h 1 3 0.0000000e+00 1.75e-07 2.37e+03 -1.0 1.00e+00 - 9.93e-01 1.00e+00h 1 Number of Iterations....: 3 (scaled) (unscaled) Objective...............: 0.0000000000000000e+00 0.0000000000000000e+00 Dual infeasibility......: 0.0000000000000000e+00 0.0000000000000000e+00 Constraint violation....: 1.7455749912187457e-07 1.7455749912187457e-07 Complementarity.........: 0.0000000000000000e+00 0.0000000000000000e+00 Overall NLP error.......: 1.7455749912187457e-07 1.7455749912187457e-07 Number of objective function evaluations = 5 Number of objective gradient evaluations = 4 Number of equality constraint evaluations = 5 Number of inequality constraint evaluations = 0 Number of equality constraint Jacobian evaluations = 4 Number of inequality constraint Jacobian evaluations = 0 Number of Lagrangian Hessian evaluations = 3 Total CPU secs in IPOPT (w/o function evaluations) = 2.421 Total CPU secs in NLP function evaluations = 0.059 EXIT: Optimal Solution Found. WARNING: model contains export suffix 'fs.flash.control_volume.properties_out[0.0].scaling_factor' that contains 12 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.flash.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.condenser.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.condenser.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.condenser.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.flue_gas_translator.properties_out[0.0].scaling_factor' that contains 6 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.flue_gas_translator.properties_in[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_HRSG.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_HRSG.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_HRSG.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor.control_volume.properties_out[0.0].scaling_factor' that contains 13 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.combustor_mix.mixed_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.combustor_mix.oxygen_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.combustor_mix.anode_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor_translator.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.oxycombustor_translator.properties_in[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.ASU_O2_outlet.control_volume.properties_out[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.ASU_O2_outlet.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.asu.O2_outlet_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.asu.N2_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.asu.mixed_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s2.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s2.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s2.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s2.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s2.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s2.control_volume.properties_in[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s1.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s1.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.intercooler_s1.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s1.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s1.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_compressor_s1.control_volume.properties_in[0.0].scaling_factor' that contains 16 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hrsg.control_volume.properties_out[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hrsg.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hrsg.control_volume.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_blower.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_blower.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_blower.control_volume.properties_in[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_recycle.recycle_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_recycle.exhaust_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_recycle.mixed_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_heat.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_heat.control_volume.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_translator.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_translator.properties_in[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode.ion_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode.air_outlet_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode.mixed_state[0.0].scaling_factor' that contains 5 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_mix.mixed_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_mix.recycle_inlet_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_mix.air_inlet_state[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.cold_side.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.cold_side.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.hot_side.properties_out[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.hot_side.properties_in[0.0].scaling_factor' that contains 7 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.hot_side.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.cathode_hx.scaling_factor' that contains 2 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_blower.properties_isentropic[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_blower.control_volume.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.air_blower.control_volume.properties_in[0.0].scaling_factor' that contains 16 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.recycle_translator.properties_out[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.recycle_translator.properties_in[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_blower.properties_isentropic[0.0].scaling_factor' that contains 12 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_blower.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_blower.control_volume.properties_in[0.0].scaling_factor' that contains 12 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_recycle.recycle_outlet_state[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_recycle.exhaust_outlet_state[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_recycle.mixed_state[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.control_volume.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.control_volume.scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode.scaling_factor' that contains 4 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.fuel_cell_mix.mixed_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.fuel_cell_mix.ion_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.fuel_cell_mix.fuel_inlet_state[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_translator.properties_out[0.0].scaling_factor' that contains 8 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_translator.properties_in[0.0].scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.control_volume.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.control_volume.properties_in[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.control_volume.scaling_factor' that contains 9 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.prereformer.scaling_factor' that contains 2 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.cold_side.properties_out[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.cold_side.properties_in[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.cold_side.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.hot_side.properties_out[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.hot_side.properties_in[0.0].scaling_factor' that contains 10 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.hot_side.scaling_factor' that contains 1 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_hx.scaling_factor' that contains 2 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_mix.mixed_state[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_mix.recycle_inlet_state[0.0].scaling_factor' that contains 11 component keys that are not exported as part of the NL file. Skipping. WARNING: model contains export suffix 'fs.anode_mix.feed_inlet_state[0.0].scaling_factor' that contains 23 component keys that are not exported as part of the NL file. Skipping. Ipopt 3.13.2: nlp_scaling_method=user-scaling tol=1e-06 max_iter=200 linear_solver=ma57 ma57_pivtol=1e-05 ma57_pivtolmax=0.1 bound_push=1e-20 option_file_name=/tmp/tmpjd8er7ac_ipopt.opt Using option file "/tmp/tmpjd8er7ac_ipopt.opt". ****************************************************************************** This program contains Ipopt, a library for large-scale nonlinear optimization. Ipopt is released as open source code under the Eclipse Public License (EPL). For more information visit http://projects.coin-or.org/Ipopt This version of Ipopt was compiled from source code available at https://github.com/IDAES/Ipopt as part of the Institute for the Design of Advanced Energy Systems Process Systems Engineering Framework (IDAES PSE Framework) Copyright (c) 2018-2019. See https://github.com/IDAES/idaes-pse. This version of Ipopt was compiled using HSL, a collection of Fortran codes for large-scale scientific computation. All technical papers, sales and publicity material resulting from use of the HSL codes within IPOPT must contain the following acknowledgement: HSL, a collection of Fortran codes for large-scale scientific computation. See http://www.hsl.rl.ac.uk. ****************************************************************************** This is Ipopt version 3.13.2, running with linear solver ma57. Number of nonzeros in equality constraint Jacobian...: 117767 Number of nonzeros in inequality constraint Jacobian.: 2 Number of nonzeros in Lagrangian Hessian.............: 5258 Reallocating memory for MA57: lfact (5856694) Total number of variables............................: 3310 variables with only lower bounds: 111 variables with lower and upper bounds: 1553 variables with only upper bounds: 5 Total number of equality constraints.................: 3305 Total number of inequality constraints...............: 2 inequality constraints with only lower bounds: 0 inequality constraints with lower and upper bounds: 0 inequality constraints with only upper bounds: 2 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 0 2.5930054e+02 1.64e+01 1.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0 1 2.5696055e+02 4.83e-01 3.28e+06 -1.0 2.04e+01 - 6.72e-01 1.00e+00h 1 2 2.5702844e+02 3.67e+00 4.71e+05 -1.0 4.43e+00 - 8.56e-01 1.00e+00h 1 3 2.5777344e+02 3.68e+02 1.56e+05 -1.0 3.24e+01 - 6.68e-01 1.00e+00f 1 4 2.5896506e+02 5.52e+01 3.85e+05 -1.0 1.81e+01 - 9.90e-01 1.00e+00h 1 5 2.6073340e+02 1.66e+02 1.00e+06 -1.0 3.07e+01 - 1.00e+00 1.00e+00h 1 6 2.6093255e+02 4.46e-01 4.19e+05 -1.0 4.18e+00 - 1.00e+00 1.00e+00h 1 7 2.6090517e+02 3.35e-02 1.18e+05 -1.0 1.07e+00 - 1.00e+00 1.00e+00h 1 8 2.5624596e+02 6.01e+02 1.93e+06 -2.5 1.03e+02 - 6.38e-01 8.37e-01f 1 9 2.5599592e+02 5.55e+02 1.51e+06 -2.5 9.99e+01 - 4.38e-01 8.25e-02h 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 10 2.5533660e+02 5.35e+02 6.22e+05 -2.5 3.23e+01 - 1.00e+00 1.00e+00h 1 11 2.5536750e+02 4.49e+02 5.11e+05 -2.5 2.39e+01 - 7.12e-01 1.74e-01h 1 12 2.5567715e+02 8.68e+01 5.22e+05 -2.5 1.43e+01 - 7.35e-01 8.10e-01h 1 13 2.5578515e+02 9.29e-01 5.40e+05 -2.5 4.40e+00 - 1.00e+00 1.00e+00h 1 14 2.5578143e+02 1.42e-01 3.17e+05 -2.5 1.35e+00 - 1.00e+00 1.00e+00h 1 15 2.5578163e+02 3.06e-03 1.13e+05 -2.5 1.00e+00 - 1.00e+00 1.00e+00h 1 16 2.5577315e+02 2.10e-02 1.86e+05 -3.8 1.00e+00 - 1.00e+00 6.13e-01h 1 17 2.5577142e+02 3.06e-03 3.69e+05 -3.8 1.00e+00 - 1.00e+00 1.00e+00h 1 18 2.5577134e+02 6.78e-04 2.58e+04 -3.8 1.00e+00 - 1.00e+00 1.00e+00h 1 19 2.5577134e+02 5.41e-07 2.34e+03 -3.8 1.00e+00 - 1.00e+00 1.00e+00h 1 iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls 20 2.5577090e+02 1.64e-04 9.58e+04 -5.7 9.99e-01 - 9.88e-01 9.82e-01h 1 21 2.5577089e+02 1.15e-05 7.86e+02 -5.7 9.98e-01 - 1.00e+00 1.00e+00h 1 22 2.5577089e+02 5.17e-10 7.93e+00 -5.7 9.95e-01 - 1.00e+00 1.00e+00h 1 23 2.5577089e+02 5.63e-08 1.46e+03 -7.0 9.86e-01 - 1.00e+00 1.00e+00h 1 24 2.5577089e+02 1.16e-10 2.38e-01 -7.0 9.63e-01 - 1.00e+00 1.00e+00h 1 25 2.5577089e+02 1.16e-10 8.64e-02 -7.0 9.04e-01 - 1.00e+00 1.00e+00h 1 26 2.5577089e+02 1.67e-10 3.19e-03 -7.0 7.63e-01 - 1.00e+00 1.00e+00h 1 Number of Iterations....: 26 (scaled) (unscaled) Objective...............: 2.5577088635098298e+02 2.5577088635098298e+02 Dual infeasibility......: 3.1924724990009057e-03 3.1924724990009057e-01 Constraint violation....: 1.6734702512621880e-10 1.6734702512621880e-10 Complementarity.........: 9.0909091118737816e-08 9.0909091118737816e-08 Overall NLP error.......: 9.0909091118737816e-08 3.1924724990009057e-01 Number of objective function evaluations = 27 Number of objective gradient evaluations = 27 Number of equality constraint evaluations = 27 Number of inequality constraint evaluations = 27 Number of equality constraint Jacobian evaluations = 27 Number of inequality constraint Jacobian evaluations = 27 Number of Lagrangian Hessian evaluations = 26 Total CPU secs in IPOPT (w/o function evaluations) = 9.784 Total CPU secs in NLP function evaluations = 0.492 EXIT: Optimal Solution Found.
Show PFDs with design optimization results¶
This displays PFDs in the notebook, and saves them to files.
display(SVG(write_pfd(m)))
write_pfd(m, fname="data_pfds/sofc_results.svg")
# record and display results
optimal_anode_hx_area = m.fs.anode_hx.area.value
optimal_cathode_hx_area = m.fs.cathode_hx.area.value
# assert that flowsheet values have not changed from prior runs
assert m.fs.anode_hx.area.value == pytest.approx(2683.16, rel=0.01)
assert m.fs.cathode_hx.area.value == pytest.approx(15135.97, rel=0.01)
assert m.fs.cathode_recycle.split_fraction[0, 'recycle_outlet'].value == pytest.approx(0.2828, rel=0.01)
assert m.fs.air_blower.inlet.flow_mol[0].value == pytest.approx(11.007, rel=0.01)
print("------------------------------------------")
print("Decision Variable Results")
print("------------------------------------------")
print(f"Anode hx area = {m.fs.anode_hx.area.value} ft^2")
print(f"Cathode hx area = {m.fs.cathode_hx.area.value} ft^2")
print(f"Cathode recirculation fraction = {m.fs.cathode_recycle.split_fraction[0, 'recycle_outlet'].value}")
print(f"Cathode air flowrate = {m.fs.air_blower.inlet.flow_mol[0].value} kmol/s")
print("\n")
print("------------------------------------------")
print("Capital Costs")
print("------------------------------------------")
print(f"SOFC modules = MM${m.fs.sofc_modules.costing.total_plant_cost.value}")
print(f"SOFC balance of plant = MM${pyo.value(m.fs.costing.sofc_bop_cost)}")
print(f"Oxycombustor = MM${m.fs.oxycombustor.costing.total_plant_cost.value}")
print(f"Air separation unit = MM${m.fs.asu.costing.total_plant_cost.value}")
print(f"Carbon purification unit = MM${m.fs.cpu_cost.costing.total_plant_cost.value}")
print(f"Feedwater and misc. BOP systems = MM${pyo.value(m.fs.costing.feedwater_bop_cost)}")
print(f"HRSG, ductwork, and stack = MM${pyo.value(m.fs.costing.hrsg_ductwork_and_stack_cost)}")
print(f"Steam turbine generator = MM${pyo.value(m.fs.costing.steam_turbine_cost)}")
print(f"Cooling water system = MM${pyo.value(m.fs.costing.cooling_water_system_cost)}")
print(f"Electric equipment = MM${pyo.value(m.fs.costing.accessory_electric_plant_cost)}")
print(f"Instrumentation and control = MM${pyo.value(m.fs.costing.instrumentation_and_control_cost)}")
print(f"Improvements to site = MM${pyo.value(m.fs.costing.improvements_to_site_cost)}")
print(f"Buildings and structures = MM${pyo.value(m.fs.costing.buildings_and_structures_cost)}")
print("\n")
print(f"Total Plant Cost = MM${m.fs.costing.total_TPC.value}")
print(f"Total Overnight Cost = MM${m.fs.costing.total_overnight_cost.value}")
print(f"Total As Spent Cost = MM${m.fs.costing.total_as_spent_cost.value}")
print(f"Annualized TASC = MM${m.fs.costing.annualized_tasc.value}/year")
print("\n")
print("------------------------------------------")
print("Fixed and Variable O&M Costs")
print("------------------------------------------")
print(f"Annual operating labor = MM${m.fs.costing.annual_operating_labor_cost.value}/year")
print(f"Maintenance labor = MM${m.fs.costing.maintenance_labor_cost.value}/year")
print(f"Admin & support labor = MM${m.fs.costing.admin_and_support_labor_cost.value}/year")
print(f"Property taxes & insurance = MM${m.fs.costing.property_taxes_and_insurance.value}/year")
print(f"Maintenance material cost = MM${m.fs.costing.maintenance_material_cost.value}/year")
print(f"Stack replacement cost = MM${m.fs.costing.stack_replacement_cost.value}/year")
print(f"Total Fixed O&M Cost = MM${m.fs.costing.total_fixed_OM_cost.value}/year")
print(f"Total Variable O&M Cost = MM${m.fs.costing.total_variable_OM_cost[0].value}/year")
------------------------------------------ Decision Variable Results ------------------------------------------ Anode hx area = 2683.1608147162365 ft^2 Cathode hx area = 15135.972121851768 ft^2 Cathode recirculation fraction = 0.28286078699179706 Cathode air flowrate = 11.007126050466491 kmol/s ------------------------------------------ Capital Costs ------------------------------------------ SOFC modules = MM$216.351206607107 SOFC balance of plant = MM$22.168198605873528 Oxycombustor = MM$17.25766113649775 Air separation unit = MM$75.16656941296873 Carbon purification unit = MM$80.17568164876174 Feedwater and misc. BOP systems = MM$78.41974917660707 HRSG, ductwork, and stack = MM$44.92390515296145 Steam turbine generator = MM$50.98302022038936 Cooling water system = MM$32.59760880545278 Electric equipment = MM$67.15738319049805 Instrumentation and control = MM$20.48747362755321 Improvements to site = MM$28.837921346638318 Buildings and structures = MM$12.805970619738078 Total Plant Cost = MM$747.3323495510471 Total Overnight Cost = MM$904.272142956767 Total As Spent Cost = MM$988.3694522517463 Annualized TASC = MM$69.87772027419845/year ------------------------------------------ Fixed and Variable O&M Costs ------------------------------------------ Annual operating labor = MM$2.6306279999999997/year Maintenance labor = MM$5.679725856587957/year Admin & support labor = MM$2.0775884641469893/year Property taxes & insurance = MM$14.946646991020941/year Maintenance material cost = MM$8.519588784881934/year Stack replacement cost = MM$15.27286975208992/year Total Fixed O&M Cost = MM$49.12704784872775/year Total Variable O&M Cost = MM$136.76611822805677/year
Run SOFC Partial Load¶
This runs the SOFC model at partial load from 650 MW to 200 MW at 5 MW intervals. Results are tabulated for tags in the tags_output tag group in a Pandas data frame.
To run the series, change run_series to True. Running the turndown series takes a while, unless previous saved results are available.
run_series = False
if run_series:
idaes.cfg.ipopt.options.tol = 1e-6
idaes.cfg.ipopt.options.mu_init = 1e-3
solver = pyo.SolverFactory("ipopt")
# reload the model since capital costs are not important here
m = get_base_sofc_model()
get_variable_costs(m)
add_tags(m)
# setup operation optimization problem
m.fs.obj = pyo.Objective(
expr=m.fs.costing.total_variable_OM_cost[0]
)
# fix hx areas to their optimal values
m.fs.anode_hx.area.fix(optimal_anode_hx_area)
m.fs.cathode_hx.area.fix(optimal_cathode_hx_area)
# unfix operating decision vars
m.fs.air_blower.inlet.flow_mol.unfix()
m.fs.cathode_recycle.split_fraction[0, 'recycle_outlet'].unfix()
# add sofc operational constraints
@m.fs.Constraint()
def maximum_cell_temperature(fs):
return m.fs.sofc.max_cell_temperature <= 750
@m.fs.Constraint()
def maximum_cell_temperature_change(fs):
return m.fs.sofc.deltaT_cell <= 100
m.fs.sofc.current_density.setlb(1000)
# create var to enforce net power
m.fs.net_power_MW = pyo.Var(
m.fs.time,
initialize=650,
bounds=(100, 900),
units=pyunits.MW)
@m.fs.Constraint(m.fs.time)
def net_power_constraint(fs, t):
return fs.net_power_MW[t] == pyunits.convert(fs.net_power[t], pyunits.MW)
m.fs.anode_mix.feed_inlet.flow_mol.unfix()
df = pd.DataFrame(columns=m._tags_output.table_heading())
for p in range(650, 199, -20):
print(f"Solving for {p} MW net power")
m.fs.net_power_MW.fix(p)
turndown_ratio = p/650
m.fs.sofc.current_density.fix(turndown_ratio*4000)
fname = f"data/sofc_{int(p)}.json.gz"
if os.path.exists(fname):
iutil.from_json(m, fname=fname, wts=iutil.StoreSpec(suffix=False))
else:
res = solver.solve(m, tee=True, symbolic_solver_labels=True)
iutil.to_json(m, fname=fname)
df.loc[m._tags_output["net_power"].value] = m._tags_output.table_row(numeric=True)
df.to_csv("data_tabulated/sofc.csv")