1- from libecalc .domain .process .entities .process_units .choke import Choke
21from libecalc .domain .process .entities .shaft import Shaft
32from libecalc .domain .process .process_system .process_unit import ProcessUnit
43from libecalc .domain .process .value_objects .fluid_stream import FluidStream
@@ -11,34 +10,15 @@ def __init__(
1110 self ,
1211 shaft : Shaft ,
1312 process_units : list [ProcessUnit ],
14- upstream_choke : Choke | None = None ,
15- downstream_choke : Choke | None = None ,
1613 ):
1714 self ._shaft = shaft
1815 self ._process_units = process_units
19- self ._upstream_choke = upstream_choke
20- self ._downstream_choke = downstream_choke
2116
2217 def get_shaft (self ) -> Shaft :
2318 return self ._shaft
2419
25- def get_downstream_choke (self ) -> Choke | None :
26- return self ._downstream_choke
27-
28- def get_upstream_choke (self ) -> Choke | None :
29- return self ._upstream_choke
30-
3120 def propagate_stream (self , inlet_stream : FluidStream ) -> FluidStream :
32- process_units : list [ProcessUnit ] = []
33- if self ._upstream_choke is not None :
34- process_units .append (self ._upstream_choke )
35-
36- process_units .extend (self ._process_units )
37-
38- if self ._downstream_choke is not None :
39- process_units .append (self ._downstream_choke )
40-
4121 current_inlet = inlet_stream
42- for process_unit in process_units :
22+ for process_unit in self . _process_units :
4323 current_inlet = process_unit .propagate_stream (inlet_stream = current_inlet )
4424 return current_inlet
0 commit comments