lib.corriente module

Module with stream definition:

  • Corriente: Stream general class model

  • PsyStream: Stream specified as psychrometric state

lib.corriente.translate(context: str, sourceText: str, disambiguation: str = None, n: int = -1) str
class lib.corriente.Corriente(**kwargs)[source]

Bases: Entity

Class to model a stream object Parameters:

-T: temperature, Kelvin -P: Pressure, Pa -x: quality

-caudalMasico: mass flow in kg/s (solid component excluded) -caudalMolar: molar flow in kmol/s (solid component excluded) -caudalVolumetrico: volumetric flow in m3/s -caudalUnitarioMolar: Array with molar flows for each component -caudalUnitarioMasico: Array with mass flows for each component -fraccionMolar: Array with molar fractions for each component -fraccionMasica: Array with mass fractions for each component -mezcla: instance of class Mezcla to define all mixture variables

-solido: Instance of class Solid to define all solid variables -caudalSolido: mass flow, in kg/h for solids component, array for each

solid component

-diametroMedio: mean diameter for particules, in micrometer -distribucion_fraccion: Array with mass fraccion of solid particle

distribution

-distribucion_diametro: Array with particle diameter of solid particle

distribution, in micrometer

-notas: Description text for stream

Aditional parameter for define a corriente with different properties than the project config, components for debug, thermodynamic method for add per stream configuration:

-ids: Array with index of components -solids: Array with index of solids components

-K: Name of method for K values calculation, ej: “SRK”, “Lee-Kesler” -alfa: Name of method for alpha calculation, available only for some K

methods

-mix: Mixing rule for calculate mix properties -H: Name of method for enthalpy calculation, ej: “SRK”, “Lee-Kesler” -Cp_ideal: Bool to choose method for ideal cp:

0 - Ideal parameters 1 - DIPPR parameters

-MEoS: Use meos equation if is available -iapws: Use iapws97 standard for water -GERG: Use GERG-2008 equation if is available -freesteam: Use freesteam external library for water -coolProp: Use coolProp external library if is available -refprop: Use refProp external library if is available

Attributes:
calculable
psystream
solido

Methods

__call__(**kwargs)

Add callable functionality, so it can be possible add kwargs, advanced functionality can be added in subclass

clone(**kwargs)

Create a new stream instance with change only kwags new values

propertiesListTitle(index)

Define los titulos para los popup de listas

propertiesNames()

List with properties availables for show in poput

readFromJSON(data)

Read entity from file

readStatefromJSON(state)

Read entity state from JSON file

writeStatetoJSON(state)

Write entity state to JSON file

writeToJSON(data)

Read entity from file

calculo

setSolid

txt

status = 0
msg = 'Unknown variables'
kwargs_forbidden = ['entrada', 'mezcla', 'solido']
solido = None
__init__(**kwargs)[source]

Class constructor, copy kwargs for child class, it can be customize for child class to add functionality

kwargs = {'Cp_ideal': None, 'GERG': None, 'H': '', 'K': '', 'MEoS': None, 'P': 0.0, 'T': 0.0, 'alfa': '', 'caudalMasico': 0.0, 'caudalMolar': 0.0, 'caudalSolido': [], 'caudalUnitarioMasico': [], 'caudalUnitarioMolar': [], 'caudalVolumetrico': 0.0, 'coolProp': None, 'diametroMedio': 0.0, 'distribucion_diametro': [], 'distribucion_fraccion': [], 'fraccionMasica': [], 'fraccionMolar': [], 'freesteam': None, 'iapws': None, 'ids': [], 'mezcla': None, 'mix': '', 'refprop': None, 'solido': None, 'solids': None, 'x': None}
property calculable
calculo()[source]
_method()[source]

Find the thermodynamic method to use Define internal variables to know the definition:

_thermo: Method of definition, one of this values:

eos, iapws, freesteam, meos, coolprop, refprop, gerg

_dependence: In advanced method with external dependencias define

the neccesary dependences to calculate

setSolid(solid)[source]
property psystream
clone(**kwargs)[source]

Create a new stream instance with change only kwags new values

txt()[source]
_doc()[source]

Return a text repr of class with all properties

classmethod propertiesNames()[source]

List with properties availables for show in poput

propertiesListTitle(index)[source]

Define los titulos para los popup de listas

writeToJSON(data)[source]

Read entity from file

writeStatetoJSON(state)[source]

Write entity state to JSON file

readFromJSON(data)[source]

Read entity from file

readStatefromJSON(state)[source]

Read entity state from JSON file

class lib.corriente.PsyStream(**kwargs)[source]

Bases: Entity

Class to model a stream as psychrometric state kwargs definition parameters:

P: Pressure, Pa z: altitude, m

tdp: dew-point temperature tdb: dry-bulb temperature twb: web-bulb temperature w: Humidity Ratio [kg water/kg dry air] HR: Relative humidity h: Mixture enthalpy v: Mixture specified volume state: opcional for predefined psychrometric state

P: input for barometric pressure, z is an alternate pressure input

For flow definition, one of:

caudalMasico caudalVolumetrico caudalMolar

Attributes:
calculable
corriente

Methods

__call__(**kwargs)

Add callable functionality, so it can be possible add kwargs, advanced functionality can be added in subclass

calculo

updateFlow

updatekwargsFlow

status = 0
msg = 'undefined'
__init__(**kwargs)[source]

Class constructor, copy kwargs for child class, it can be customize for child class to add functionality

kwargs = {'HR': None, 'P': 0.0, 'caudalMasico': 0.0, 'caudalMolar': 0.0, 'caudalVolumetrico': 0.0, 'h': None, 'state': None, 'tdb': 0.0, 'twb': 0.0, 'v': 0.0, 'w': None, 'z': 0.0}
property calculable
calculo()[source]
updatekwargsFlow(key, value)[source]
updateFlow()[source]
property corriente