@@ -461,7 +461,9 @@ def adjuster(
461461
462462 def ejector (self , name : str , motive_stream : Any , suction_stream : Any ) -> Any :
463463 """Create an ejector and add to this process."""
464- ej = jneqsim .process .equipment .ejector .Ejector (name , motive_stream , suction_stream )
464+ ej = jneqsim .process .equipment .ejector .Ejector (
465+ name , motive_stream , suction_stream
466+ )
465467 return self .add (ej )
466468
467469 def flare (self , name : str , inlet_stream : Any = None ) -> Any :
@@ -1186,7 +1188,7 @@ def setup_recycle_loop(
11861188 ProcessBuilder()
11871189 .add_stream("feed", fluid, flow_rate=100, flow_unit="kg/hr")
11881190 # Set up the recycle initial guess
1189- .setup_recycle_loop("my_recycle", "recycle_guess", "feed",
1191+ .setup_recycle_loop("my_recycle", "recycle_guess", "feed",
11901192 initial_flow=10.0, initial_flow_unit="kg/hr")
11911193 # Mix feed with recycle
11921194 .add_mixer("mixer", inlets=["feed", "recycle_guess.out"])
@@ -1247,15 +1249,22 @@ def close_recycle_loop(
12471249 """
12481250 # Get the virtual stream from setup if outlet not specified
12491251 if outlet is None :
1250- if hasattr (self , "_pending_recycles" ) and recycle_name in self ._pending_recycles :
1252+ if (
1253+ hasattr (self , "_pending_recycles" )
1254+ and recycle_name in self ._pending_recycles
1255+ ):
12511256 vs_name = self ._pending_recycles [recycle_name ]
12521257 outlet = f"{ vs_name } .out"
12531258 else :
12541259 raise ValueError (
12551260 f"No outlet specified and no setup_recycle_loop found for '{ recycle_name } '"
12561261 )
12571262 return self .add_recycle (
1258- recycle_name , inlet = inlet , outlet = outlet , tolerance = tolerance , priority = priority
1263+ recycle_name ,
1264+ inlet = inlet ,
1265+ outlet = outlet ,
1266+ tolerance = tolerance ,
1267+ priority = priority ,
12591268 )
12601269
12611270 def add_distillation_column (
@@ -1496,7 +1505,9 @@ def add_ejector(
14961505 """
14971506 motive_stream = self ._get_outlet (motive_inlet )
14981507 suction_stream = self ._get_outlet (suction_inlet )
1499- ej = jneqsim .process .equipment .ejector .Ejector (name , motive_stream , suction_stream )
1508+ ej = jneqsim .process .equipment .ejector .Ejector (
1509+ name , motive_stream , suction_stream
1510+ )
15001511 self .equipment [name ] = ej
15011512 self .process .add (ej )
15021513 return self
@@ -1572,7 +1583,7 @@ def add_virtual_stream(
15721583 ProcessBuilder()
15731584 .add_stream("feed", fluid, flow_rate=100, flow_unit="kg/hr")
15741585 # Virtual stream as recycle guess (small flow to start)
1575- .add_virtual_stream("recycle_guess", source="feed",
1586+ .add_virtual_stream("recycle_guess", source="feed",
15761587 flow_rate=5.0, flow_unit="kg/hr")
15771588 # Mix feed with recycle
15781589 .add_mixer("mixer", inlets=["feed", "recycle_guess.out"])
@@ -1839,7 +1850,11 @@ def add_compressor_with_chart(
18391850 comp .setUseEnergyEfficiencyChart (use_energy_efficiency_chart )
18401851
18411852 # Set surge curve if provided
1842- if surge_flow is not None and surge_head is not None and chart_conditions is not None :
1853+ if (
1854+ surge_flow is not None
1855+ and surge_head is not None
1856+ and chart_conditions is not None
1857+ ):
18431858 comp .getCompressorChart ().getSurgeCurve ().setCurve (
18441859 chart_conditions , surge_flow , surge_head
18451860 )
@@ -2278,7 +2293,7 @@ def add_pid_controller(
22782293 kp: Proportional gain (default 1.0).
22792294 ti: Integral time constant (default 100.0).
22802295 td: Derivative time constant (default 0.0).
2281- reverse_acting: If True, controller output decreases when
2296+ reverse_acting: If True, controller output decreases when
22822297 process variable increases (default False).
22832298
22842299 Returns:
@@ -3574,9 +3589,7 @@ def get_inlets(self, equipment_name: str) -> List[str]:
35743589
35753590 return inlets if inlets else ["inlet" ]
35763591
3577- def validate_connection (
3578- self , source : str , target_equipment : str
3579- ) -> Dict [str , Any ]:
3592+ def validate_connection (self , source : str , target_equipment : str ) -> Dict [str , Any ]:
35803593 """
35813594 Validate if a connection between equipment is valid.
35823595
0 commit comments