-
Notifications
You must be signed in to change notification settings - Fork 0
Transport Energy
Source File: opgee/processes/transport_energy.py
This method calculates fuel consumption for transporting petroleum products from origin to destination. It accounts for multiple transport modes (ocean tanker, barge, pipeline, rail, truck) and different fuel types (diesel, residual oil, natural gas, electricity).
def get_transport_energy_dict(self,
field,
parameter_table,
transport_share_fuel,
transport_by_mode,
LHV_rate,
prod_type)The Field object containing process data and configuration.
DataFrame from opgee/tables/transport-parameter.csv with two columns:
- Product column (e.g., "Crude", "LNG", "Diluent", "Petrocoke")
- "Units" column
Key parameters (most are constant across products except Petrocoke):
- Tanker/barge capacities and speeds
- Load factors for origin and destination trips
- Pipeline energy intensities for different engine types
- Rail energy intensity: 370 btu/tonne/mile
- Feed loss: 62 btu/mmbtu
Special note: Petrocoke has zero values for all pipeline-related parameters.
DataFrame from opgee/tables/transport-share-fuel.csv, filtered by product type.
Columns: Method, Diesel, Residual oil, Natural gas, Electricity
Methods: tanker, barge, pipeline, rail, truck
Example values (Crude):
- Tanker/Barge: 100% residual oil
- Pipeline: 45% diesel, 55% natural gas
- Rail/Truck: 100% diesel
DataFrame specifying transport fractions and distances for each method.
Columns: Fraction, Distance
Source:
- Most products:
opgee/tables/transport-by-mode.csv - Crude Oil: Derived from field attributes in
attributes.xmlviaCrudeOilTransport.cache_attributes()
Lower Heating Value rate for the product (units: energy/time).
Calculation in CrudeOilTransport:
oil_mass_rate = input_oil.liquid_flow_rate("oil") # mass/time
oil_mass_energy_density = self.oil.mass_energy_density() # btu/lb
oil_LHV_rate = oil_mass_rate * oil_mass_energy_density # energy/timeProduct type string: "crude", "lng", "diluent", or "petrocoke"
Extract parameters from parameter_table:
Ocean Tanker:
- Load factor to origin: 0.7
- Load factor to destination: 0.8
- Speed: 18.52 mph
- Size: field.ocean_tanker_size (default: 250,000 tonne)
Barge:
- Load factor to origin: 0.6
- Load factor to destination: 0.8
- Speed: 5 mph
- Capacity: 22,500 tonne
Pipeline:
- Energy intensities (btu/tonne/mile):
- Turbine: 240 (0 for Petrocoke)
- Engine current: 270 (0 for Petrocoke)
- Engine future: 260 (0 for Petrocoke)
- Power fractions:
- Turbine: 0.55 (0 for Petrocoke)
- Engine current: 0.36 (0 for Petrocoke)
- Engine future: 0.09 (0 for Petrocoke)
Rail:
- To destination: 370 btu/tonne/mile
- Return (hardcoded): 200 btu/tonne/mile
Truck:
- Both directions (hardcoded): 969 btu/tonne/mile
Feed Loss: 62 btu/mmbtu
The method calls transport_energy_intensity() four times to calculate energy consumption for water transport:
For both tankers and barges:
-
Energy consumption per horsepower-hour:
energy_consumption = (14.42 / load_factor + const) × 0.735 × residual_oil_LHV / residual_oil_densityWhere:
- const = 150 for tankers, 350 for barges
- residual_oil_LHV = 140,352.52 btu/gal (from
opgee/tables/constants.csv) - residual_oil_density = 3,752 g/gal (from
opgee/tables/constants.csv) - Units: btu/hp/hr
-
Horsepower calculation:
- Tanker:
hp = 9,070 + 0.101 × tanker_size(in tonnes) - Barge:
hp = 5,600 / 22,500 × barge_capacity(in tonnes)
- Tanker:
-
Final energy intensity:
energy_intensity = (energy_consumption × load_factor × hp) / (speed × capacity)Units: btu/tonne/mile
- Ocean tanker, origin to destination (load_factor = 0.8)
- Ocean tanker, destination to origin (load_factor = 0.7)
- Barge, origin to destination (load_factor = 0.8)
- Barge, destination to origin (load_factor = 0.6)
Weighted sum of three pipeline engine types:
pipeline_energy_intensity =
(240 × 0.55) + (270 × 0.36) + (260 × 0.09) = 252.6 btu/tonne/mile
Note: For Petrocoke, this equals 0 since all pipeline parameters are 0.
Origin to Destination Series (btu/tonne/mile):
- [tanker_orig_dest, barge_orig_dest, pipeline (252.6), rail (370), truck (969)]
Destination to Origin Series (btu/tonne/mile):
- [tanker_dest_orig, barge_dest_orig, pipeline (0), rail (200), truck (969)]
-
Determine denominator based on product type:
- Diluent:
field.get_process_data("final_diluent_LHV_mass") - LNG:
field.gas.component_LHV_mass["C1"] - Crude:
field.get_process_data("crude_LHV") - Petrocoke:
field.model.const("petrocoke-heating-value") / 1.10231
- Diluent:
-
Calculate normalized energy consumption:
transport_energy_consumption = (origin_to_dest_series + dest_to_origin_series) / denominator
The static method fuel_consumption() calculates consumption for each fuel type:
For each fuel carrier (Diesel, Residual oil, Natural gas, Electricity):
fuel_consumption[carrier] = sum(
transport_energy_consumption ×
transport_distance ×
fraction_transport ×
fuel_share_fraction
) × LHV_rate + (LHV_rate × feed_loss if carrier == "Diesel" else 0)Breakdown:
-
transport_energy_consumption: Series indexed by transport method (normalized energy per distance) -
transport_distance: Series of distances for each method (e.g., 2,500 miles for Crude pipeline) -
fraction_transport: Series of fractions for each method (e.g., 1.0 for Crude pipeline, 0 for others) -
fuel_share_fraction: Fuel share for this method and carrier (e.g., 0.45 for pipeline diesel) -
LHV_rate: Product's total energy flow rate -
feed_loss: Additional 62 btu/mmbtu for diesel only (accounts for upstream production losses)
Example for Crude Oil Pipeline with Diesel:
consumption = (pipeline_energy_intensity / crude_LHV) × 2,500 miles × 1.0 × 0.45 × oil_LHV_rate + oil_LHV_rate × 62 btu/mmbtu
Dictionary with fuel consumption for each energy carrier:
{
"Diesel": Quantity(..., "mmBtu/day"),
"Residual oil": Quantity(..., "mmBtu/day"),
"Natural gas": Quantity(..., "mmBtu/day"),
"Electricity": Quantity(..., "mmBtu/day")
}Source File: opgee/processes/crude_oil_transport.py
def run(self, analysis):
# Get input stream
input_oil = self.find_input_stream("oil")
# Calculate LHV rate
oil_mass_rate = input_oil.liquid_flow_rate("oil")
oil_mass_energy_density = self.oil.mass_energy_density()
oil_LHV_rate = oil_mass_rate * oil_mass_energy_density
# Get transport data from field attributes
# (frac_transport_*, transport_dist_* from attributes.xml)
# Calculate fuel consumption
fuel_consumption = field.transport_energy.get_transport_energy_dict(
self.field,
self.transport_parameter, # Crude column from transport-parameter.csv
self.transport_share_fuel, # Crude row from transport-share-fuel.csv
self.transport_by_mode, # From field attributes
oil_LHV_rate,
"Crude"
)
# Set energy use
for name, value in fuel_consumption.items():
energy_use.set_rate(get_energy_carrier(name), value.to("mmBtu/day"))- Main implementation:
opgee/processes/transport_energy.py - Crude oil usage:
opgee/processes/crude_oil_transport.py - LNG usage:
opgee/processes/LNG_transport.py - Parameters:
opgee/tables/transport-parameter.csv - Fuel shares:
opgee/tables/transport-share-fuel.csv - Transport modes:
opgee/tables/transport-by-mode.csv - Constants:
opgee/tables/constants.csv