Skip to content

Commit 47efde9

Browse files
committed
fix psedo comp issue
1 parent 3898bae commit 47efde9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/neqsim/thermo/thermoTools.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,15 @@ def fluid_df(
432432
definedComponentsFrame["MolarComposition[-]"].tolist(),
433433
)
434434
else:
435+
# When only pseudo components exist, create an empty base fluid
435436
fluid7 = fluid("srk")
436-
if not TBPComponentsFrame.equals(reservoirFluiddf) and TBPComponentsFrame.size > 0:
437+
438+
# Check if we have TBP/pseudo components to add (components with MolarMass)
439+
hasTBPComponents = (
440+
"MolarMass[kg/mol]" in reservoirFluiddf
441+
and TBPComponentsFrame.size > 0
442+
)
443+
if hasTBPComponents:
437444
addOilFractions(
438445
fluid7,
439446
TBPComponentsFrame["ComponentName"].tolist(),

0 commit comments

Comments
 (0)