Skip to content

Commit

Permalink
Running black
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlee94 committed Jan 16, 2025
1 parent 71245de commit 08e3983
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
14 changes: 8 additions & 6 deletions idaes/core/base/extended_control_volume0d.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class ExtendedControlVolume0DBlockData(ControlVolume0DBlockData):

def add_isothermal_constraint(
self,
has_heat_of_reaction: bool =False,
has_heat_transfer: bool =False,
has_work_transfer: bool =False,
has_enthalpy_transfer: bool =False,
custom_term: Expression =None,
has_heat_of_reaction: bool = False,
has_heat_transfer: bool = False,
has_work_transfer: bool = False,
has_enthalpy_transfer: bool = False,
custom_term: Expression = None,
) -> Constraint:
"""
This method constructs an isothermal constraint for the control volume.
Expand Down Expand Up @@ -103,7 +103,9 @@ def add_isothermal_constraint(
)

# Add isothermal constraint
@self.Constraint(self.flowsheet().time, doc="Isothermal constraint - replaces energy balance")
@self.Constraint(
self.flowsheet().time, doc="Isothermal constraint - replaces energy balance"
)
def isothermal_constraint(b, t):
return b.properties_in[t].temperature == b.properties_out[t].temperature

Expand Down
16 changes: 9 additions & 7 deletions idaes/core/base/extended_control_volume1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ class ExtendedControlVolume1DBlockData(ControlVolume1DBlockData):

def add_isothermal_constraint(
self,
has_heat_of_reaction: bool =False,
has_heat_transfer: bool =False,
has_work_transfer: bool =False,
has_enthalpy_transfer: bool =False,
custom_term: Expression =None,
has_heat_of_reaction: bool = False,
has_heat_transfer: bool = False,
has_work_transfer: bool = False,
has_enthalpy_transfer: bool = False,
custom_term: Expression = None,
) -> None:
"""
This method constructs an isothermal constraint for the control volume.
Expand Down Expand Up @@ -107,7 +107,9 @@ def add_isothermal_constraint(

# Add isothermal constraint
@self.Constraint(
self.flowsheet().time, self.length_domain, doc="Isothermal constraint - replaces energy balances"
self.flowsheet().time,
self.length_domain,
doc="Isothermal constraint - replaces energy balances",
)
def isothermal_constraint(b, t, x):
if x == b.length_domain.first():
Expand All @@ -118,4 +120,4 @@ def isothermal_constraint(b, t, x):
== b.properties[t, x].temperature
)

return self.isothermal_constraint
return self.isothermal_constraint

0 comments on commit 08e3983

Please sign in to comment.