Skip to content

Commit

Permalink
Merge pull request #150 from zacharybinger/main
Browse files Browse the repository at this point in the history
Quick fix to SOA flowsheet
  • Loading branch information
kurbansitterley authored Dec 10, 2024
2 parents bc2abcf + 69b103b commit 3fad7dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def add_treatment_costing(m):
treatment.pump.costing = UnitModelCostingBlock(
flowsheet_costing_block=treatment.costing,
)

add_ec_costing(m, treatment.EC, treatment.costing)
add_UF_costing(m, treatment.UF, treatment.costing)
add_ro_costing(m, treatment.RO, treatment.costing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,15 @@ def add_constraints(m):


def add_costing(m):

m.fs.pump.costing = UnitModelCostingBlock(
flowsheet_costing_block=m.fs.costing,
)

add_softener_costing(m, m.fs.softener)
add_UF_costing(m, m.fs.UF)
add_ro_costing(m, m.fs.RO)
add_DWI_costing(m, m.fs.DWI)
add_softener_costing(m, m.fs.softener, m.fs.costing)
add_UF_costing(m, m.fs.UF, m.fs.costing)
add_ro_costing(m, m.fs.RO, m.fs.costing)
add_DWI_costing(m, m.fs.DWI, m.fs.costing)

m.fs.costing.cost_process()
m.fs.costing.add_annual_water_production(m.fs.product.properties[0].flow_vol)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,11 @@ def set_scaling(m):
print(f"Softener Degrees of Freedom: {degrees_of_freedom(m.fs.softener)}")


def add_softener_costing(m, blk):
def add_softener_costing(m, blk, costing_blk=None):
if costing_blk is None:
costing_blk = m.fs.costing
blk.unit.costing = UnitModelCostingBlock(
flowsheet_costing_block=m.fs.costing,
flowsheet_costing_block=costing_blk,
)

# m.fs.costing.cost_process()
Expand Down

0 comments on commit 3fad7dc

Please sign in to comment.