Skip to content

Commit

Permalink
[Units] Pass through kwargs in constructor
Browse files Browse the repository at this point in the history
Allow setting the backed of the Water instance. Fix a typo in the R134a
instance.
  • Loading branch information
bryanwweber authored and speth committed Apr 25, 2023
1 parent d28809f commit c178c7c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions interfaces/cython/cantera/with_units/solution.py.in
Expand Up @@ -23,8 +23,8 @@ class Solution:


class PureFluid:
def __init__(self, infile, name=""):
self.__dict__["_phase"] = _PureFluid(infile, name)
def __init__(self, infile, name="", **kwargs):
self.__dict__["_phase"] = _PureFluid(infile, name, **kwargs)

@common_properties@

Expand Down Expand Up @@ -80,7 +80,7 @@ def CarbonDioxide():


def Hfc134a():
return PureFluid("liquidvapor.yaml", "hfc134a")
return PureFluid("liquidvapor.yaml", "HFC-134a")


def Hydrogen():
Expand All @@ -99,5 +99,5 @@ def Oxygen():
return PureFluid("liquidvapor.yaml", "oxygen")


def Water():
return PureFluid("liquidvapor.yaml", "water")
def Water(backend="Reynolds"):
return PureFluid("liquidvapor.yaml", "water", backend=backend)

0 comments on commit c178c7c

Please sign in to comment.