Skip to content

Commit 36c8e36

Browse files
committed
update
1 parent 2cbd946 commit 36c8e36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/neqsim/thermo/thermoTools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ def fluid(name="srk", temperature=298.15, pressure=1.01325):
331331
Returns:
332332
object: An instance of the specified thermodynamic fluid system.
333333
"""
334-
fluid_function = fluid_type.get(name, jneqsim.thermo.system.SystemSrkEos)
334+
if name not in fluid_type:
335+
raise ValueError(f"Fluid model {name} not found. Available models are {list(fluid_type.keys())}")
336+
fluid_function = fluid_type[name]
335337
return fluid_function(temperature, pressure)
336338

337339

0 commit comments

Comments
 (0)