ps.storage
ps.storage.ConvectiveDissolution
Section titled “ps.storage.ConvectiveDissolution”ps.storage.ConvectiveDissolution(*, coefficient: Union[ScalarPropertyInput, dict[int, ScalarPropertyInput]]) -> None
The rate the stored gas dissolves into the brine by convective mixing, from a date.
It is a dated change: m.at(date, ps.storage.ConvectiveDissolution(coefficient=0.04)) in a
model with a storage package (ps.storage.Package(kind="co2", ...) or kind="h2"), at
schedule/<date>/convective_dissolution. It writes DRSDTCON (SCHEDULE), and ps.load
reads it back (and refuses DRSDTCON in a deck that declares no storage).
coefficient is the rate’s proportionality constant (DRSDTCON’s first item), a plain
number (Flow’s default 0.04): one number for every PVT region, or one per PVT region of the
model, {region: number}, the regions numbered from 1. A negative number switches the
limit off in its region, which then dissolves at once, as a run stating no DRSDTCON does;
zero dissolves none. Stated in the start’s Event it is written at the schedule’s head; in a
later Event, at its date. DRSDTCON’s further items (PSI, OMEGA, OPTION) are Flow’s defaults.
ps.storage.Diffusion
Section titled “ps.storage.Diffusion”ps.storage.Diffusion(*, formulation: Literal['mass_fraction', 'mole_fraction'], regions) -> None
A storage run’s diffusion: how the stored gas and the water diffuse in each phase.
ps.storage.Diffusion(formulation="mole_fraction", regions={1: {"stored_gas_in_gas": 2.0e-5, "water_in_gas": 2.0e-5, "stored_gas_in_water": 2.0e-9, "water_in_water": 2.0e-9}}) gives
PVT region 1 its four coefficients.
regions maps each PVT region’s number, 1 to n, to its coefficients: the stored gas in gas,
water in gas, stored gas in water and water in water (a mapping of those four names), each a
positive diffusion coefficient in the model’s units, by mass fraction
(formulation="mass_fraction": DIFFAGAS, DIFFAWAT) or by mole fraction
("mole_fraction": DIFFCGAS, DIFFCWAT). The cards (PROPS) state one record per PVT region,
in region order, and switch diffusion on (DIFFUSE in RUNSPEC); ps.load reads them back.
ps.storage.Package(diffusion=...) holds it, at physics/storage/diffusion. The model
refuses it in a run that does not flow both gas and water
(transport.component_diffusion.requires_gas_water).
ps.storage.Package
Section titled “ps.storage.Package”ps.storage.Package(*, kind: Literal['co2', 'h2'], components: tuple[typing.Literal['co2', 'h2', 'h2o'], ...], initial_composition: CompositionVsDepth | None = None, simulator_supplied_phases: tuple[typing.Literal['oil', 'gas', 'water'], ...] = (), gas_dissolves_in_water: bool = False, water_vaporizes_in_gas: bool = False, dissolved_gas: bool = False, activity_model: Optional[Literal['rumpf_spycher_pruess_iterative', 'duan_sun_iterative', 'duan_sun_direct']] = None, salinity: UniformSalinity | None = None, temperature: ConstantTemperature | TemperatureVsDepth | None = None, diffusion: Diffusion | None = None, compositions: tuple[Composition, ...] = ()) -> None
CO2 or hydrogen storage in brine: Flow’s storage model and what the run states with it.
ps.storage.Package(kind="co2", components=["co2", "h2o"]) turns on carbon dioxide storage in
brine; ps.Model(physics=[...]) holds it, at physics/storage.
kind switches the model on (CO2STORE or H2STORE in RUNSPEC), whose own correlations
supply the stored gas’s and the brine’s PVT; ps.load reads each card it writes back
except ACTCO2S. components is the declared species slate, which names the stored species
(“co2” or “h2”) and may name the brine’s (“h2o”); its length is the component count, so a
slate of more than the stored species, or one with initial_composition or
compositions, writes COMPS (RUNSPEC), NCOMPS and CNAMES (PROPS) counted from it. OPM
Flow ignores COMPS, NCOMPS, ZMFVD, WELLSTRE and WINJGAS.
temperature is the reservoir temperature the storage PVT correlations read; the run
stays isothermal and activates no thermal formulation. initial_composition is the
slate’s mole fractions against depth (ps.initial.CompositionVsDepth), and optional, and
compositions the compositions its injectors inject (ps.pvt.Composition); each names
the slate’s components by their words, in lower case or in capitals. The model refuses the
package where no gas flows (physics.storage.phase_inactive).
PetroScript is licensed under the Apache License 2.0. © 2026 Blauweiss EDV LLC. PetroScript by Blauweiss AI.For AI agents: llms.txt