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
— FunctionBuilds the transient optimal gas flow Nonlinear problem
Variables
GasModels.variable_density
— Functionvariables associated with density (transient)
GasModels.variable_compressor_flow
— Functionvariables associated with compressor mass flow (transient)
GasModels.variable_c_ratio
— Functionvariables associated with compression ratio (transient)
GasModels.variable_compressor_power
— Functionvariables associated with compression power (transient)
GasModels.variable_pipe_flux_avg
— Functionvariables associated with pipe flux average (transient)
GasModels.variable_pipe_flux_neg
— Functionvariables associated with pipe flux negative (transient)
GasModels.variable_injection
— Functionvariables associated with injection in receipts (transient)
GasModels.variable_withdrawal
— Functionvariables associated with withdrawal in deliveries (transient)
GasModels.variable_transfer_flow
— Functionvariables associated with net withdrawal in transfers (transient)
GasModels.variable_storage_flow
— Functionvariables associated with storage flows
GasModels.variable_storage_c_ratio
— Functionvariables associated with well compressor/regulator ratio
GasModels.variable_reservoir_density
— Functionvariables associated with reservoir density
GasModels.variable_well_density
— Functionvariables associated with the nodal densities of the well
GasModels.variable_well_flux_avg
— Functionvariables associated with the average well fluxes for the storages
GasModels.variable_well_flux_neg
— Functionvariables 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
— Functionvariables associated with pipe flux (from)
GasModels.variable_pipe_flux_to
— Functionvariables associated with pipe flux (to)
GasModels.variable_well_flux_fr
— Functionvariables associated with the (from) well fluxes for the storages
GasModels.variable_well_flux_to
— Functionvariables associated with the (to) well fluxes for the storages
GasModels.expression_density_derivative
— Functiondensity derivative
GasModels.expression_net_nodal_injection
— Functionnet nodal injection
GasModels.expression_net_nodal_edge_out_flow
— Functionnet nodal edge flow out
GasModels.expression_compressor_power
— Functioncompression power
GasModels.expression_well_density_derivative
— Functiondensity derivative for well nodal densities
GasModels.expression_reservoir_density_derivative
— Functiondensity derivative for storage reservoir
Constraints and Constraint Templates
GasModels.constraint_slack_junction_density
— FunctionConstraint: fixing slack node density value
Template: fixing slack node density value
GasModels.constraint_nodal_balance
— FunctionConstraint: nodal balance
Missing docstring for constraint_nodal_balance
. Check Documenter's build log for details.
GasModels.constraint_pipe_mass_balance
— FunctionConstraint: pipe mass balance
Template: pipe mass balance
GasModels.constraint_pipe_momentum_balance
— FunctionConstraint: pipe momentum balance
Template: pipe momentum balance
GasModels.constraint_compressor_physics
— FunctionConstraint: compressor physics
Template: compressor physics
GasModels.constraint_compressor_power
— FunctionConstraint: compressor power
Template: compressor power
GasModels.constraint_storage_compressor_regulator
— FunctionTemplate: storage compression/pressure-reduction
Constraint: well compression/pressure-reduction
GasModels.constraint_storage_well_momentum_balance
— FunctionTemplate: well momentum balance
Constraint: well momentum balance
GasModels.constraint_storage_well_mass_balance
— FunctionTemplate: well mass balance
Constraint: well mass balance
GasModels.constraint_storage_well_nodal_balance
— FunctionConstraint: storage well nodal balance
GasModels.constraint_storage_bottom_hole_reservoir_density
— FunctionConstraint: equivalence of bottom hole density and reservoir density
GasModels.constraint_storage_reservoir_physics
— FunctionConstraint: 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
— Functionminimum load shedding objective for transient OGF problem
GasModels.objective_min_transient_compressor_power
— Functionminium compressor power objective for transient OGF problem
GasModels.objective_min_transient_economic_costs
— Functiontransient objective for minimizing a linear combination of compressor power and load shed