MatlabPetroleum Format (.m)

Here we detail the parameters that can be inputted using the matpetroleum format. They can be inputted in the order they appear here, or selectively, in the case where some data is not required, by using the following (example) header format.

%% junction data
% junction_i type head_min head_max elevation status

See case files in test/data/ for examples of file syntax.

Junctions (mpc.junction)

These components model “point” locations in the system, i.e. locations of withdrawal or injection, or simply connection points between pipes. Each junction may have multiple pipes attached.

ParameterTypeNameStandard Units (SI)United States Customary UnitsRequiredDescription
junction_iIntJunction idYUnique id for junctions
typeIntJunction TypeYClassification of the junction: 0 = standard node, 1 = slack node
head_minFloat64Head MinimummftYMinimum operating head used in line pack calculations, which is higher than the minimum allowable
head_maxFloat64Head MaximummftYMaximum operating head used in line pack calculations, which is lower than the maximum allowable
elevationFloat64ElevationmftElevation of the junction
statusIntJunction StatusYDetermines if the component is active in the model

Pipes (mpc.pipe)

These components model pipelines which connect two junctions.

ParameterTypeNameStandard Units (SI)United States Customary UnitsRequiredDescription
pipeline_iIntPipe idYUnique id for pipes
fr_junctionIntFrom Junction idYUnique id of the junction on the from side
to_junctionIntTo Junction idYUnique id of the junction on the to side
diameterFloat64DiametermftYPipe diameter
lengthFloat64LengthmftYPipe Length
fiction_factorFloat64Friction coefficients2/ms2/ftCoefficient in the Leibenzon equation for turbulent flow
flow_minFloat64Flow Rate Minimumm3/sft3/hYMinimum allowable operating flow rate, usually depends on pipe diameter
flow_maxFloat64Flow Rate Maximumm3/sft3/hYMaximum allowable operating flow rate, usually depends on pipe diameter
statusIntPipe statusYDetermines if the component is active in the model

Pumps (mpc.pump)

These components model infrastructure used to boost pressure between two nodes.

ParameterTypeNameStandard Units (SI)United States Customary UnitsRequiredDescription
pump_iIntPump idYUnique id for pump
fr_junctionIntFrom Junction idYUnique id of the junction on the from side
to_junctionIntTo Junction idYUnique id of the junction on the to side
station_iIntPump station idYUnique id of the station including up to 3 pumps
rotation_coefficientFloat64Pump rotation coefficientmftYPump coefficient required to define pump head
flow_coefficientFloat64Pump flow coefficients2/m5h2/ft5YPump coefficient required to define pump head
flow_nomFloat64Nominal flow ratem3/sft3/hYPump nominal flow rate
flow_maxFloat64Maximum flow ratem3/sft3/hYPump maximum flow rate
deltaheadmaxFloat64Maximum head differencemftYMaximum pump head difference
deltaheadminFloat64Minimum head differencemftYMinimum pump head difference
pumpefficiencyminFloat64Minimum pump efficiencyYMinimum pump efficiency inlet
pumpefficiencymaxFloat64Maximum pump efficiencyYMaximum pump efficiency inlet
rotation_nomIntNominal rotational speedrotations/srotations/minuteYNominal pump rotational speed
rotation_minIntMinimum rotational speedrotations/srotations/minuteYMinimum pump rotational speed
rotation_maxIntMaximum rotational speedrotations/srotations/minuteYMaximum pump rotational speed
electricity_priceFloat64Electricity price$/(kW*s)$/(kW*h)YElectricity price for every pump maintain
statusIntPump statusYDetermines if the component is active in the model
electricmotorefficiencyFloat64Efficiency of the pump's motorYPump constant for computing pump efficiency
mechanicaltransmissionefficiencyFloat64Efficiency of the pump's transmissionYPump constant for computing pump efficiency

Producers (mpc.producer)

These components model producers of product.

ParameterTypeNameStandard Units (SI)United States Customary UnitsRequiredDescription
producer_iIntproducer idYUnique id for producer
junction_idIntJunction idYUnique id of Junction to which component is connected
injection_minFloat64Minimum injectionm3/sft3/hYMinimum flow rate that can be injected
injection_maxFloat64Maximum Injectionm3/sft3/hYMaximum flow rate that can be injected
qgFloat64Fixed flow ratem3/sft3/hYProducer flow rate if it's fixed
statusIntproducer statusYDetermines if the component is active in the model
is_dispatchableIntDispatchableYIf the component is marked as dispatchable, it means that it can vary its injection between its minimum and maximum. If not, then the component is injecting exactly at the fixed injection rate
offer_priceFloat64Offer Price$/m3$/ft3Offer price

Consumers (mpc.consumer)

ParameterTypeNameStandard Units (SI)United States Customary UnitsRequiredDescription
consumer_iIntconsumer idYUnique id for consumer
junction_idIntJunction idYUnique id of Junction to which component is connected
withdrawal_minFloat64Minimum Withdrawalm3/sft3/hYMinimum flow rate that can be withdrawn
withdrawal_maxFloat64Maximum Withdrawalm3/sft3/hYMaximum flow rate that can be withdrawn
qlFloat64Fixed flow ratem3/sft3/hYConsumer flow rate if it's fixed
statusIntconsumer statusYDetermines if the component is active in the model
is_dispatchableIntDispatchableYIf the component is marked as dispatchable, it means that it can vary its withdrawal between its minimum and maximum. If not, then the component is withdrawal_nominal exactly at the fixed flow rate
bid_priceFloat64Bid Price$/m3$/ft3Bid price

Network Parameters (mpc.parameter)

ParameterTypeNameStandard Units (SI)United States Customary UnitsRequiredDescription
densityFloat64Densitykg/m3lbm/ft3Liquid density
viscosityFloat64Viscositym s2/sft2/sLiquid kinematic viscosity
gravitational_accelerationFloat64Gravitym/s2ft/s2Gravitational acceleration
base_headFloat64Base HeadmftBase head
base_lengthFloat64Base LengthmftBase length
base_flowFloat64Base Flow Ratem3/sft3/hBase flow rate
unitsStringUnits'si' for standard units or 'usc' for United States customary units
isperunitIntPer-unitIf data is already in per-unit (non-dimensionalized)

Matlab extensions

The matlab format supports extensions which allow users to define arbitrary components and data which are used in customized problems and formulations. For example, the syntax

  %column_names% data_field_name1, data_field_name2, ...
  mpc.component_data = [
  data1, data2
  data1, data2
  ...
  ]

is used to add data to standard components. In this example, the data dictionary for component will be augmented with fields called data_field_name1, data_field_name2, etc. The names trailing the keyword %column_name% are used as the keys in the data dictionary for each component. The key word mpc.component_data is used to indicate the component the new data should be associated with. For example, mpc.pipe_data adds the data to pipes. The data should be listed in the same order as used by the tables that specify the required data for the component. The syntax

  %column_names% data_field_name1, data_field_name2, ...
  mpc.component = [
  data1, data2
  data1, data2
  ...
  ]

is then used to specify completely new components which are not specified in the default format. This example would create an entry from components called component in the data dictionary.