Skip to content

polykin.thermo.flash¤

FlashResult dataclass ¤

Flash result dataclass.

ATTRIBUTE DESCRIPTION
method

Method used to perform the flash calculation.

TYPE: str

success

Flag indicating if the solver converged.

TYPE: bool

message

Description of the exit status.

TYPE: str

T

Temperature (K).

TYPE: float

P

Pressure (Pa).

TYPE: float

F

Feed mole flowrate (mol/s).

TYPE: float

L

Liquid mole flowrate (mol/s).

TYPE: float

V

Vapor mole flowrate (mol/s).

TYPE: float

beta

Vapor phase fraction (mol/mol).

TYPE: float

z

Feed mole fractions (mol/mol).

TYPE: FloatVector

x

Liquid mole fractions (mol/mol).

TYPE: FloatVector

y

Vapor mole fractions (mol/mol).

TYPE: FloatVector

K

K-values.

TYPE: FloatVector

Source code in src/polykin/thermo/flash/vle.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@dataclass(frozen=True)
class FlashResult():
    """Flash result dataclass.

    Attributes
    ----------
    method: str
        Method used to perform the flash calculation.    
    success : bool
        Flag indicating if the solver converged.
    message: str
        Description of the exit status.
    T : float
        Temperature (K).
    P : float
        Pressure (Pa).
    F : float
        Feed mole flowrate (mol/s).
    L : float
        Liquid mole flowrate (mol/s).
    V : float
        Vapor mole flowrate (mol/s).
    beta : float
        Vapor phase fraction (mol/mol). 
    z : FloatVector
        Feed mole fractions (mol/mol).
    x : FloatVector
        Liquid mole fractions (mol/mol).    
    y : FloatVector
        Vapor mole fractions (mol/mol).
    K : FloatVector
        K-values.
    """
    method: str
    success: bool
    message: str
    T: float
    P: float
    F: float
    L: float
    V: float
    beta: float
    z: FloatVector
    x: FloatVector
    y: FloatVector
    K: FloatVector

    def __repr__(self) -> str:
        return (f" method: {self.method}\n"
                f"success: {colored_bool(self.success)}\n"
                f"message: {self.message}\n"
                f"      T: {self.T}\n"
                f"      P: {self.P}\n"
                f"      F: {self.F}\n"
                f"      L: {self.L}\n"
                f"      V: {self.V}\n"
                f"   beta: {self.beta}\n"
                f"      z: {self.z}\n"
                f"      x: {self.x}\n"
                f"      y: {self.y}\n"
                f"      K: {self.K}")