Skip to content

Commit

Permalink
Update Advanced_Flash_Stripper.py
Browse files Browse the repository at this point in the history
change stripper column packing related parameters after defining the column instead of during initialization
  • Loading branch information
iakkor authored Nov 5, 2024
1 parent 9873687 commit 2d68cd7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions akkor_et_al_2024/Advanced_Flash_Stripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ def build(self):
liquid_phase=self.config.liquid_phase,
)

# packing parameters for the stripper (random packing)
self.stripper.del_component(self.stripper.void)
self.stripper.void = Param(initialize=0.97, mutable=True, doc="Void fraction")
self.stripper.del_component(self.stripper.P_drop_z)
self.stripper.P_drop_z = Param(
initialize=0.3,
mutable=True,
)

self.flash_tank = FlashTank(
vapor_phase=self.config.vapor_phase, liquid_phase=self.config.liquid_phase
)
Expand Down Expand Up @@ -239,15 +248,6 @@ def initialize(blk, solver, outlvl):

blk.flash_tank.del_component(blk.flash_tank.obj)

# packing parameters for the stripper (random packing)
blk.stripper.del_component(blk.stripper.void)
blk.stripper.void = Param(initialize=0.97, mutable=True, doc="Void fraction")
blk.stripper.del_component(blk.stripper.P_drop_z)
blk.stripper.P_drop_z = Param(
initialize=0.3,
mutable=True,
)

# list of variables to be fixed for the first step of initialization
base_vars = [
"material_transfer_coefficient_tot",
Expand Down Expand Up @@ -323,5 +323,7 @@ def initialize(blk, solver, outlvl):
with idaeslog.solver_log(init_log, idaeslog.DEBUG) as slc:
results = solver.solve(blk, tee=slc.tee)
init_log.info_high(
"Step 3 - Pressure drop and heat transfer: {}.".format(idaeslog.condition(results))
"Step 3 - Pressure drop and heat transfer: {}.".format(
idaeslog.condition(results)
)
)

0 comments on commit 2d68cd7

Please sign in to comment.