ps.thermal
ps.thermal.Conductivities
Section titled “ps.thermal.Conductivities”ps.thermal.Conductivities(*, rock: float | numpy.ndarray, oil: float | numpy.ndarray, gas: float | numpy.ndarray, water: float | numpy.ndarray) -> None
The thermal conductivities of the rock and of each phase, stated apart.
ps.thermal.Conductivities(rock=2.5, oil=0.15, gas=0.03, water=0.6) gives the rock and each
phase its thermal conductivity.
Each is positive, one number or a value per cell, in the model’s units. It writes THCROCK,
THCOIL, THCGAS and THCWATER (GRID); ps.load refuses a deck that states them.
ps.thermal.Package(phase_conductivities=...) holds it, at
physics/thermal/phase_conductivities, in place of the rock’s combined conductivity.
ps.thermal.DensityVsTemperature
Section titled “ps.thermal.DensityVsTemperature”ps.thermal.DensityVsTemperature(*, reference_temperature: ScalarPropertyInput, coefficient1: float, coefficient2: float) -> None
A phase’s density against temperature: a reference temperature and two coefficients.
ps.thermal.DensityVsTemperature(reference_temperature=399.15, coefficient1=5.0e-4, coefficient2=0.0) lowers the phase’s density by about 5e-4 of itself per degree above 126
degrees C.
Its reference temperature and the two thermal expansion coefficients. The reference
temperature is absolute, as the three cards count it (OPM Flow manual 8.3.82, Table 8.50):
kelvin on a METRIC or LAB model, degrees Rankine on a FIELD model, a bare number either way
(126 degC is reference_temperature=399.15 on a METRIC model, 718.47 on a FIELD one);
a ps.Quantity is refused. The coefficients are per absolute degree and per absolute
degree squared.
It writes OILDENT, WATDENT or GASDENT (PROPS) by the field that holds it, which ps.load
reads back: ps.thermal.Package(oil_density_temperature=...) (and water_ and
gas_), at physics/thermal/oil_density_temperature.
ps.thermal.FluidHeatCapacity
Section titled “ps.thermal.FluidHeatCapacity”ps.thermal.FluidHeatCapacity(*, rows) -> None
The oil’s, the water’s and the gas’s specific heats against temperature.
It holds rows, at least two, the temperatures strictly rising: a temperature and the
oil’s, the water’s and the gas’s heat capacity per unit mass there (energy per mass per
degree), in the model’s units.
ps.thermal.FluidHeatCapacity(rows=[(20.0, 2.0, 4.2, 1.0), (150.0, 2.4, 4.3, 1.2)]) gives the
oil, the water and the gas each its specific heat at 20 and at 150 degrees.
It writes SPECHEAT (PROPS), one table, which ps.load reads back.
ps.thermal.Package(fluids=...) holds it, at physics/thermal/fluids.
Rows: (temperature, oil_heat_capacity, water_heat_capacity, gas_heat_capacity). State each row as a sequence in this order, or as a mapping by column name.
ps.thermal.JouleThomson
Section titled “ps.thermal.JouleThomson”ps.thermal.JouleThomson(*, reference_pressure: ScalarPropertyInput, coefficient: Optional[ScalarPropertyInput] = None) -> None
A phase’s Joule-Thomson coefficient: its temperature change as its pressure drops.
ps.thermal.JouleThomson(reference_pressure=1.0, coefficient=0.004) changes the phase’s
temperature by 0.004 degrees per unit of pressure drop.
reference_pressure is a positive pressure and coefficient a temperature per
pressure, in the model’s units; an unset coefficient leaves it to the simulator (written
defaulted). It writes OILJT, WATJT or GASJT (PROPS) by the field that holds it, which
ps.load reads back: ps.thermal.Package(oil_joule_thomson=...) (and water_ and
gas_), at physics/thermal/oil_joule_thomson.
ps.thermal.Package
Section titled “ps.thermal.Package”ps.thermal.Package(*, mode: Literal['thermal', 'temperature_only'], rock: RockProperties | None = None, fluids: FluidHeatCapacity | None = None, oil_heat_capacity: Optional[ScalarPropertyInput] = None, water_heat_capacity: Optional[ScalarPropertyInput] = None, gas_heat_capacity: Optional[ScalarPropertyInput] = None, initial_temperature: ConstantTemperature | TemperatureVsDepth | None = None, phase_conductivities: Conductivities | None = None, oil_viscosity: ViscosityVsTemperature | None = None, water_viscosity: ViscosityVsTemperature | None = None, gas_viscosity: ViscosityVsTemperature | None = None, oil_density_temperature: DensityVsTemperature | None = None, water_density_temperature: DensityVsTemperature | None = None, gas_density_temperature: DensityVsTemperature | None = None, oil_joule_thomson: JouleThomson | None = None, water_joule_thomson: JouleThomson | None = None, gas_joule_thomson: JouleThomson | None = None) -> None
A heat model: Flow’s energy equation and the rock’s and fluids’ heat properties.
ps.thermal.Package(mode="thermal", rock=ps.thermal.RockProperties(conductivity=2.5, volumetric_heat_capacity=2200.0), oil_heat_capacity=2.0, water_heat_capacity=4.2, gas_heat_capacity=1.0) is a thermal run’s package; ps.Model(physics=[...]) holds it,
at physics/thermal.
mode is the activation, in RUNSPEC: "thermal" writes THERMAL and
"temperature_only" writes TEMP. Each table it holds writes its own
card (each class says which); ps.load reads them back, all but the phase conductivities
(ps.thermal.Conductivities). The fluids’ specific
heats are either temperature-independent (oil_heat_capacity, water_heat_capacity,
gas_heat_capacity, stated together) or a table (fluids, SPECHEAT), not both.
Constant capacities are written as a two-row SPECHEAT table, at 0 and 300 degrees, and
reload as that table. A thermal package states the rock’s heat capacity (rock’s
volumetric_heat_capacity) and a thermal conductivity (rock’s conductivity or
phase_conductivities): OPM Flow starts the energy equation with both, in either mode,
so the package refuses one without them (thermal.rock.heat_capacity_missing,
thermal.conductivity.missing). initial_temperature is a
ps.initial.ConstantTemperature or a ps.initial.TemperatureVsDepth.
ps.thermal.RockHeatCapacity
Section titled “ps.thermal.RockHeatCapacity”ps.thermal.RockHeatCapacity(*, rows) -> None
The rock’s volumetric heat capacity against temperature.
It holds rows, at least two, the temperatures strictly rising: a temperature and the
heat capacity per unit volume of rock there (energy per volume per degree), in the model’s
units.
ps.thermal.RockHeatCapacity(rows=[(20.0, 2000.0), (150.0, 2400.0)]) gives the rock its
volumetric heat capacity at 20 and at 150 degrees.
It writes SPECROCK (PROPS), one table, which ps.load reads back.
ps.thermal.RockProperties(volumetric_heat_capacity=...) holds it, at
physics/thermal/rock/volumetric_heat_capacity.
Rows: (temperature, volumetric_heat_capacity). State each row as a sequence in this order, or as a mapping by column name.
ps.thermal.RockProperties
Section titled “ps.thermal.RockProperties”ps.thermal.RockProperties(*, conductivity: float | numpy.ndarray | None = None, volumetric_heat_capacity: float | numpy.ndarray | RockHeatCapacity | None = None, heat_capacity_temperature_dependence: float | numpy.ndarray | None = None, gas_saturation_conductivity_scaling: float | numpy.ndarray | None = None) -> None
The rock’s heat properties: its conductivity and its heat capacity.
ps.thermal.RockProperties(conductivity=2.5, volumetric_heat_capacity=2200.0) gives the rock
one conductivity and one heat capacity everywhere.
ps.thermal.Package(rock=...) holds it, at physics/thermal/rock; it states one field
at least. conductivity is the combined thermal conductivity of the rock and the fluids
in it (THCONR, GRID), zero or more, one number or a value per cell, in the model’s units; a
package states it, or each phase’s own (ps.thermal.Package(phase_conductivities=...)),
never both. The heat capacity is written as SPECROCK (PROPS) or, stated per cell or beside
its temperature dependence, as HEATCR and HEATCRT (GRID); the scaling is THCONSF (GRID).
ps.load reads each back; a capacity stated as one number with no temperature dependence
comes back as the two-row table it is written as, and one beside its temperature dependence
as the number.
ps.thermal.ViscosityVsTemperature
Section titled “ps.thermal.ViscosityVsTemperature”ps.thermal.ViscosityVsTemperature(*, rows, reference_pressure: Optional[ScalarPropertyInput] = None, reference_solution_gor: Optional[ScalarPropertyInput] = None) -> None
A phase’s viscosity against temperature, at a reference pressure.
It holds rows, the temperatures in order: a temperature and the phase’s viscosity there,
in the model’s units. It writes OILVISCT, WATVISCT or GASVISCT (PROPS) by the field that
holds it, which ps.load reads back: ps.thermal.Package(oil_viscosity=...) (and
water_ and gas_), at physics/thermal/oil_viscosity.
ps.thermal.ViscosityVsTemperature(rows=[(20.0, 5.0), (150.0, 0.8)], reference_pressure=100.0): the phase’s viscosity falls from 5 at 20 degrees to 0.8 at 150,
measured at a pressure of 100.
It states the reference conditions the tables share (VISCREF): the pressure, and the dissolved gas-oil ratio, 0 when unstated (a reload reads the 0 the card states). The package’s tables state one reference, or none.
Rows: (temperature, viscosity). State each row as a sequence in this order, or as a mapping by column name.
PetroScript is licensed under the Apache License 2.0. © 2026 Blauweiss EDV LLC. PetroScript by Blauweiss AI.For AI agents: llms.txt