Skip to content

API index: every public name

Every public name, one line each, generated from the census of public names by tools/generate_api_map.py (never edited by hand). A line gives the call’s parameters and defaults, or the name’s kind where it is not called, and the first line of its docstring. ps.help(name) gives the types, the fields and the card a name writes. Every frozen value has .replace(**changes), a copy with the named fields changed; its lines carry no docstring. The result types at the end are returned, never imported.

  • ps.Adjust(*, well, oil_rate=None, water_rate=None, gas_rate=None, liquid_rate=None, reservoir_volume=None, bhp=None, thp=None, rate=None, artificial_lift_quantity=None, lift_table=None): Change one target of the selected wells and keep their control (WELTARG).
  • ps.Adjust.replace(**fields)
  • ps.Box(i=None, j=None, k=None): A box of cells: the deck’s 1-based, inclusive ranges along i, j and k.
  • ps.Box.index (property): The box as a NumPy index into an (nx, ny, nz) array: array[box.index].
  • ps.Box.replace(**fields)
  • ps.Capacity(*, wells=None, connections_per_well=None, groups=None, wells_per_group=None, well_lists_per_well=None, dynamic_well_lists=None, multisegment_wells=None, segments_per_well=None, branches_per_well=None, rows_per_relperm_table=None, pressures_per_pvt_table=None, ratios_per_pvt_table=None, fluid_in_place_regions=None, fluid_in_place_sets=None, independent_regions=None, flux_regions=None, operation_regions=None, polymer_mixing_regions=None, transmissibility_regions=None, rows_per_depth_table=None, rows_per_tracer_depth_table=None, rows_per_miscible_table=None, production_lift_tables=None, production_lift_rate_values=None, production_lift_thp_values=None, production_lift_water_fraction_values=None, production_lift_gas_fraction_values=None, production_lift_artificial_lift_values=None, injection_lift_tables=None, injection_lift_rate_values=None, injection_lift_thp_values=None, fault_segments=None, numerical_aquifer_cells=None, numerical_aquifer_connections=None, analytic_aquifers=None, connections_per_analytic_aquifer=None, influence_tables=None, rows_per_influence_table=None, network_nodes=None, network_branches=None, actions=None, lines_per_action=None, characters_per_action_line=None, conditions_per_action=None, functions_per_user_quantity=None, terms_per_user_quantity=None, field_user_quantities=None, group_user_quantities=None, well_user_quantities=None, connection_user_quantities=None, segment_user_quantities=None, region_user_quantities=None, aquifer_user_quantities=None, cell_user_quantities=None, user_arguments=None, distinct_user_arguments=None, user_tables=None, rows_per_user_table=None, interpolation_points_per_user_table=None, water_skin_pressure_tables=None, polymer_skin_pressure_tables=None, polymer_molecular_weight_tables=None, rows_per_polymer_viscosity_mixing_table=None, oil_tracers=None, water_tracers=None, gas_tracers=None, summary_vectors=None): The sizes a run allocates: ps.Capacity(wells=130, connections_per_well=36).
  • ps.Capacity.replace(**fields)
  • ps.CompileError(issues): A refused compile, or a run refused before it starts: issues holds the error rows.
  • ps.DeckImportError(keyword, *, file, line, hint, reason=None): A deck keyword the importer cannot read onto the model.
  • ps.Event(date=None, *changes): The changes the schedule states at one report time, in the order stated.
  • ps.Event.replace(**fields)
  • ps.Every(*steps): A run of report steps of the stated lengths, in days: ps.Every(31, 28, 31).
  • ps.Every.replace(**fields)
  • ps.Fault(*, name, segments): A named fault: the cell faces it runs along (FAULTS).
  • ps.Fault.replace(**fields)
  • ps.Group(*, name, parent=None): A group of wells in the field’s group tree (GRUPTREE), under an optional parent group.
  • ps.Group.replace(**fields)
  • ps.History(*, well, oil_rate=None, water_rate=None, gas_rate=None, control=None, thp=None, bhp_limit=None, lift_table=None, status='open'): Hold the selected producers to observed rates, as a history match does (WCONHIST).
  • ps.History.from_frame(frame, *, control=None, lift_table=None): Return a frame’s observed history: one ps.Event per date, of ps.History rows.
  • ps.History.replace(**fields)
  • ps.Inject(*, well, phase, rate=None, reservoir_volume=None, bhp=None, control=None, rate_limit=None, reservoir_volume_limit=None, bhp_limit=None, thp_limit=None, lift_table=None, bhp_adjustment=None, pressure_loss_multiplier=None, lift_calculation=None, unstable_thp=None, status='open', phase_word=None): Control the selected injectors of phase from this date (WCONINJE).
  • ps.Inject.replace(**fields)
  • ps.InjectionHistory(*, well, phase, rate, control='rate', thp=None, bhp_limit=None, lift_table=None, status='open'): Hold the selected injectors to an observed injection rate (WCONINJH).
  • ps.InjectionHistory.replace(**fields)
  • ps.Issue(*, code, severity, address=None, message, fix=None, value=None, unit=None, held_against=None, basis=None, facts=()): One row of what PetroScript found: [code] message, then fix:.
  • ps.Issue.address (property)
  • ps.Issue.basis (property)
  • ps.Issue.code (property)
  • ps.Issue.facts (property)
  • ps.Issue.fix (property)
  • ps.Issue.held_against (property)
  • ps.Issue.message (property)
  • ps.Issue.replace(**fields)
  • ps.Issue.severity (property)
  • ps.Issue.unit (property)
  • ps.Issue.value (property)
  • ps.Model(*, name=None, title=None, units, start, capacity=<factory>, dimensions=<factory>, grid, rock, fluid=None, relperm=None, regions=None, passive_tracers=(), physics=(), initial=None, summary=<factory>, output=<factory>, numerics=None, edits=(), transmissibility=(), faults=(), non_neighbor_connections=(), wells=(), groups=(), lift_tables=(), network=None, schedule=<factory>, aquifers=(), boundary_conditions=(), acknowledged_warnings=()): A reservoir model: one frozen value, built by keyword, that compiles to a simulator’s deck.
  • ps.Model.apply(*edits): Return this model with edits after its grid program’s statements.
  • ps.Model.array(name, *, fluid_in_place_set=None): Return the cell array name after the grid program, read-only.
  • ps.Model.at(date, *changes): Return this model with changes made at date.
  • ps.Model.check(target=None): Return the rows of PetroScript’s checks on this model, without raising.
  • ps.Model.control(well, *, at): Return the full control in force for well at at, aimed at that well.
  • ps.Model.describe(): Return the model’s report: JSON’s values only, every row with its address.
  • ps.Model.diff(other): Return what differs from this model to other, by address.
  • ps.Model.find(pattern, since=None, before=None): Return the addresses pattern matches, in the model’s order.
  • ps.Model.get(address): Return what the model states at address.
  • ps.Model.package(kind): Return the family package of class kind this model holds, or None.
  • ps.Model.replace(**fields)
  • ps.Model.set(address, value=<object object>, /): Return this model with what it states at address set to value.
  • ps.Model.to_python(path): Write the Python that builds this model into the folder path.
  • ps.Model.until(date, report=None): Return this model with its run ending at date.
  • ps.ModelError(issues): A model that contradicts itself, or a construction refused: issues holds the rows.
  • ps.Numerics(*, initial_timestep=None, maximum_timestep=None, minimum_timestep=None, minimum_choppable_timestep=None, maximum_timestep_growth=None, maximum_timestep_decay=None, convergence_failure_decay=None, convergence_failure_growth=None, maximum_timestep_after_well_event=None, target_truncation_error=None, target_nonlinear_convergence_error=None, mass_balance_error_target=None, target_linear_convergence_error=None, maximum_truncation_error=None, maximum_nonlinear_convergence_error=None, maximum_mass_balance_error=None, maximum_linear_convergence_error=None, maximum_well_flow_convergence_error=None, target_local_fluid_in_place_error=None, target_surfactant_change=None, ion_exchange_damping_threshold=None, tracer_implicitness=None, maximum_newton_iterations=None, minimum_newton_iterations=None, maximum_linear_iterations=None, minimum_linear_iterations=None, maximum_well_iterations=None, maximum_thp_iterations=None, maximum_pressure_change=None, maximum_saturation_change=None, target_pressure_change=None, maximum_tolerable_pressure_change=None, minimum_newton_iterations_before_bisection=None, pressure_residual_solver=None, well_target_update=None, maximum_segment_iterations=None, maximum_segment_solves=None, segment_tolerance_reduction=None, segment_tolerance_growth=None, user_quantity_magnitude_limit=None, user_quantity_undefined_value=None, user_quantity_equality_tolerance=None, network_balance_interval=None, network_pressure_tolerance=None, maximum_network_iterations=None, network_thp_tolerance=None, maximum_network_thp_iterations=None, stack_depth=None, constrained_pressure_residual=None, linear_solver=None, fully_implicit=None, data_check_only=None, parallel_domains=None, parallel_method=None, next_step=None, next_step_persists=False): The run’s numerical settings: ps.Numerics(maximum_timestep=5.0, ...).
  • ps.Numerics.replace(**fields)
  • ps.Open(*, well, completions=None, cell=None): Open the selected wells from this date: ps.Open(well="P1") (WELOPEN, OPEN).
  • ps.Open.replace(**fields)
  • ps.Output(*, static_file=True, static_file_endpoints=False, static_file_minus_multipliers=False, restart=None, initial_restart=None, print=None, print_run_specification=None, print_grid=(), print_solution=(), print_fluid_in_place=None, print_restart_output=None, print_properties=(), print_regions=(), grid_file=None, egrid_file=None, static_index=None, restart_index=None, message_file=None, formatted_input=None, formatted_output=None, spreadsheet_summary=None, summary_dates=None, message_limits=None, table_extrapolation=None, monitoring=None): What a run writes beside its answers: ps.Output(static_file=True, print=...).
  • ps.Output.replace(**fields)
  • ps.Perforate(*, well, k, i=None, j=None, diameter=None, status='open', saturation_region=None, connection_factor=None, kh=None, skin_factor=None, non_darcy_factor=None, direction=None, pressure_equivalent_radius=None): One dated connection of a well to the grid (COMPDAT): a run of layers in one column.
  • ps.Perforate.replace(**fields)
  • ps.PetroScriptError(*args, code=None, address=None, fix=None, at=None): A refusal PetroScript raises: code, address, message, fix and at.
  • ps.PetroScriptWarning (class): The one category PetroScript prints its warnings through, one line per code.
  • ps.Produce(*, well, oil_rate=None, water_rate=None, gas_rate=None, liquid_rate=None, reservoir_volume=None, bhp=None, thp=None, control=None, oil_rate_limit=None, water_rate_limit=None, gas_rate_limit=None, liquid_rate_limit=None, reservoir_volume_limit=None, bhp_limit=None, thp_limit=None, lift_table=None, artificial_lift_quantity=None, bhp_adjustment=None, pressure_loss_multiplier=None, lift_calculation=None, unstable_thp=None, status='open'): Control the selected producers from this date (WCONPROD).
  • ps.Produce.replace(**fields)
  • ps.Quantity(value, unit): A number with its own unit: ps.Quantity(30.0, "barsa").
  • ps.Quantity.replace(**fields)
  • ps.Regions(*, saturation=None, relperm_x=None, relperm_y=None, relperm_z=None, pvt=None, equilibration=None, rock=None, flux=None, transmissibility=None, operation=None, fluid_in_place=None, fluid_in_place_sets=<factory>, imbibition=None, imbibition_x=None, imbibition_y=None, imbibition_z=None, miscible=None, polymer_mixing=None): The model’s region maps (SATNUM, PVTNUM, …): which region of each kind each cell is in.
  • ps.Regions.replace(**fields)
  • ps.Rock(*, porosity=None, permeability=None, vertical_ratio=None, permeability_x=None, permeability_y=None, permeability_z=None, compressibility=None, reference_pressure=None, compaction=None, table_regions=None, dispersivity=None): The rock’s porosity, permeability and pore-volume compressibility (PORO, PERMX, ROCK).
  • ps.Rock.replace(**fields)
  • ps.RunError(message, *, folder=None, exit_code=None): Raised when a simulator could not run a deck to its end, or none was found to run it.
  • ps.Schedule(*, end=None, report=(), initial_timesteps=(), events=()): The run’s report times and what changes at each: ps.Schedule(end=, report=, events=).
  • ps.Schedule.replace(**fields)
  • ps.Shut(*, well, completions=None, cell=None): Shut the selected wells at the surface from this date: ps.Shut(well="P1"), WELOPEN SHUT.
  • ps.Shut.replace(**fields)
  • ps.Stop(*, well, completions=None, cell=None): Stop the selected wells from this date, open to the reservoir: ps.Stop(well="P1").
  • ps.Stop.replace(**fields)
  • ps.Summary(*, field=(), wells={}, groups={}, completions={}, blocks={}, aquifers={}, numerical_aquifers={}, regions={}, region_pairs={}, segments={}, connections={}, undeclared_wells={}, undeclared_groups={}, undeclared_connections={}, user_defined={}, tracers={}, undeclared_tracers={}, history={}, column_words=(), performance=False, run_summary=False, separate_reports=False, well_status_vectors=False, write_frequency=None, write_interval=None): The vectors a run records, by member: ps.Summary(field=[...], wells={...}, ...).
  • ps.Summary.replace(**fields)
  • ps.Well(*, name, i=None, j=None, group=None, bhp_reference_depth=None, preferred_phase=None, preferred_phase_word=None, drainage_radius=None, inflow=None, automatic_close_action=None, crossflow=None, pvt_region=None, hydrostatic_density=None, fluid_in_place_region=None, introduced=None, connection_order=None, trajectories=()): A well: an identity. Its name, its head’s column, its group and its declared properties.
  • ps.Well.replace(**fields)
  • ps.compile(model, target='opm-flow'): Compile a model for one simulator and return the Deck: its input files, in memory.
  • ps.help(subject=None): Print what PetroScript knows about subject, or the quickstart index.
  • ps.load(path): Read a deck into a ps.Model: its output and numerics are the model’s.
  • ps.simulators(): List the simulators the targets find to run a deck, each target’s in its own order.
  • ps.actions: Semantic action-rule and conditional-policy constructors.
  • ps.actions.PyAction(name, path='', run_mode='once', script=None): A Python hook the run calls: ps.actions.PyAction(name="WTEST", path="wtest.py").
  • ps.actions.PyAction.replace(**fields)
  • ps.actions.UserQuantity(*, name, statements, units=None, stated_units_position=None): A user quantity (UDQ): a name the run evaluates from a formula or a number.
  • ps.actions.UserQuantity.maximum(other): The greater of this value and other wherever the formula is evaluated: UMAX.
  • ps.actions.UserQuantity.minimum(other): The lesser of this value and other wherever the formula is evaluated: UMIN.
  • ps.actions.UserQuantity.rank(*, descending=False): Each member’s rank by this value among the members where it is defined: SORTA, or SORTD.
  • ps.actions.UserQuantity.read(name, *, group=None, well=None, lists=None): Return the value the user quantity name holds, read by its name.
  • ps.actions.UserQuantity.replace(**fields)
  • ps.actions.UserQuantity.union_add(other): The union sum (UADD): this value plus other, or whichever one is defined.
  • ps.actions.UserTable(name, interpolation, x, y): A user table (UDT): a one-dimensional lookup a user quantity’s formula reads.
  • ps.actions.UserTable.frame(): The table’s points as a polars frame: its x and y columns.
  • ps.actions.UserTable.from_frame(frame, **fields): Build the table from a frame’s x and y columns, read by name, a point per row.
  • ps.actions.UserTable.lookup(argument): Return this table’s value at argument wherever the formula is evaluated.
  • ps.actions.UserTable.replace(**fields)
  • ps.actions.When(*conditions, name, then, runs=None, minimum_wait=None, stated_body_scopes=(), stated_body_cards=()) or ps.actions.When(*, name, condition, then, runs=None, minimum_wait=None, stated_body_scopes=(), stated_body_cards=()): An operating rule (ACTIONX): when its conditions hold, its changes apply.
  • ps.actions.When.replace(**fields)
  • ps.actions.date(): The simulation date, compared with a date in a condition (YEAR, MNTH and DAY).
  • ps.actions.field(): The field’s quantities, as a rule’s condition or a user quantity’s formula reads them.
  • ps.actions.group(group=None): The quantities of group (a ps.Group), or of every group when none is named.
  • ps.actions.region(region, *, fluid_in_place_set=None): The quantities of fluid-in-place region region: ps.actions.region(2).oil_in_place.
  • ps.actions.well(well=None, *, lists=None): The quantities of well (a ps.Well), of a set of wells, or of every well.
  • ps.aquifers: ps.aquifers: the aquifer classes; definitions live in petroscript.core.aquifers.
  • ps.aquifers.CarterTracy(*, number, datum_depth, permeability, porosity, total_compressibility, radius, thickness, angle, connections, datum_pressure=None, influence_table=None, pvt_region=1, datum_temperature=None): A Carter-Tracy aquifer and the grid boxes it connects to.
  • ps.aquifers.CarterTracy.replace(**fields)
  • ps.aquifers.Connection(*, cells, face, influx_area=None, influx_multiplier=1.0, transmissibility_multiplier=1.0, mode=None, allow_adjoin_active_cells=False): A box of grid cells an aquifer connects to across one face.
  • ps.aquifers.Connection.replace(**fields)
  • ps.aquifers.ConstantFlux(*, number, connections, initial_water_flux_rate=None, temperature=None, pressure=None): An aquifer whose water influx is prescribed, and the grid boxes it connects to.
  • ps.aquifers.ConstantFlux.replace(**fields)
  • ps.aquifers.Fetkovich(*, datum_depth, initial_water_volume, compressibility, productivity_index, connections, datum_pressure=None, number=1, pvt_region=None, datum_temperature=None): A finite aquifer (Fetkovich) and the grid boxes it connects to.
  • ps.aquifers.Fetkovich.replace(**fields)
  • ps.aquifers.Flux(*, aquifer, water_flux_rate): A constant-flux aquifer’s water influx from a date on (AQUFLUX in the schedule).
  • ps.aquifers.Flux.replace(**fields)
  • ps.aquifers.InfluenceTable(*, dimensionless_time, dimensionless_pressure, number=2): A Carter-Tracy influence table: the dimensionless pressure at each dimensionless time.
  • ps.aquifers.InfluenceTable.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.aquifers.InfluenceTable.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.aquifers.InfluenceTable.replace(**fields)
  • ps.aquifers.Numerical(*, number, cells, connections): A numerical aquifer: its cells and the grid boxes it connects to.
  • ps.aquifers.Numerical.replace(**fields)
  • ps.brine: Public namespace for brine semantics; definitions live in petroscript.core.brine.
  • ps.brine.CapillaryPressureFactor(*, rows): The factor on the capillary pressure as precipitated salt fills the pores.
  • ps.brine.CapillaryPressureFactor.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.brine.CapillaryPressureFactor.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.brine.CapillaryPressureFactor.replace(**fields)
  • ps.brine.Package(*, pvt=None, initial_salinity=None, solubility=None, permeability_reduction=None, initial_precipitated_salt=None, gas_water_vaporization=None, capillary_pressure_factor=None): The brine and its salt: salinity-dependent water PVT, initial salt and precipitation.
  • ps.brine.Package.replace(**fields)
  • ps.brine.PermeabilityReduction(*, rows): The permeability left as precipitated salt fills the pores.
  • ps.brine.PermeabilityReduction.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.brine.PermeabilityReduction.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.brine.PermeabilityReduction.replace(**fields)
  • ps.brine.PrecipitatedSaltVsDepth(*, rows): The precipitated salt at the start, against depth.
  • ps.brine.PrecipitatedSaltVsDepth.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.brine.PrecipitatedSaltVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.brine.PrecipitatedSaltVsDepth.replace(**fields)
  • ps.brine.SalinityVsDepth(*, rows): The water’s initial salt concentration against depth.
  • ps.brine.SalinityVsDepth.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.brine.SalinityVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.brine.SalinityVsDepth.replace(**fields)
  • ps.brine.SaltSolubility(*, rows): The salt’s solubility limit in the water and the density of the salt that precipitates.
  • ps.brine.SaltSolubility.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.brine.SaltSolubility.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.brine.SaltSolubility.replace(**fields)
  • ps.brine.UniformSalinity(*, basis, value): One salt content for the whole reservoir’s brine, by molality or by mole fraction.
  • ps.brine.UniformSalinity.replace(**fields)
  • ps.brine.VaporizationBySalt(*, rows): The water the gas carries against the gas pressure and the brine’s salinity.
  • ps.brine.VaporizationBySalt.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.brine.VaporizationBySalt.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.brine.VaporizationBySalt.replace(**fields)
  • ps.brine.WaterPVT(*, reference_pressure, surface_reference_salinity=None, rows): The water’s PVT against its salt concentration, at a reference pressure.
  • ps.brine.WaterPVT.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.brine.WaterPVT.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.brine.WaterPVT.replace(**fields)
  • ps.bundle: The sidecar bundle door: one directory, fixed names, checked at the door.
  • ps.bundle.BundleRefusal(reason, message, *, file, schema=None, sheet=None, column=None, columns=None, row=None, given=None, expected=None): A typed refusal at the bundle door: its code, its class and where in the bundle it is.
  • ps.bundle.BundleRefusal.as_record(): Return the refusal as the record a journal carries.
  • ps.bundle.Recipe(*, recipe_version, units, title=None, start, history, forecast, phases=None, selected_deck=None, grid=None, sheets, schedule, options=None, outputs=None, ensemble=None): recipe.json, the one file that says what a bundle is.
  • ps.bundle.Recipe.replace(**fields)
  • ps.bundle.SCHEMAS (constant, dict): dict() -> new empty dictionary
  • ps.bundle.SheetSchema(kind, version, columns, doc=''): A registered sheet: its id, its columns, and nothing a deck would not need.
  • ps.bundle.SheetSchema.column(name): Return the column named name; None when the sheet states none.
  • ps.bundle.SheetSchema.id (property): The name a recipe or a file knows the schema by: kind@version.
  • ps.bundle.SheetSchema.key (property): The key columns’ names, in order: the sheet states one row per value of them.
  • ps.bundle.SheetSchema.replace(**fields)
  • ps.bundle.assemble(bundle, *, member=None): Assemble the bundle into a ps.Model: every sheet and grid file as statements.
  • ps.bundle.check_fluids(path): Ask the PVT sheets what the fluids weigh where the model starts, and report it.
  • ps.bundle.check_grid(path, *, geometry='sidecars/grid/GRID.GRDECL', properties=(), regions=(), contacts=None): Check a grid alone, with no sheets and no recipe, and report what it measures.
  • ps.bundle.export_schemas(): Return the sheet registry as the one JSON the bundle’s readers take (SCHEMAS.json).
  • ps.bundle.family_of(bundle): Return the fluid family the assembler reads off the recipe’s phases and the PVT sheets named.
  • ps.bundle.member_draws(bundle): Return every member’s draws as one polars frame: the numbers its deck was rendered from.
  • ps.bundle.open(path): Open the bundle at path (the workspace, or its sidecars directory).
  • ps.bundle.params_keys_doc(): Return the params keys each schedule event class renders, as one text.
  • ps.bundle.recipe_schema(): Return the recipe as a table a caller reads before writing one (RECIPE.json).
  • ps.checks: ps.checks: add a check of your own to the ones PetroScript runs (master spec §4.8, §9.3).
  • ps.checks.Check(*args, **kwargs): A check of your own: its code, and the rows it finds on a model.
  • ps.checks.register(check): Add check to the checks every m.check() runs after PetroScript’s own.
  • ps.fluid: Fluid systems: the phases a model holds, their PVT and their surface densities.
  • ps.fluid.BlackOil(*, oil=None, gas=None, water=None, oil_surface_density=None, gas_surface_density=None, water_surface_density=None, diffusion=None, temperature=None): A black-oil fluid system: its phases’ PVT tables and surface densities in one PVT region.
  • ps.fluid.BlackOil.replace(**fields)
  • ps.fluid.Compositional(*, equation_of_state, components, binary_interaction_coefficients={}, temperature=None, surface_temperature=None, surface_pressure=None, compositions=(), water=None, water_surface_density=None): An equation-of-state fluid: its components, the equation of state and the pairs’ k_ij.
  • ps.fluid.Compositional.replace(**fields)
  • ps.fluid.GasWater(*, gas=None, water=None, oil_surface_density=None, gas_surface_density=None, water_surface_density=None, diffusion=None, temperature=None): A gas-water fluid system: gas and water PVT and surface densities in one PVT region.
  • ps.fluid.GasWater.replace(**fields)
  • ps.fluid.OilWater(*, oil=None, water=None, oil_surface_density=None, gas_surface_density=None, water_surface_density=None, diffusion=None, temperature=None): An oil-water fluid system: oil and water PVT and surface densities in one PVT region.
  • ps.fluid.OilWater.replace(**fields)
  • ps.foam: Public namespace for foam semantics; definitions live in petroscript.core.foam.
  • ps.foam.Adsorption(*, rows): Foam’s adsorption isotherm: the foam the rock holds against the foam concentration.
  • ps.foam.Adsorption.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.foam.Adsorption.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.foam.Adsorption.replace(**fields)
  • ps.foam.MobilityReduction(*, rows): Foam’s mobility reduction: the factor on the carrier’s mobility against foam concentration.
  • ps.foam.MobilityReduction.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.foam.MobilityReduction.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.foam.MobilityReduction.replace(**fields)
  • ps.foam.Package(*, rock, mobility, adsorption, carrier_phase='gas'): A foam flood’s physics: the rock, the mobility reduction, the adsorption and the carrier.
  • ps.foam.Package.replace(**fields)
  • ps.foam.Rock(*, allow_desorption, rock_density): The rock’s part in a foam flood: its density, and whether adsorbed foam desorbs.
  • ps.foam.Rock.replace(**fields)
  • ps.grid: The grid: its kinds, and the statements about the grid as a whole.
  • ps.grid.Add(target, value, source=None, cells=<factory>, form=None, stage=None, fluid_in_place_set=None, work=None, source_work=None): Add a value to an array over its cells (writes ADD; OPERATE ADDX; ADDREG).
  • ps.grid.Add.replace(**fields)
  • ps.grid.Assign(target, value, cells=<factory>, form=None, stage=None, fluid_in_place_set=None, work=None): Set a grid array over its cells: one value (EQUALS, EQUALREG) or the array’s own card.
  • ps.grid.Assign.replace(**fields)
  • ps.grid.BoundaryCondition(*, number, cells, face, kind, phase=None, rate=None, pressure=None, temperature=None): A condition on one face of a box of cells at the grid’s edge (Flow’s BCCON and BCPROP).
  • ps.grid.BoundaryCondition.replace(**fields)
  • ps.grid.Cartesian(*, shape, dx, dy, dz, top, active=None, coordinate_unit=None, coordinate_reference=None, map_axes=None, map_units=None, grid_orientation=None, grid_system=None, minimum_pore_volume=None, pinch_policy=None, net_to_gross=None, pore_volume_scale=None, transmissibility_scheme=None): A Cartesian grid: its shape, the cells’ widths and thicknesses, and the depth of its top.
  • ps.grid.Cartesian.replace(**fields)
  • ps.grid.CellDepthOverride(value, cells=<factory>): The depth of each cell’s centre over a box of cells (DEPTH).
  • ps.grid.CellDepthOverride.replace(**fields)
  • ps.grid.CellTransmissibilityField(*, direction, values): An explicit transmissibility across one axis’s positive faces, per cell.
  • ps.grid.CellTransmissibilityField.replace(**fields)
  • ps.grid.Clip(target, min=None, max=None, cells=<factory>, form=None, stage=None, fluid_in_place_set=None, work=None): Hold an array between bounds over its cells (MINVALUE, MAXVALUE).
  • ps.grid.Clip.replace(**fields)
  • ps.grid.ConnectionTransmissibilityEdit(*, first, second, mode, value): A transmissibility edit of the connection two cells share, multiplied or replaced.
  • ps.grid.ConnectionTransmissibilityEdit.replace(**fields)
  • ps.grid.Copy(target, source, cells=<factory>, from_cells=None, to_cells=None, form=None, fluid_in_place_set=None, source_fluid_in_place_set=None, work=None, source_work=None): Copy one array into another over its cells (COPY; COPYREG over a region).
  • ps.grid.Copy.replace(**fields)
  • ps.grid.CornerPoint(*, shape, pillars, corner_depths, active=None, coordinate_unit=None, coordinate_reference=None, map_axes=None, map_units=None, grid_orientation=None, grid_system=None, minimum_pore_volume=None, pinch_policy=None, net_to_gross=None, transmissibility_scheme=None, provenance=None): Corner-point grid geometry: pillars and the depths of every cell’s corners.
  • ps.grid.CornerPoint.from_box(grid): The corner-point grid a Cartesian grid describes, exactly.
  • ps.grid.CornerPoint.from_surface(top, *, dx, dy, nz, thickness=None, bottom=None): A grid between a top surface and a thickness or a base surface, in conformable layers.
  • ps.grid.CornerPoint.replace(**fields)
  • ps.grid.DirectionalTransmissibilityMultiplier(*, direction, factor, cells=<factory>, stage=None): Multiply transmissibility across one semantic grid-face family.
  • ps.grid.DirectionalTransmissibilityMultiplier.replace(**fields)
  • ps.grid.FaultMultiplier(*, fault, factor): The transmissibility multiplier of a fault, named as the model’s faults declare it.
  • ps.grid.FaultMultiplier.replace(**fields)
  • ps.grid.GridOrientation(*, i_order, j_order, k_order, depth, handedness): The grid’s axis ordering, depth direction and handedness, as a deck records them (GDORIENT).
  • ps.grid.GridOrientation.replace(**fields)
  • ps.grid.GridSystem(*, layer_range, circle=None, connection=None, lower_reservoir=None, upper_reservoir=None): A deck’s reservoir grid system over a range of layers (COORDSYS), which OPM Flow ignores.
  • ps.grid.GridSystem.replace(**fields)
  • ps.grid.InRegion(map, region): The cells of one region of a region map, as a grid statement’s cells.
  • ps.grid.InRegion.replace(**fields)
  • ps.grid.MapAxes(*, y_axis, origin, x_axis): The map frame a grid’s coordinates sit in: the origin and a point on each map axis.
  • ps.grid.MapAxes.replace(**fields)
  • ps.grid.MinPoreVolume(*, threshold=None, per_cell_thresholds=None): The pore volume below which a cell is made inactive (MINPV, MINPVV).
  • ps.grid.MinPoreVolume.replace(**fields)
  • ps.grid.NonNeighbor(*, first, second, transmissibility): The transmissibility between two cells that are not neighbours (NNC).
  • ps.grid.NonNeighbor.replace(**fields)
  • ps.grid.NonNeighborConnectionPolicy(*, ignore_simulator_connections=False): Whether the run builds non-neighbour connections at all (NONNC).
  • ps.grid.NonNeighborConnectionPolicy.replace(**fields)
  • ps.grid.Operate(target, operator, source=None, alpha=None, beta=None, cells=<factory>, form=None, stage=None, fluid_in_place_set=None, source_fluid_in_place_set=None, work=None, source_work=None): Write an operator applied to another array into an array (OPERATE; OPERATER over a region).
  • ps.grid.Operate.replace(**fields)
  • ps.grid.Pinch(*, minimum_thickness=None, gap_mode, maximum_gap=None, transmissibility_mode=None, multiplier_scope=None): How cells connect vertically across layers that pinch out (PINCH).
  • ps.grid.Pinch.replace(**fields)
  • ps.grid.PoreVolumeOverride(value, cells=<factory>): The pore volume of each cell over a box of cells (PORV).
  • ps.grid.PoreVolumeOverride.replace(**fields)
  • ps.grid.PoreVolumeScale(factor, cells=<factory>): A multiplier of each cell’s pore volume over a box of cells (MULTPV).
  • ps.grid.PoreVolumeScale.replace(**fields)
  • ps.grid.Radial(*, shape, inner_radius, radial_widths, angular_widths, dz, top, active=None, coordinate_unit=None, coordinate_reference=None, map_axes=None, map_units=None, grid_orientation=None, grid_system=None, minimum_pore_volume=None, pinch_policy=None, net_to_gross=None, transmissibility_scheme=None): Radial grid geometry described with semantic radial/angular extents.
  • ps.grid.Radial.replace(**fields)
  • ps.grid.RegionPairMultiplier(*, from_region=None, to_region=None, factor, directions, connections='all', map=None, stage=None): A transmissibility multiplier between two regions of a region map (MULTREGT).
  • ps.grid.RegionPairMultiplier.replace(**fields)
  • ps.grid.RegionalPoreVolumeMultiplier(*, region, factor, map): Scale pore volume for cells in a typed semantic region-map family.
  • ps.grid.RegionalPoreVolumeMultiplier.replace(**fields)
  • ps.grid.RockCompaction(*, model, water_induced, loading, unloading, water_saturation_nodes, overburden): Water-induced rock compaction (ROCKCOMP, ROCK2D, ROCK2DTR, ROCKWNOD, OVERBURD).
  • ps.grid.RockCompaction.replace(**fields)
  • ps.grid.RockPressureCompaction(*, tables, reversibility='reversible', store_initial_pressure=False, table_regions='pvt_regions'): Pore-volume and transmissibility multipliers against pressure (ROCKCOMP, ROCKTAB, ROCKOPTS).
  • ps.grid.RockPressureCompaction.replace(**fields)
  • ps.grid.Scale(target, by, source=None, cells=<factory>, form=None, stage=None, fluid_in_place_set=None, work=None, source_work=None): Multiply an array by a factor over its cells (MULTIPLY; OPERATE MULTX; MULTIREG).
  • ps.grid.Scale.replace(**fields)
  • ps.grid.SourceTerm(*, cell, component, rate, heat_rate=None, temperature=None): A source or sink of one component in one grid cell (Flow’s SOURCE), from a date on.
  • ps.grid.SourceTerm.replace(**fields)
  • ps.grid.Spider(*, shape, inner_radius, radial_widths, angular_widths, dz, top, active=None, coordinate_unit=None, coordinate_reference=None, map_axes=None, map_units=None, grid_orientation=None, grid_system=None, minimum_pore_volume=None, pinch_policy=None, net_to_gross=None, transmissibility_scheme=None): A spider-web radial grid: rings and sectors round a well, with the fields of Radial.
  • ps.grid.Spider.replace(**fields)
  • ps.groups: Canonical semantic group-control public namespace.
  • ps.groups.Branch(*, name, from_node, to_node, lift_table=None, is_disabled=False, uses_no_pressure_loss=False, artificial_lift_quantity=None): A pipeline of the extended production network, from one node to the next (BRANPROP).
  • ps.groups.Branch.replace(**fields)
  • ps.groups.Economics(*, group, minimum_oil_rate=None, minimum_gas_rate=None, maximum_water_cut=None, maximum_gas_oil_ratio=None, maximum_water_gas_ratio=None): A group’s economic limits (GECON): the rates and ratios its production is tested against.
  • ps.groups.Economics.replace(**fields)
  • ps.groups.Efficiency(*, group, factor, network_propagation=None): A group’s efficiency (up-time) factor (GEFAC): the fraction of the time it flows.
  • ps.groups.Efficiency.replace(**fields)
  • ps.groups.FuelGas(*, group, intent, consumption_rate=None, produced_gas_fraction=None): A group’s fuel gas (GCONSUMP): the gas it consumes, taken from what it produces.
  • ps.groups.FuelGas.replace(**fields)
  • ps.groups.GasLift(*, well, enabled=True, maximum_lift_gas_rate=None, weight_factor=None, minimum_lift_gas_rate=None, gas_factor=None, enforce_gas_limit=None): A well’s part in gas-lift optimization (WLIFTOPT): whether and how much lift gas it gets.
  • ps.groups.GasLift.replace(**fields)
  • ps.groups.GasLiftOptimization(*, scope, group=None, well=None, maximum_lift_gas_rate=None, maximum_total_gas_rate=None, incremental_gas_rate=None, minimum_economic_gradient=None, optimization_interval=None, use_newton=None): Gas-lift optimization: how the field’s lift gas is shared out, and a group’s or well’s cap.
  • ps.groups.GasLiftOptimization.replace(**fields)
  • ps.groups.GasSales(*, group, sales_rate, maximum_rate=None, minimum_rate=None, action='none'): A group’s gas sales target (GCONSALE): the gas it sells, the surplus re-injected.
  • ps.groups.GasSales.replace(**fields)
  • ps.groups.GuideRates(*, phase, minimum_interval=0, potential_exponent, denominator_constant, ratio1_coefficient, ratio1_exponent, ratio2_coefficient, ratio2_exponent, incremental=True, damping_factor=None, use_free_gas_only=None, minimum_guide_rate=None): The guide-rate formula (GUIDERAT): how a group’s target is shared among its producers.
  • ps.groups.GuideRates.replace(**fields)
  • ps.groups.InjectionTarget(*, group, phase, rate=None, reservoir_volume=None, reinjection_fraction=None, voidage_replacement=None, control=None, rate_limit=None, reservoir_volume_limit=None, reinjection_fraction_limit=None, voidage_replacement_limit=None, available_to_parent=None, guide_rate=None, guide_basis=None, reinjection_source_group=None, voidage_source_group=None, phase_word=None): A group’s injection control of phase (GCONINJE), a well’s ps.Inject rule.
  • ps.groups.InjectionTarget.replace(**fields)
  • ps.groups.Network(*, name, nodes, branches=(), kind='extended'): The production network: its nodes and the pipelines between them, to a terminal pressure.
  • ps.groups.Network.replace(**fields)
  • ps.groups.Node(*, name, group=None, terminal_pressure=None, lift_table=None, uses_no_pressure_loss=False, auto_choke=False, add_gas_lift=False, efficiency=None, artificial_lift_quantity=None): A node of the production network, where pipelines meet; a terminal one holds a pressure.
  • ps.groups.Node.replace(**fields)
  • ps.groups.PressureMaintenance(*, group, intent, region, fluid_in_place_set=None, basis=None, pressure=None, alpha=None, beta=None): A group maintaining a fluid-in-place region’s average pressure (GPMAINT).
  • ps.groups.PressureMaintenance.replace(**fields)
  • ps.groups.ProductionTarget(*, group, oil_rate=None, water_rate=None, gas_rate=None, liquid_rate=None, reservoir_volume=None, control=None, oil_rate_limit=None, water_rate_limit=None, gas_rate_limit=None, liquid_rate_limit=None, reservoir_volume_limit=None, on_violation=None, on_water_violation=None, on_gas_violation=None, on_liquid_violation=None, available_to_parent=None, guide_rate=None, guide_phase=None): A group’s production control (GCONPROD), the control rule of a well’s ps.Produce.
  • ps.groups.ProductionTarget.replace(**fields)
  • ps.groups.Satellite(*, group, oil_rate=None, water_rate=None, gas_rate=None, reservoir_volume=None, lift_gas_rate=None, phase=None, rate=None): A satellite group’s production or injection from this date (GSATPROD, GSATINJE).
  • ps.groups.Satellite.replace(**fields)
  • ps.initial: The initial state: how a model’s reservoir starts.
  • ps.initial.CompositionVsDepth(*, depth, mole_fraction): Overall mole fractions against depth, for one equilibration region.
  • ps.initial.CompositionVsDepth.frame(): Return the table as a polars frame.
  • ps.initial.CompositionVsDepth.from_frame(frame): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.initial.CompositionVsDepth.replace(**fields)
  • ps.initial.ConstantTemperature(*, temperature): The reservoir’s initial temperature, the same in every cell (RTEMP).
  • ps.initial.ConstantTemperature.replace(**fields)
  • ps.initial.Equilibrium(*, datum_depth, datum_pressure, oil_water_contact=None, gas_water_contact=None, gas_oil_contact=None, solution_gor_by_depth=None, vaporized_oil_by_depth=None, bubble_point_by_depth=None, dew_point_by_depth=None, vaporized_water_by_depth=None, temperature_by_depth=None, composition_by_depth=None, report_datum_depth=None, threshold_pressures=(), vaporization_controls=None, initial_water_saturation=None, oil_water_capillary_pressure=0, gas_oil_capillary_pressure=0, use_dissolved_gas_table=None, use_vaporized_oil_table=None, use_vaporized_water_table=None, accuracy=None, pressure_table_points=None, source=None): The initial state in equilibrium: the datum, the contacts and the depth tables.
  • ps.initial.Equilibrium.replace(**fields)
  • ps.initial.ExplicitState(*, pressure, water_saturation=None, vaporized_water_gas_ratio=None, gas_saturation=None, oil_saturation=None, solution_gor=None, solution_gas_water_ratio=None, vaporized_oil_gas_ratio=None, temperature=None, mole_fraction=None): The initial state stated cell by cell instead of an equilibrium.
  • ps.initial.ExplicitState.replace(**fields)
  • ps.initial.PbVsDepth(*, source=None, depth, bubble_point_pressure): The bubble-point pressure against depth (PBVD), one equilibration region.
  • ps.initial.PbVsDepth.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.initial.PbVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.initial.PbVsDepth.replace(**fields)
  • ps.initial.PdVsDepth(*, source=None, depth, dew_point_pressure): The dew-point pressure against depth (PDVD), one equilibration region.
  • ps.initial.PdVsDepth.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.initial.PdVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.initial.PdVsDepth.replace(**fields)
  • ps.initial.Restart(*, case, step, content_hash=None, initial_water_saturation=None, skip_history=True, threshold_pressures=()): The initial state read from a previous run’s restart file.
  • ps.initial.Restart.replace(**fields)
  • ps.initial.RsVsDepth(*, source=None, depth, solution_gor): The initial solution gas-oil ratio against depth (RSVD), one equilibration region.
  • ps.initial.RsVsDepth.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.initial.RsVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.initial.RsVsDepth.replace(**fields)
  • ps.initial.RvVsDepth(*, source=None, depth, vaporized_oil_gas_ratio): The initial vaporized oil-gas ratio against depth (RVVD), one equilibration region.
  • ps.initial.RvVsDepth.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.initial.RvVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.initial.RvVsDepth.replace(**fields)
  • ps.initial.RvwVsDepth(*, source=None, depth, vaporized_water_gas_ratio): The initial vaporized water-gas ratio against depth (RVWVD), one equilibration region.
  • ps.initial.RvwVsDepth.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.initial.RvwVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.initial.RvwVsDepth.replace(**fields)
  • ps.initial.TemperatureVsDepth(*, depth, temperature): The initial reservoir temperature against depth (RTEMPVD), one equilibration region.
  • ps.initial.TemperatureVsDepth.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.initial.TemperatureVsDepth.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.initial.TemperatureVsDepth.replace(**fields)
  • ps.initial.ThresholdPressure(*, from_region=None, to_region=None, fault=None, pressure=None): Threshold pressure between two equilibration regions, or across a fault.
  • ps.initial.ThresholdPressure.replace(**fields)
  • ps.io: Typed external data importers for PetroScript.
  • ps.io.deck_files(path): Return every file a deck reads, the deck first, as {relpath: sha256}.
  • ps.io.read_grdecl(path): Read a GRDECL file’s corner-point geometry into a ps.grid.CornerPoint.
  • ps.io.read_sheet(path): Read a sheet back: (frame, metadata), the inverse of ps.io.write_sheet.
  • ps.io.write_grdecl(grid, *, path): Write a grid’s corner-point geometry as the GRDECL file ps.io.read_grdecl reads back.
  • ps.io.write_sheet(frame, *, path, key, units=None, schema=None): Write frame to path as a pinned parquet sheet and return the path.
  • ps.lift: Lift tables: the bottom-hole pressure a well’s tubing delivers, tabulated (ps.lift).
  • ps.lift.InjectionTable(*, number, bhp_reference_depth, source=None, phase, units=None, rate, thp, bhp): An injector’s lift table (VFPINJ): the bottom-hole pressure its tubing delivers.
  • ps.lift.InjectionTable.frame(): The table in long form: one row per axis combination, the last axis fastest.
  • ps.lift.InjectionTable.from_frame(frame, **fields): Build the table from its long form, a frame read by column name.
  • ps.lift.InjectionTable.replace(**fields)
  • ps.lift.ProductionTable(*, number, bhp_reference_depth, source=None, rate, rate_kind, thp, water_fraction=<factory>, water_fraction_kind='water_cut', gas_fraction=<factory>, gas_fraction_kind='gas_oil_ratio', artificial_lift=<factory>, artificial_lift_kind=None, units=None, bhp, constant_pressure_drop_position=None): A producer’s lift table (VFPPROD): the bottom-hole pressure its tubing delivers.
  • ps.lift.ProductionTable.frame(): The table in long form: one row per axis combination, the last axis fastest.
  • ps.lift.ProductionTable.from_frame(frame, **fields): Build the table from its long form, a frame read by column name.
  • ps.lift.ProductionTable.replace(**fields)
  • ps.lift.Tubing(*, measured_depth, true_vertical_depth, inner_diameter, roughness, wellhead_temperature, temperature_gradient): A well’s tubing, for the lift tables made from it: its survey and its temperature.
  • ps.lift.Tubing.replace(**fields)
  • ps.lift.generate(pipe, *, model, well, fluid, composition, correlation, number, rate, rate_kind, thp=None, water_fraction=(0.0,), water_fraction_kind='water_cut', gas_fraction=(0.0,), gas_fraction_kind='gas_oil_ratio', bhp_reference_depth=None, simulator=None, folder=None): A producer’s lift table NeqSim makes from its tubing and the fluid it flows.
  • ps.micp: Public namespace for micp semantics; definitions live in petroscript.core.micp.
  • ps.micp.Biology(*, rows): MICP’s biological and chemical parameters, one row of thirteen per saturation region.
  • ps.micp.Biology.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.micp.Biology.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.micp.Biology.replace(**fields)
  • ps.micp.Diffusion(*, microbes, oxygen, urea): MICP’s diffusion: the coefficient each species diffuses through the water by.
  • ps.micp.Diffusion.replace(**fields)
  • ps.micp.InitialState(*, microbes=None, oxygen=None, urea=None, biofilm=None, calcite=None): MICP’s initial state: the microbe, oxygen and urea concentrations, biofilm and calcite.
  • ps.micp.InitialState.replace(**fields)
  • ps.micp.Package(*, permeability, biology, diffusion=None, initial_state=None): Microbially induced calcite precipitation: the plugging, the biology, diffusion and state.
  • ps.micp.Package.replace(**fields)
  • ps.micp.PermeabilityFactor(*, rows): MICP plugging: the permeability left against the porosity calcite and biofilm leave.
  • ps.micp.PermeabilityFactor.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.micp.PermeabilityFactor.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.micp.PermeabilityFactor.replace(**fields)
  • ps.miscible: Public namespace for miscible semantics; definitions live in petroscript.core.miscible.
  • ps.miscible.CriticalGas(*, rows): The miscible critical gas saturation against the water saturation.
  • ps.miscible.CriticalGas.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.miscible.CriticalGas.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.miscible.CriticalGas.replace(**fields)
  • ps.miscible.Mixing(*, regions): The Todd-Longstaff mixing parameters of each miscible region.
  • ps.miscible.Mixing.replace(**fields)
  • ps.miscible.Package(*, transform=None, pressure_miscibility=None, normalized_relperm=None, residual_oil=None, critical_gas=None, todd_longstaff=None): A solvent’s miscibility with the oil: Flow’s miscible solvent model and its tables.
  • ps.miscible.Package.replace(**fields)
  • ps.miscible.PressureCurve(*, rows): The miscibility against the oil pressure.
  • ps.miscible.PressureCurve.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.miscible.PressureCurve.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.miscible.PressureCurve.replace(**fields)
  • ps.miscible.RelPerm(*, rows): The miscible relative permeability multipliers of the gas and solvent and of the oil.
  • ps.miscible.RelPerm.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.miscible.RelPerm.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.miscible.RelPerm.replace(**fields)
  • ps.miscible.ResidualOil(*, rows): The miscible residual oil saturation against the water saturation.
  • ps.miscible.ResidualOil.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.miscible.ResidualOil.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.miscible.ResidualOil.replace(**fields)
  • ps.miscible.Transform(*, rows): The miscibility of the solvent with the oil against the solvent’s fraction of the gas.
  • ps.miscible.Transform.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.miscible.Transform.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.miscible.Transform.replace(**fields)
  • ps.polymer: Public namespace for polymer semantics; definitions live in petroscript.core.polymer.
  • ps.polymer.Adsorption(*, rows): The polymer’s adsorption isotherm: what the rock holds against the polymer concentration.
  • ps.polymer.Adsorption.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.Adsorption.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.Adsorption.replace(**fields)
  • ps.polymer.Mixing(*, value): The Todd-Longstaff mixing parameter of one polymer mixing region.
  • ps.polymer.Mixing.replace(**fields)
  • ps.polymer.MolecularWeightTable(*, number, throughput, velocity, molecular_weight): Polymer molecular-weight injection lookup over throughput and velocity (PLYMWINJ).
  • ps.polymer.MolecularWeightTable.frame(): Return the table in long form, as a polars frame.
  • ps.polymer.MolecularWeightTable.from_frame(frame, **fields): Build the table from its long form, a frame read by column name.
  • ps.polymer.MolecularWeightTable.replace(**fields)
  • ps.polymer.Package(*, viscosity=None, salt_viscosity=None, temperature_viscosity=None, salt_temperature_viscosity=None, rock=None, adsorption=None, maximum_concentration=None, mixing_parameter=None, viscosity_mixing=None, molecular_weight_injection=None, shear_log=None, thermal_degradation=None, shear_response=None, water_skin_pressure=None, polymer_skin_pressure=None, molecular_weight=False, initial_concentration=None, initial_molecular_weight=None): A polymer flood’s physics: the polymer’s viscosity, its adsorption and its rock tables.
  • ps.polymer.Package.replace(**fields)
  • ps.polymer.Rock(*, inaccessible_pore_volume, residual_resistance_factor, rock_density, adsorption_index, maximum_adsorption): How the rock of one saturation region meets the polymer: pore access and adsorption.
  • ps.polymer.Rock.replace(**fields)
  • ps.polymer.SaltSensitivity(*, rows): The polymer’s viscosity multiplier against salinity and polymer concentration.
  • ps.polymer.SaltSensitivity.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.SaltSensitivity.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.SaltSensitivity.replace(**fields)
  • ps.polymer.SaltTemperatureSensitivity(*, rows): The polymer’s viscosity multiplier over a grid of salinity and temperature nodes.
  • ps.polymer.SaltTemperatureSensitivity.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.SaltTemperatureSensitivity.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.SaltTemperatureSensitivity.replace(**fields)
  • ps.polymer.Shear(*, rows): The polymer’s shear response: the viscosity factor against the flow velocity.
  • ps.polymer.Shear.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.Shear.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.Shear.replace(**fields)
  • ps.polymer.ShearLog(*, reference_polymer_concentration, rows, log_shear_rate=None): The polymer’s shear thinning: a viscosity multiplier against water velocity or shear rate.
  • ps.polymer.ShearLog.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.ShearLog.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.ShearLog.replace(**fields)
  • ps.polymer.SkinPressure(*, number, throughput, velocity, pressure_drop, reference_polymer_concentration=None): An injector’s skin pressure: the pressure drop against throughput and velocity.
  • ps.polymer.SkinPressure.frame(): Return the table in long form, as a polars frame.
  • ps.polymer.SkinPressure.from_frame(frame, **fields): Build the table from its long form, a frame read by column name.
  • ps.polymer.SkinPressure.replace(**fields)
  • ps.polymer.TemperatureSensitivity(*, rows): The polymer’s viscosity multiplier against temperature and polymer concentration.
  • ps.polymer.TemperatureSensitivity.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.TemperatureSensitivity.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.TemperatureSensitivity.replace(**fields)
  • ps.polymer.ThermalDegradation(*, rows): The polymer’s half-life against temperature: how fast heat degrades it.
  • ps.polymer.ThermalDegradation.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.ThermalDegradation.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.ThermalDegradation.replace(**fields)
  • ps.polymer.Viscosity(*, rows): The water’s viscosity multiplier against the polymer concentration.
  • ps.polymer.Viscosity.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.polymer.Viscosity.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.polymer.Viscosity.replace(**fields)
  • ps.polymer.ViscosityMixing(*, mixing_parameter, shear_factor, inaccessible_pore_volume, permeability_reduction): The four parameters of Flow’s molecular-weight viscosity model (PLYVMH).
  • ps.polymer.ViscosityMixing.replace(**fields)
  • ps.pvt: PVT: each phase’s formation volume factor and viscosity against pressure, by PVT region.
  • ps.pvt.Components(*, name, molecular_weight, critical_temperature, critical_pressure, critical_volume, acentric_factor, volume_shift=None): The components of an equation-of-state fluid: one row per component, in named columns.
  • ps.pvt.Components.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.pvt.Components.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.pvt.Components.replace(**fields)
  • ps.pvt.Composition(*, name, mole_fraction): A named composition: each component’s overall mole fraction.
  • ps.pvt.Composition.replace(**fields)
  • ps.pvt.ConstantCompressibilityOil(*, reference_pressure, fvf, compressibility, viscosity, viscosibility): Dead oil PVT of constant compressibility about one reference pressure.
  • ps.pvt.ConstantCompressibilityOil.replace(**fields)
  • ps.pvt.DeadOil(*, pressure, oil_fvf, oil_viscosity, source=None): Dead oil PVT: the oil’s formation volume factor and viscosity against pressure.
  • ps.pvt.DeadOil.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.pvt.DeadOil.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.pvt.DeadOil.replace(**fields)
  • ps.pvt.Diffusion(*, oil_molecular_weight=None, gas_molecular_weight=None, gas_in_gas=None, oil_in_gas=None, gas_in_oil=None, oil_in_oil=None): Molecular diffusion in one PVT region (DIFFUSE), with the coefficients DIFFC states.
  • ps.pvt.Diffusion.replace(**fields)
  • ps.pvt.DissolutionLimits(*, maximum_rate, scope=None): How fast gas may dissolve into oil: ps.pvt.DissolutionLimits(maximum_rate=0.001).
  • ps.pvt.DissolutionLimits.replace(**fields)
  • ps.pvt.DryGas(*, pressure, gas_fvf, gas_viscosity, source=None): Dry gas PVT: the gas’s formation volume factor and viscosity against pressure.
  • ps.pvt.DryGas.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.pvt.DryGas.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.pvt.DryGas.replace(**fields)
  • ps.pvt.LiveOil(*, solution_gor, pressure, oil_fvf, oil_viscosity, source=None): Live oil PVT: the oil’s FVF and viscosity at each solution gas-oil ratio and pressure.
  • ps.pvt.LiveOil.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.pvt.LiveOil.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.pvt.LiveOil.replace(**fields)
  • ps.pvt.VaporizationControls(*, oil_vaporization_propensity=0, oil_density_propensity=0): How oil vaporizes into undersaturated gas (VAPPARS): one statement for the whole model.
  • ps.pvt.VaporizationControls.replace(**fields)
  • ps.pvt.VaporizedWaterGasPVT(*, pressure, vaporized_water_gas_ratio, gas_fvf, gas_viscosity, source=None): Gas PVT with vaporized water: the water-gas ratio, FVF and viscosity at each pressure.
  • ps.pvt.VaporizedWaterGasPVT.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.pvt.VaporizedWaterGasPVT.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.pvt.VaporizedWaterGasPVT.replace(**fields)
  • ps.pvt.Water(*, reference_pressure, fvf, compressibility, viscosity, viscosibility): Water PVT: the water’s formation volume factor and viscosity about a reference pressure.
  • ps.pvt.Water.replace(**fields)
  • ps.pvt.WetGas(*, pressure, vaporized_oil_gas_ratio, gas_fvf, gas_viscosity, source=None): Wet gas PVT: the gas’s vaporized-oil ratio, FVF and viscosity at each pressure.
  • ps.pvt.WetGas.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.pvt.WetGas.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.pvt.WetGas.replace(**fields)
  • ps.pvt.water_content_of_gas(*, temperature, pressure, salinity=0.0, units): Saturated water content of sweet gas as a vaporized water-gas ratio (RVW).
  • ps.relperm: Relative permeability: the saturation functions and the statements about them.
  • ps.relperm.CriticalTolerance(*, value): The critical-saturation tolerance (TOLCRIT), stated once for the whole model.
  • ps.relperm.CriticalTolerance.replace(**fields)
  • ps.relperm.EndpointScaling(*, curve='drainage', method='two_point', connate_water=None, capillary_connate_water=None, connate_gas=None, capillary_connate_gas=None, critical_water=None, critical_gas=None, critical_oil_to_water=None, critical_oil_to_gas=None, maximum_water=None, maximum_gas=None, maximum_water_relperm=None, maximum_gas_relperm=None, oil_relperm_at_connate_water=None, gas_relperm_at_residual_oil=None, water_relperm_at_critical_oil=None, oil_relperm_at_critical_gas=None, oil_relperm_at_critical_water=None, maximum_gas_oil_capillary_pressure=None, maximum_oil_water_capillary_pressure=None, source=None): End-point scaling of the drainage or the imbibition curves (the whole model).
  • ps.relperm.EndpointScaling.replace(**fields)
  • ps.relperm.Gas(*, sg, krg, pc, source=None): Gas relative permeability and capillary pressure against gas saturation (family II).
  • ps.relperm.Gas.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.relperm.Gas.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.relperm.Gas.replace(**fields)
  • ps.relperm.GasOil(*, sg=None, sl=None, krg, krog, pcog, source=None): Gas-oil relative permeability and capillary pressure against gas or liquid saturation.
  • ps.relperm.GasOil.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.relperm.GasOil.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.relperm.GasOil.replace(**fields)
  • ps.relperm.GasWater(*, sg, krg, krw, pc, source=None): Gas and water relative permeability, gas-water capillary pressure, against gas saturation.
  • ps.relperm.GasWater.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.relperm.GasWater.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.relperm.GasWater.replace(**fields)
  • ps.relperm.Hysteresis(*, family=None, scope='both', wetting='imbibition_table', capillary_pressure_scaling=False, capillary_pressure_curvature=None, wetting_relperm_curvature=None, cycle_policy=None, lands_parameter=None, secondary_drainage_reduction=None, imbibition_linear_fraction=None, three_phase_switch_threshold=None): Relative-permeability hysteresis: the model and the WAG cycles (the whole model).
  • ps.relperm.Hysteresis.replace(**fields)
  • ps.relperm.JFunction(*, phase='water', surface_tension, gas_oil_surface_tension=None, porosity_exponent=None, permeability_exponent=None, permeability_basis=None): Leverett J-function capillary-pressure scaling: each cell’s curve by its rock (whole model).
  • ps.relperm.JFunction.replace(**fields)
  • ps.relperm.LETRelPerm(*, water=None, oil=None, gas=None, capillary, source=None): A phase pair’s relperm and capillary pressure as a LET correlation (one saturation region).
  • ps.relperm.LETRelPerm.replace(**fields)
  • ps.relperm.MaxCapillaryPressure(*, maximum_pressure): The largest oil-water capillary pressure the initial water saturation may scale a curve to.
  • ps.relperm.MaxCapillaryPressure.replace(**fields)
  • ps.relperm.Oil(*, so, krow, krog, source=None): Oil relative permeability in water and in gas against oil saturation (family II).
  • ps.relperm.Oil.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.relperm.Oil.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.relperm.Oil.replace(**fields)
  • ps.relperm.OilWater(*, sw, krw, krow, pcow, source=None): Oil-water relative permeability and capillary pressure against water saturation.
  • ps.relperm.OilWater.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.relperm.OilWater.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.relperm.OilWater.replace(**fields)
  • ps.relperm.SaturationOptions(*, direct=False, irreversible=False, surface_tension=False): How the saturation-function regions are read (SATOPTS), stated once for the whole model.
  • ps.relperm.SaturationOptions.replace(**fields)
  • ps.relperm.ThreePhase(*, method, exponent=None, source=None): The three-phase method: how the oil’s relative permeability comes from its two-phase curves.
  • ps.relperm.ThreePhase.replace(**fields)
  • ps.relperm.Water(*, sw, krw, pc=None, source=None): Water relative permeability and capillary pressure against water saturation (family II).
  • ps.relperm.Water.frame(): The table’s columns as a polars frame, one row per table row.
  • ps.relperm.Water.from_frame(frame, **fields): Build the table from a frame’s columns, read by name.
  • ps.relperm.Water.replace(**fields)
  • ps.results: A finished run’s results: ps.results.open(folder) reads them by PetroScript’s names.
  • ps.results.ResultError(*args, code=None, address=None, fix=None, at=None): A run’s output that cannot be read, or a run that stopped short.
  • ps.results.open(folder): Open a finished run’s folder and read it by PetroScript’s names.
  • ps.solvent: Public namespace for solvent semantics; definitions live in petroscript.core.solvent.
  • ps.solvent.CO2LiveOilPVT(*, rows, baseline_oil=None, injection_gas_density=None, injection_gas_pvt=None, source=None): Live oil that CO2 dissolves into: the oil’s and gas’s PVT by CO2 fraction and pressure.
  • ps.solvent.CO2LiveOilPVT.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.solvent.CO2LiveOilPVT.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.solvent.CO2LiveOilPVT.replace(**fields)
  • ps.solvent.HydrocarbonRelPerm(*, data, stated=None, source=None): The hydrocarbon relative permeability of a miscible solvent run (SOF2).
  • ps.solvent.HydrocarbonRelPerm.frame(): The table as a polars frame, a column per column of the table.
  • ps.solvent.HydrocarbonRelPerm.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.solvent.HydrocarbonRelPerm.replace(**fields)
  • ps.solvent.PVT(*, rows): The solvent’s PVT: its formation volume factor and viscosity against pressure.
  • ps.solvent.PVT.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.solvent.PVT.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.solvent.PVT.replace(**fields)
  • ps.solvent.Package(*, variant='generic', saturation=None, density=None, pvt=None, initial_saturation=None, gas_dissolves_in_water=False, simulator_supplied_phases=()): A solvent flood’s physics: a fourth, gas-like component and its properties.
  • ps.solvent.Package.replace(**fields)
  • ps.solvent.SaturationFunction(*, rows): The split of the gas relative permeability between the gas and the solvent.
  • ps.solvent.SaturationFunction.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.solvent.SaturationFunction.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.solvent.SaturationFunction.replace(**fields)
  • ps.storage: Public namespace for storage semantics; definitions live in petroscript.core.storage.
  • ps.storage.ConvectiveDissolution(*, coefficient): The rate the stored gas dissolves into the brine by convective mixing, from a date.
  • ps.storage.ConvectiveDissolution.replace(**fields)
  • ps.storage.Diffusion(*, formulation, regions): A storage run’s diffusion: how the stored gas and the water diffuse in each phase.
  • ps.storage.Diffusion.replace(**fields)
  • ps.storage.Package(*, kind, components, initial_composition=None, simulator_supplied_phases=(), gas_dissolves_in_water=False, water_vaporizes_in_gas=False, dissolved_gas=False, activity_model=None, salinity=None, temperature=None, diffusion=None, compositions=()): CO2 or hydrogen storage in brine: Flow’s storage model and what the run states with it.
  • ps.storage.Package.replace(**fields)
  • ps.surfactant: Public namespace for surfactant semantics; definitions live in petroscript.core.surfactant.
  • ps.surfactant.Package(*, viscosity): A surfactant flood’s physics: its viscosity table.
  • ps.surfactant.Package.replace(**fields)
  • ps.surfactant.Viscosity(*, rows): Surfactant viscosity: the water viscosity against the surfactant concentration.
  • ps.surfactant.Viscosity.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.surfactant.Viscosity.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.surfactant.Viscosity.replace(**fields)
  • ps.testing: Read-only semantic helpers for PetroScript tests.
  • ps.testing.assert_issue(subject, *, code, address=None, fix_contains=None): Assert that a subject’s checks hold an issue of code, and return that issue.
  • ps.testing.first_divergence(expected, actual): Return where two models first differ, field by field, or None when they are equal.
  • ps.testing.records(path_or_text, *, includes='refuse'): Read a deck file, or deck text, as the keyword occurrences it states, in deck order.
  • ps.thermal: Public namespace for thermal semantics; definitions live in petroscript.core.thermal.
  • ps.thermal.Conductivities(*, rock, oil, gas, water): The thermal conductivities of the rock and of each phase, stated apart.
  • ps.thermal.Conductivities.replace(**fields)
  • ps.thermal.DensityVsTemperature(*, reference_temperature, coefficient1, coefficient2): A phase’s density against temperature: a reference temperature and two coefficients.
  • ps.thermal.DensityVsTemperature.replace(**fields)
  • ps.thermal.FluidHeatCapacity(*, rows): The oil’s, the water’s and the gas’s specific heats against temperature.
  • ps.thermal.FluidHeatCapacity.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.thermal.FluidHeatCapacity.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.thermal.FluidHeatCapacity.replace(**fields)
  • ps.thermal.JouleThomson(*, reference_pressure, coefficient=None): A phase’s Joule-Thomson coefficient: its temperature change as its pressure drops.
  • ps.thermal.JouleThomson.replace(**fields)
  • ps.thermal.Package(*, mode, rock=None, fluids=None, oil_heat_capacity=None, water_heat_capacity=None, gas_heat_capacity=None, initial_temperature=None, phase_conductivities=None, oil_viscosity=None, water_viscosity=None, gas_viscosity=None, oil_density_temperature=None, water_density_temperature=None, gas_density_temperature=None, oil_joule_thomson=None, water_joule_thomson=None, gas_joule_thomson=None): A heat model: Flow’s energy equation and the rock’s and fluids’ heat properties.
  • ps.thermal.Package.replace(**fields)
  • ps.thermal.RockHeatCapacity(*, rows): The rock’s volumetric heat capacity against temperature.
  • ps.thermal.RockHeatCapacity.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.thermal.RockHeatCapacity.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.thermal.RockHeatCapacity.replace(**fields)
  • ps.thermal.RockProperties(*, conductivity=None, volumetric_heat_capacity=None, heat_capacity_temperature_dependence=None, gas_saturation_conductivity_scaling=None): The rock’s heat properties: its conductivity and its heat capacity.
  • ps.thermal.RockProperties.replace(**fields)
  • ps.thermal.ViscosityVsTemperature(*, rows, reference_pressure=None, reference_solution_gor=None): A phase’s viscosity against temperature, at a reference pressure.
  • ps.thermal.ViscosityVsTemperature.frame(): The table’s rows as a polars frame, a column per column of the table.
  • ps.thermal.ViscosityVsTemperature.from_frame(frame, **fields): Build the table from a frame’s columns, read by name, one row per frame row.
  • ps.thermal.ViscosityVsTemperature.replace(**fields)
  • ps.tracer: Public namespace for tracer semantics; definitions live in petroscript.core.tracer.
  • ps.tracer.Tracer(*, name, phase, units=None, concentration_by_depth=(), free_gas_concentration_by_depth=(), solution_gas_concentration_by_depth=(), initial_free_gas_concentration=None, initial_solution_gas_concentration=None): A passive tracer: a named concentration one phase carries without changing the flow.
  • ps.tracer.Tracer.replace(**fields)
  • ps.wells: Canonical semantic well namespace.
  • ps.wells.AICD(*, well, segment, end_segment=None, strength=None, length=None, calibration_density=None, calibration_viscosity=None, emulsion_critical_fraction=None, emulsion_transition_width=None, maximum_emulsion_ratio=None, scaling_mode=None, calibration_rate=None, status=None, flow_rate_exponent=None, viscosity_exponent=None, density_mixture_exponents=None, viscosity_mixture_exponents=None, density_exponent=None): An autonomous inflow-control device on a segment, or each of a range (WSEGAICD).
  • ps.wells.AICD.replace(**fields)
  • ps.wells.ControlDefaults(*, producer_bhp, injector_bhp): The bottom-hole pressure a well control that states none takes from here on (FBHPDEF).
  • ps.wells.ControlDefaults.replace(**fields)
  • ps.wells.Cycling(*, well, injection_period, shut_period, ramp_up_period=None, maximum_timestep=None, respect_windows=True): The selected wells’ cycle of open and shut periods from this date (WCYCLE).
  • ps.wells.Cycling.replace(**fields)
  • ps.wells.DamageFactorCorrection(*, well, coefficient, exponent, offset=0): The selected gas wells’ non-Darcy D factors from Dake’s correlation (WDFACCOR).
  • ps.wells.DamageFactorCorrection.replace(**fields)
  • ps.wells.Economics(*, well, minimum_oil_rate=None, minimum_gas_rate=None, maximum_water_cut=None, maximum_gas_oil_ratio=None, maximum_water_gas_ratio=None, workover_scope=None, follow_on_well=None, end_run_on_trigger=False, test_basis='surface_rate'): Well-level economic limits on the selected wells (WECON).
  • ps.wells.Economics.replace(**fields)
  • ps.wells.Efficiency(*, well, factor, network_propagation=None): The selected wells’ efficiency (up-time) factor (WEFAC): the fraction of the time they flow.
  • ps.wells.Efficiency.replace(**fields)
  • ps.wells.FilterCake(*, well, fraction, completion_i=None, completion_j=None, completion_k=None): A cleaning of the filter cake on the selected injectors’ connections (WINJCLN).
  • ps.wells.FilterCake.replace(**fields)
  • ps.wells.GuideRate(*, well, guide_rate=None, phase='total_rate', under_group_control=None, scale=None): A well’s guide rate: its share of its group’s target under group control (WGRUPCON).
  • ps.wells.GuideRate.replace(**fields)
  • ps.wells.HistoryControl(*, control=None, end_run_on_bhp_switch=False): Hold every history-matched producer to one control from this date (WHISTCTL).
  • ps.wells.HistoryControl.replace(**fields)
  • ps.wells.ICD(*, well, segment, end_segment=None, strength=None, length=None, calibration_density=None, calibration_viscosity=None, emulsion_critical_fraction=None, emulsion_transition_width=None, maximum_emulsion_ratio=None, scaling_mode=None, calibration_rate=None, status=None): A spiral inflow-control device on a segment, or on each segment of a range (WSEGSICD).
  • ps.wells.ICD.replace(**fields)
  • ps.wells.InjectedStream(*, well, temperature=None, pressure=None, filtrate_concentration=None, polymer_concentration=None, salinity=None, polymer_from_group=None, tracers=<factory>, solvent_fraction=None, foam_concentration=None, microbe_concentration=None, oxygen_concentration=None, urea_concentration=None, molecular_weight_table=None, water_skin_pressure_table=None, polymer_skin_pressure_table=None, composition=None): What the selected injectors’ stream carries from this date.
  • ps.wells.InjectedStream.replace(**fields)
  • ps.wells.InjectionDamage(*, well, geometry, permeability, porosity, wellbore_radius=None, fracture_area=None, completion_i=None, completion_j=None, completion_k=None): The filter cake on the selected injectors’ connections: its shape and its rock (WINJDAM).
  • ps.wells.InjectionDamage.replace(**fields)
  • ps.wells.InjectionMultiplier(*, well, pressure, mobility_factor, reversibility='well_reversible', completion_i=None, completion_j=None, completion_k=None): A pressure-dependent injectivity multiplier on the selected injectors (WINJMULT).
  • ps.wells.InjectionMultiplier.replace(**fields)
  • ps.wells.Lump(*, well, i=None, j=None, k=None, completion): Make a well’s connections in a run of layers one numbered completion (COMPLUMP).
  • ps.wells.Lump.replace(**fields)
  • ps.wells.NonDarcyFactor(*, well, factor): Set the selected gas wells’ non-Darcy flow factor from this date (WDFAC).
  • ps.wells.NonDarcyFactor.replace(**fields)
  • ps.wells.PressureAveraging(*, well=None, inner_block_weight=None, pore_volume_inner_weight=False, connection_factor_weight=None, depth_correction=None, connections=None, reference_depth=None): How a well’s block-average pressure is calculated (WPAVE, WWPAVE, WPAVEDEP).
  • ps.wells.PressureAveraging.replace(**fields)
  • ps.wells.ProductivityIndex(*, well, value): The selected wells’ productivity or injectivity index from this date (WELPI).
  • ps.wells.ProductivityIndex.replace(**fields)
  • ps.wells.ProductivityMultiplier(*, well, factor, i=None, j=None, k=None, first_completion=None, last_completion=None): A multiplier on the selected wells’ connection factors from this date (WPIMULT).
  • ps.wells.ProductivityMultiplier.replace(**fields)
  • ps.wells.Regroup(*, well, group): Move the selected wells into another group from this date (WELSPECS restated).
  • ps.wells.Regroup.replace(**fields)
  • ps.wells.Segments(*, well, segments=(), connections=(), top_depth=None, top_length=0.0, top_volume=None, length_depth_mode='incremental', pressure_drop_model='hydrostatic_friction_acceleration', flow_model=None): A segmented well’s tree (WELSEGS) and where its connections join it (COMPSEGS).
  • ps.wells.Segments.replace(**fields)
  • ps.wells.Skin(*, well, i=None, j=None, k=None, skin_factor): Give a well’s connections in a run of layers a skin factor from this date (CSKIN).
  • ps.wells.Skin.replace(**fields)
  • ps.wells.Survey(*, well, rft=None, plt=None, segments=None): Ask for the selected wells’ downhole surveys from this date (WRFTPLT).
  • ps.wells.Survey.replace(**fields)
  • ps.wells.TargetMultiplier(*, well, quantity, factor): Multiply one rate of the wells’ controls by factor (WTMULT).
  • ps.wells.TargetMultiplier.replace(**fields)
  • ps.wells.Trajectory(*, branch=None, points, connections=()): A well’s path along one branch (WELTRAJ) and the connections along it (COMPTRAJ).
  • ps.wells.Trajectory.replace(**fields)
  • ps.wells.Valve(*, well, segment, status='open', flow_coefficient=None, flow_area=None, pipe_length=None, pipe_diameter=None, pipe_roughness=None, pipe_area=None, maximum_area=None): A valve on one segment of a segmented well (WSEGVALV).
  • ps.wells.Valve.replace(**fields)
  • ps.wells.WellList(*, name, wells, action='new'): A named list of wells, opened or edited at its date (WLIST).
  • ps.wells.WellList.replace(**fields)
  • ps.wells.WellTest(*, well, interval, reasons=frozenset({'physical'}), maximum_tests=None, startup_period=None): Periodic tests that reopen the selected wells when they can flow again (WTEST).
  • ps.wells.WellTest.replace(**fields)
  • Bundle(root, recipe): An opened bundle: the recipe, and each named sheet validated on first read.
  • Bundle.path(kind): Return the file a sheet of kind is read from: tables/<kind>.parquet.
  • Bundle.schema(kind): Return the schema a sheet is read against: the id the recipe or the file names.
  • Bundle.sheet(kind): Return the sheet as a polars frame, validated against its schema at the door.
  • Bundle.sheets (property): The sheets the recipe names: each a kind, or kind@version naming its schema.
  • Bundle.units (property): The unit system the recipe states the sheets’ numbers in.
  • Change(*, address, before=None, after=None): One difference between two models, by address (m.diff’s rows).
  • Change.address (property)
  • Change.after (property)
  • Change.before (property)
  • Deck(target, model, files, issues=(), stamp=<factory>): One target’s files for one model, held in memory: nothing is written and nothing is run.
  • Deck.check(*, simulator=None): Return PetroScript’s rows for this deck, then what the simulator says when it reads it.
  • Deck.digest (property): The sha256 of the files’ sha256sum listing, in path order.
  • Deck.files (property)
  • Deck.issues (property)
  • Deck.model (property)
  • Deck.run(*, simulator=None, preflight=True, folder=None): Write the files into folder and run the target’s simulator on them.
  • Deck.stamp (property)
  • Deck.target (property)
  • Deck.write(folder): Write every file below folder, creating it; return each path’s sha256.
  • Expression(): A formula the run evaluates: a summary quantity, a number, or an operation on them.
  • Expression.maximum(other): The greater of this value and other wherever the formula is evaluated: UMAX.
  • Expression.minimum(other): The lesser of this value and other wherever the formula is evaluated: UMIN.
  • Expression.rank(*, descending=False): Each member’s rank by this value among the members where it is defined: SORTA, or SORTD.
  • Expression.union_add(other): The union sum (UADD): this value plus other, or whichever one is defined.
  • Issues(rows=(), *, said="PetroScript's checks only; the simulator has not seen this model: ps.compile(m).check()"): The rows check() returns: a plain list of issues that says what checked them.
  • Run(folder, output): A finished run, read by PetroScript’s names: ps.results.open(folder) or deck.run().
  • Run.field(name): One field quantity over the run: a polars frame of date, value and unit.
  • Run.folder (property)
  • Run.frame(): Every summary vector the run wrote in one long polars frame.
  • Run.grid (property): The grid the run wrote, a view: dims, actnum, digest, its pillars and corner depths.
  • Run.grid.actnum (property)
  • Run.grid.digest (property)
  • Run.grid.dims (property)
  • Run.grid.names (property): The names of the grid’s arrays: ("pillars", "corner_depths").
  • Run.grid.units (property): Each array’s unit word, the grid file’s length unit.
  • Run.groups(name): One quantity of every group over the run: a polars frame of date, group, value and unit.
  • Run.initial (property): The state the run started from (restart step 0), by name.
  • Run.initial.for_grid (property): The digest of the grid the arrays are cells of (run.grid.digest).
  • Run.initial.names (property): The names of the arrays the run wrote here.
  • Run.initial.units (property): Each array’s unit word, None when dimensionless.
  • Run.log (property): What the simulator said while it ran: run.log.warnings, run.log.errors.
  • Run.log.warnings (property): What the simulator said while it ran: run.log.warnings, run.log.errors.
  • Run.phases (property): The phases the run simulated, in the order oil, water, gas: ("oil", "water").
  • Run.regions(name): One quantity of each region over the run: a polars frame of date, region, value and unit.
  • Run.restart(at): The reservoir’s state at one restart report: its cell arrays, by name.
  • Run.restart.array(name): Return one of the view’s cell arrays by its name: view["pressure"].
  • Run.restart.time (property): The report’s days since the run’s start (0.0 at step 0).
  • Run.restarts (property): Every restart report by its date, in the order the run wrote them.
  • Run.static (property): The arrays that do not change over the run.
  • Run.times (property): The times the run wrote its summary, in days since the start (the first is after it).
  • Run.units (property): The run’s unit system: "metric", "field" or "lab", as m.units holds it.
  • Run.wells(name): One quantity of every well over the run: a polars frame of date, well, value and unit.
  • Simulator(name, version, path): A simulator a target found: the target’s name, the version it reports and its path.
  • Simulator.name (property)
  • Simulator.path (property)
  • Simulator.version (property)

PetroScript is licensed under the Apache License 2.0. © 2026 Blauweiss EDV LLC. PetroScript by Blauweiss AI.For AI agents: llms.txt