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')

Convert performance map from an impeller.

Parameters
original_impellerccp.Impeller

The original impeller.

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.

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, eff_curves, b=None, D=None, number_of_points=10, flow_units='m**3/s', head_units='J/kg', speed_units='RPM')

Create points from dict object.

In this case the dict is in the following format:

curve = {
‘10000’: {

‘x’: [list with flow values], ‘y’: [list with head or eff values] },

…}

Where 10000 is the speed for that curve.

succcp.State

Suction state.

head_curvedict

Dict with head/flow values.

eff_curvedict

Dict with head/flow values.

bfloat, pint.Quantity

Impeller width (m).

Dfloat, pint.Quantity

Impeller 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.

classmethod load_from_dict_isis(suc, head_curves, eff_curves, b=None, D=None, 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 (m).

Dfloat, pint.Quantity

Impeller 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.define(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=None, D=None, number_of_points=10, flow_units='m**3/s', head_units='J/kg', speed_units='RPM')

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;

  • 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 (m).

Dfloat, pint.Quantity

Impeller diameter (m).

number_of_pointsint

Number of points that will be interpolated.

flow_unitsstr

Flow units used when extracting data with engauge.

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”.

speed_unitsstr

Speed units used when extracting data with engauge.

plot_func(attr)
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.