Transient Problem Specifications
Optimal Gas Flow
The transient optimal gas flow problem optimizes a linear combination of the total compressor power and the total load shed in the system subject to the time-varying pipeline dynamics modeled as ordinary-differential equations (ODEs), discretized using Backward Euler scheme. The readers are referred to this paper or its (arxiv version) for a derivation of the ODEs. Also, note that the Optimal Gas Flow problem currently can work with only time-periodic time-series data. If the data is not time-periodic, then GasModels will try to fit a time-periodic spline to the data and then run the transient optimal gas flow problem.
Model
GasModels.build_transient_ogf — Function
Builds the transient optimal gas flow Nonlinear problem
Variables
GasModels.variable_density — Function
variables associated with density (transient)
GasModels.variable_compressor_flow — Function
variables associated with compressor mass flow (transient)
GasModels.variable_c_ratio — Function
variables associated with compression ratio (transient)
GasModels.variable_compressor_power — Function
variables associated with compression power (transient)
GasModels.variable_pipe_flux_avg — Function
variables associated with pipe flux average (transient)
GasModels.variable_pipe_flux_neg — Function
variables associated with pipe flux negative (transient)
GasModels.variable_injection — Function
variables associated with injection in receipts (transient)
GasModels.variable_withdrawal — Function
variables associated with withdrawal in deliveries (transient)
GasModels.variable_transfer_flow — Function
variables associated with net withdrawal in transfers (transient)
GasModels.variable_storage_flow — Function
variables associated with storage flows
GasModels.variable_storage_c_ratio — Function
variables associated with well compressor/regulator ratio
GasModels.variable_reservoir_density — Function
variables associated with reservoir density
GasModels.variable_well_density — Function
variables associated with the nodal densities of the well
GasModels.variable_well_flux_avg — Function
variables associated with the average well fluxes for the storages
GasModels.variable_well_flux_neg — Function
variables associated with the neg. well fluxes for the storages
Expressions
The following linear and non-linear expressions are created by the formulation for ease of formulating the constraints
GasModels.variable_pipe_flux_fr — Function
variables associated with pipe flux (from)
GasModels.variable_pipe_flux_to — Function
variables associated with pipe flux (to)
GasModels.variable_well_flux_fr — Function
variables associated with the (from) well fluxes for the storages
GasModels.variable_well_flux_to — Function
variables associated with the (to) well fluxes for the storages
GasModels.expression_density_derivative — Function
density derivative
GasModels.expression_net_nodal_injection — Function
net nodal injection
GasModels.expression_net_nodal_edge_out_flow — Function
net nodal edge flow out
GasModels.expression_compressor_power — Function
compression power
GasModels.expression_well_density_derivative — Function
density derivative for well nodal densities
GasModels.expression_reservoir_density_derivative — Function
density derivative for storage reservoir
Constraints and Constraint Templates
GasModels.constraint_slack_junction_density — Function
Constraint: fixing slack node density value
Template: fixing slack node density value
GasModels.constraint_nodal_balance — Function
Constraint: nodal balance
GasModels.constraint_pipe_mass_balance — Function
Constraint: pipe mass balance
Template: pipe mass balance
GasModels.constraint_pipe_momentum_balance — Function
Constraint: pipe momentum balance
Template: pipe momentum balance
GasModels.constraint_compressor_physics — Function
Constraint: compressor physics
Template: compressor physics
GasModels.constraint_compressor_power — Function
Constraint: compressor power
Template: compressor power
GasModels.constraint_storage_compressor_regulator — Function
Template: storage compression/pressure-reduction
Constraint: well compression/pressure-reduction
GasModels.constraint_storage_well_momentum_balance — Function
Template: well momentum balance
Constraint: well momentum balance
GasModels.constraint_storage_well_mass_balance — Function
Template: well mass balance
Constraint: well mass balance
GasModels.constraint_storage_well_nodal_balance — Function
Constraint: storage well nodal balance
GasModels.constraint_storage_bottom_hole_reservoir_density — Function
Constraint: equivalence of bottom hole density and reservoir density
GasModels.constraint_storage_reservoir_physics — Function
Constraint: reservoir physics
Objective
Three types of objectives are supported by the transient OGF problem (i) a load shedding objective, (ii) a compressor power objective, and (iii) a linear combination of both controlled by the optional argument economic_weighting in the Matlab static file.
GasModels.objective_min_transient_load_shed — Function
minimum load shedding objective for transient OGF problem
GasModels.objective_min_transient_compressor_power — Function
minium compressor power objective for transient OGF problem
GasModels.objective_min_transient_economic_costs — Function
transient objective for minimizing a linear combination of compressor power and load shed