Skip to content

Commit

Permalink
Fix fluid wrapper branch definition for desorber
Browse files Browse the repository at this point in the history
  • Loading branch information
fwitte committed Nov 5, 2023
1 parent 7e356e4 commit 46b451e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions test_absorber.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def propagate_to_target(self, branch):

def propagate_wrapper_to_target(self, branch):
if branch["connections"][-1] == self.inl[0]:
branch["components"] += [self]
return

if self in branch["components"]:
Expand Down
18 changes: 10 additions & 8 deletions test_desorber.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def fluid_deriv(self, increment_filter, k):

def pressure_equality_func(self):
residual = []
for c in self.outl :
for c in self.outl:
residual += [c.p.val_SI - self.inl[0].p.val_SI]
return residual

Expand Down Expand Up @@ -163,14 +163,16 @@ def start_branch(self):
return branches

def start_fluid_wrapper_branch(self):
outconn = self.outl[0]
branch = {
"connections": [outconn],
"components": [self]
}
outconn.target.propagate_wrapper_to_target(branch)
branches = {}
for outconn in self.outl:
branch = {
"connections": [outconn],
"components": [self]
}
outconn.target.propagate_wrapper_to_target(branch)
branches[outconn.label] = branch

return {outconn.label: branch}
return branches

def propagate_to_target(self, branch):
return
Expand Down

0 comments on commit 46b451e

Please sign in to comment.