ccp.Impeller#

class ccp.Impeller(points)#

An impeller with a performance map.

Impeller instance is initialized with the list of points. The created instance will hold the dimensional points used in instantiation. Curves will be generated from points close in similarity.

Parameters
pointslist

List with ccp.Point objects.

Returns
impellerccp.Impeller

Methods

__init__(points)#
classmethod convert_from(original_impeller, suc=None, find='speed', speed=None)#

Convert performance map from an impeller.

Parameters
original_impellerccp.Impeller, list

The original impeller. A list of impeller can also be passed. In this case the curves will be converted based on the impeller with the closest suction speed of sound to the new suction condition.

succcp.State

The new suction condition to which we want to convert to.

findstr, optional

The method in which the curves will be converted. For now only ‘speed’ is implemented, which means that, based on volume ratio, we calculate new values of speed for each curve and the respective discharge condition.

speedfloat, pint.Quantity, str, optional

Desired speed. If find=”speed”, this can be None or ‘same’ to keep the same speed values available in the original_impeller.

Returns
converted_impellerccp.Impeller

The new impeller with the converted performance map for the required suction condition.

curve(speed=None)#

Calculate specific point in the performance map.

Given a speed this method will calculate a curve in the impeller map according to these arguments.

Parameters
speedpint.Quantity, float

Speed (rad/s).

Returns
curveccp.Curve

Point in the performance map.

export_to_excel(path_name=None)#

Export curves to excel file.

classmethod load(file)#

Load impeller from toml file.

Parameters
filestr or pathlib.Path

Filename to which the data is saved.

Returns
impellerccp.Impeller

Impeller object.

classmethod load_from_dict(suc, head_curves=None, eff_curves=None, power_curves=None, power_shaft_curves=None, pressure_ratio_curves=None, disch_T_curves=None, b=<Quantity(0.005, 'meter')>, D=<Quantity(0.5, 'meter')>, number_of_points=10, flow_units='m**3/s', flow_units_head=None, flow_units_eff=None, flow_units_power=None, flow_units_power_shaft=None, flow_units_pressure_ratio=None, flow_units_disch_T=None, head_units='J/kg', eff_units='dimensionless', pressure_ratio_units='dimensionless', disch_T_units='degK', power_units='W', power_shaft_units='W', power_losses_units='W', speed_units='RPM')#

Create points from dict object.

In this case the dict is in the following format:

curve = {
‘10000’: {

‘x1’: [list with flow values], ‘x2’: [list with head or eff values] ‘x3’: power losses value},

…}

Where 10000 is the speed for that curve.

succcp.State

Suction state.

head_curvesdict

Dict with head/flow values.

eff_curvesdict

Dict with eff/flow values.

power_curvesdict

Dict with power/flow values.

bfloat, pint.Quantity

Impeller width at the outer blade diameter (m).

Dfloat, pint.Quantity

Impeller outer diameter (m).

number_of_pointsint

Number of points that will be interpolated.

flow_unitsstr

Flow units used in the dict.

flow_units_head: str

Flow units used in the dict for head curves. Only needed when flow units for head curve differs from other curves.

flow_units_eff: str

Flow units used in the dict for efficiency curves. Only needed when flow units for efficiency curve differs from other curves.

flow_units_power: str

Flow units used in the dict for power curves. Only needed when flow units for power curve differs from other curves.

flow_units_power_shaft: str

Flow units used in the dict for shaft power curves. Only needed when flow units for power curve differs from other curves.

flow_units_pressure_ratio: str

Flow units used in the dict for pressure ratio curves. Only needed when flow units for efficiency curve differs from other curves.

flow_units_disch_T: str

Flow units used in the dict for discharge Temperature curves. Only needed when flow units for efficiency curve differs from other curves.

head_unitsstr

Head units used in the dict. If the curve head units are in meter you can use: head_units=”m*g0”.

eff_unitsstr

Dimensionless.

power_unitsstr

Power units used in the dict.

power_shaft_unitsstr

Shaft power units used in the dict.

power_losses_unitsstr

Mechanical power losses units used in the dict.

pressure_ratio_unitsstr

Pressure ratio units used in the dict.

disch_T_unitsstr

Discharge temperature units used in the dict.

speed_unitsstr

Speed units used in the dict.

classmethod load_from_dict_isis(suc, head_curves, eff_curves, b=<Quantity(0.005, 'meter')>, D=<Quantity(0.5, 'meter')>, number_of_points=10, flow_units='m**3/s', head_units='J/kg', speed_units='RPM')#

Create points from dict object available in the ISIS platform.

The dict is in the following format:

head_curves_dict = [

{

“z”: 11373, “points”: [

{“x”: 94529, “y”: 148.586}, {“x”: 98641, “y”: 148.211}, {“x”: 101554, “y”: 147.837},

…]

…, }, ]

Where z is the speed and each point is described as a dict with x and y pair where x is the flow and y is the head or eff.

succcp.State

Suction state.

head_curvedict

Dict with head/flow values.

eff_curvedict

Dict with head/flow values.

bfloat, pint.Quantity

Impeller width at the outer blade diameter (m).

Dfloat, pint.Quantity

Impeller outer diameter (m).

number_of_pointsint

Number of points that will be interpolated.

flow_unitsstr

Flow units used in the dict.

head_unitsstr

Head units used in the dict. If the curve head units are in meter you can use: head_units=”m*g0”.

speed_unitsstr

Speed units used in the dict.

Examples

>>> import ccp
>>> composition_fd = dict(
...    n2=0.4,
...    co2=0.22,
...    methane=92.11,
...    ethane=4.94,
...    propane=1.71,
...    ibutane=0.24,
...    butane=0.3,
...    ipentane=0.04,
...    pentane=0.03,
...    hexane=0.01,
... )
>>> suc_fd = State(p=Q_(3876, "kPa"), T=Q_(11, "degC"), fluid=composition_fd)
>>> imp = ccp.Impeller.load_from_dict_isis(
...    suc=suc_fd,
...    head_curves=head_curves_dict,
...    eff_curves=eff_curves_dict,
...    b=Q_(10.6, "mm"),
...    D=Q_(390, "mm"),
...    number_of_points=6,
...    flow_units="kg/h",
...    head_units="kJ/kg",
... )
classmethod load_from_engauge_csv(suc, curve_name, curve_path, b=<Quantity(0.005, 'meter')>, D=<Quantity(0.5, 'meter')>, number_of_points=10, flow_units='m**3/s', flow_units_head=None, flow_units_eff=None, flow_units_power=None, flow_units_power_shaft=None, flow_units_pressure_ratio=None, flow_units_disch_T=None, head_units='J/kg', eff_units='dimensionless', power_units='W', power_shaft_units='W', power_losses_units='W', pressure_ratio_units='dimensionless', disch_T_units='degK', speed_units='RPM', **kwargs)#

Convert points from csv generated by engauge to csv with 6 points at same flow for use on hysys.

The csv files should be generated with engauge with the following procedure: First, copy the image of the curve to your clipboard, then inside engauge digitizer:

  • Edit -> Paste as new

  • Name each curve with their respective speed value (e.g. 10322);

  • If the curve is for shaft power, you can add the power loss next to the speed value (e.g. 10322, 82);

  • On Axis Point -> add 3 reference points

  • Select the curve (e.g. 10322 would be the curve for 10322 RPM)

  • Select the points using the segment fill tool;

  • Select the next curve and points…

  • Settings -> Export Setup -> Select:

  • Raws X’s and Y’s ; One curve on each line

Files should be saved with the following convention:
  • <curve-name>-head.csv

  • <curve-name>-eff.csv

succcp.State

Suction state.

curve_pathpathlib.Path

Path to the curves.

curve_namestr

Name for head and efficiency curve. Curves should have names <curve_name>-head.csv and <curve-name>-eff.csv.

bfloat, pint.Quantity

Impeller width at the outer blade diameter (m).

Dfloat, pint.Quantity

Impeller outer diameter (m).

number_of_pointsint

Number of points that will be interpolated.

flow_unitsstr

Flow units used when extracting data with engauge.

flow_units_head: str

Flow units used when extracting data with engauge for head curves. Only needed when flow units for head curve differs from other curves.

flow_units_eff: str

Flow units used when extracting data with engauge for efficiency curves. Only needed when flow units for efficiency curve differs from other curves.

flow_units_power: str

Flow units used when extracting data with engauge for power curves. Only needed when flow units for power curve differs from other curves.

flow_units_power_shaft: str

Flow units used when extracting data with engauge for shaft power curves. Only needed when flow units for power curve differs from other curves.

flow_units_pressure_ratio: str

Flow units used when extracting data with engauge for pressure ratio curves. Only needed when flow units for power curve differs from other curves.

flow_units_disch_T: str

Flow units used when extracting data with engauge for discharge temperature curves. Only needed when flow units for efficiency curve differs from other curves.

head_unitsstr

Head units used when extracting data with engauge. If the curve head units are in meter you can use: head_units=”m*g0”.

eff_unitsstr

Dimensionless.

power_unitsstr

Power units used when extracting data with engauge.

power_shaft_unitsstr

Shaft power units used when extracting data with engauge.

power_losses_unitsstr

Power losses units used when extracting data with engauge.

pressure_ratio_unitsstr

Pressure ratio units used when extracting data with engauge.

disch_T_unitsstr

Discharge temperature units used when extracting data with engauge.

speed_unitsstr

Speed units used when extracting data with engauge.

point(flow_v=None, flow_m=None, speed=None)#

Calculate specific point in the performance map.

Given a volumetric flow and a speed this method will calculate a point in the impeller map according to these arguments.

Parameters
flow_vpint.Quantity, float

Volumetric flow (m³/s).

flow_mpint.Quantity, float

Mass flow (kg/s).

speedpint.Quantity, float

Speed (rad/s).

Returns
pointccp.Point

Point in the performance map.

save(file)#

Save impeller to a toml file.

Parameters
filestr or pathlib.Path

Filename to which the data is saved.

save_hysys_csv(curve_dir)#

Save curve to a csv with hysys format.

curve_path: pathlib.Path

Path for directory where the files will be saved.

save_isis_txt(file, parameter)#

Save curves to a csv with isis format.

Parameters
filestr or pathlib.Path

Filename to which the data is saved.

parameterstr

Parameter name. Can be “head”, “eff”, “power”, “pressure_ratio” or “disch_T”.

Examples

>>> impeller.save_isis_txt("head.txt", parameter="head")