From 2d68cd7eafd7af5ea2ee23eda8bba7cde468c0d9 Mon Sep 17 00:00:00 2001 From: iakkor <126274007+iakkor@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:40:57 -0500 Subject: [PATCH] Update Advanced_Flash_Stripper.py change stripper column packing related parameters after defining the column instead of during initialization --- akkor_et_al_2024/Advanced_Flash_Stripper.py | 22 +++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/akkor_et_al_2024/Advanced_Flash_Stripper.py b/akkor_et_al_2024/Advanced_Flash_Stripper.py index d0bd486..9d9d9db 100644 --- a/akkor_et_al_2024/Advanced_Flash_Stripper.py +++ b/akkor_et_al_2024/Advanced_Flash_Stripper.py @@ -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 ) @@ -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", @@ -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) + ) )