kappa_sdk.Field#
- class kappa_sdk.Field(field_id, name, asset, field_dto, cluster_apis, dto_converter)[source]#
Field object.
Presents a KAPPA Automate field object that can be queried for contained wells. Returned as a result of the
Connection.get_fields()query.Note
Should not be instantiated directly.
Note
Field.wellsproperty is populated on-demand and is cached for the duration of theConnection.Attributes
Gets the asset of the
Field.Get the Field Data Types catalog object of the
FieldGets the list of KW documents contained in this
Fieldand its well groups.Gets the list of file folders contained in this
Well.Gets the list of files contained in this
Fieldand its well groups.Gets the id of the
Fieldobject.Gets the name of the
Field.Gets the list of PVTs contained in this
Field.Gets the reference date of the
Field.Gets the list of all well groups contained in the
Field.Get the Field Well Properties catalog object of the
FieldGets the list of all wells contained in the
Field, including contained in the well groups.Methods
Field.create_automatic_rtm_aggregator(...[, ...])Field.create_pvt_from_file(pvt_name, file_id)Creates a PVT (Pressure-Volume-Temperature) object from a file.
Field.create_pvt_from_kw_document(pvt_name, ...)Create a PVT object in the well group from a KW document
Field.create_well(name[, uwi, comment, ...])Create a new well under the field associated to this
FieldDelete the field
Clean all attributes and dto, to grab updated attributes.
Field.rename(new_name)Rename the field :param new_name: New name of the field
Field.upload_file(file_path[, ...])Uploads a file to this
Field.- Parameters:
field_id (str)
name (str)
asset (str)
field_dto (FieldDtoWithHierarchy | None)
cluster_apis (ClusterAPIS)
dto_converter (FieldDtoConverter)
- __init__(field_id, name, asset, field_dto, cluster_apis, dto_converter)[source]#
- Parameters:
field_id (str)
name (str)
asset (str)
field_dto (FieldDtoWithHierarchy | None)
cluster_apis (ClusterAPIS)
dto_converter (FieldDtoConverter)
- Return type:
None
- property data_types_catalog: FieldDataTypesCatalog#
Get the Field Data Types catalog object of the
Field
- property well_properties_catalog: FieldWellPropertiesCatalog#
Get the Field Well Properties catalog object of the
Field
- property wells: List[Well]#
Gets the list of all wells contained in the
Field, including contained in the well groups.Note
This property is populated on-demand and is cached for the duration of the
Connection.
- property well_groups: List[WellGroup]#
Gets the list of all well groups contained in the
Field.Note
This property is populated on-demand and is cached for the duration of the
Connection.
- property files: List[File]#
Gets the list of files contained in this
Fieldand its well groups.Note
This property is populated on-demand and is cached for the duration of the
Connection.
- property file_folders: List[FileFolder]#
Gets the list of file folders contained in this
Well.Note
This property is populated on-demand and is cached for the duration of the
Connection.
- property documents: List[Document]#
Gets the list of KW documents contained in this
Fieldand its well groups.Note
This property is populated on-demand and is cached for the duration of the
Connection.
- upload_file(file_path, file_folder_id=None, overwrite=False)[source]#
Uploads a file to this
Field.- Parameters:
file_path (str) – Full path and name of the file to upload.
overwrite (bool) – A value indicating whether to overwrite a file with the same name if it already exists in the field.
file_folder_id (str | None) – Id of the file folder to upload the file
- Returns:
File– An uploaded file object.- Return type:
- create_well(name, uwi=None, comment=None, production_type=WellProductionTypeEnum.unknown, labels=None, well_properties_values=None)[source]#
Create a new well under the field associated to this
Field- Parameters:
name (str) – Name of the new well
uwi (str | None) – Unique well identifier of the new well
comment (str | None) – Any description
production_type (WellProductionTypeEnum) – Production type of the new well, unknown by default
labels (List[str] | None) – Labels of the new well
well_properties_values (List[Dict[str, Any]] | None) – You can fill the well properties values, it has to be a dictionary following this format {‘alias_of_the_well_property’:value}
- Returns:
Well– The new well- Return type:
- rename(new_name)[source]#
Rename the field :param new_name: New name of the field
- Parameters:
new_name (str)
- Return type:
None
- property pvts: List[PVT]#
Gets the list of PVTs contained in this
Field.Note
This property is populated on-demand and is cached for the duration of the
Connection.
- create_pvt_from_file(pvt_name, file_id, start_date=None, reservoir_pressure=None, reservoir_temperature=None, gas_oil_type=None, unit_system=None)[source]#
Creates a PVT (Pressure-Volume-Temperature) object from a file. You can define fallback parameters when the gas oil type is undetermined.
- Parameters:
pvt_name (
str) – The name of the PVT object to be created.file_id (
str) – The identifier of the file from which the PVT object will be created.start_date (
datetime, optional) – The start date for the PVT data coverage. Defaults to None.reservoir_pressure (
float, optional) – The pressure of the reservoir associated with the PVT object. Defaults to None.reservoir_temperature (
float, optional) – The temperature of the reservoir associated with the PVT object. Defaults to None.gas_oil_type (
GasOilTypeEnum, optional) – The type of gas or oil associated with the PVT object, as per the enumerated GasOilTypeEnum. Defaults to None.unit_system (
UnitSystemPvtEnum, optional) – The unit system used for the PVT object, as per the enumerated UnitSystemPvtEnum. Defaults to None.
- Returns:
PVT– An instance of the PVT object created using the provided parameters and data from the specified text file.- Return type:
- create_pvt_from_kw_document(pvt_name, document_id, analysis_id)[source]#
Create a PVT object in the well group from a KW document
- Parameters:
pvt_name (
str) – Name of the PVT object to createdocument_id (
str) – Id of the document to useanalysis_id (
str) – Id of the analysis to use
- Returns:
PVT– The PVT object created.- Return type:
- create_automatic_rtm_aggregator(pvt_document, name='Automatic RTM Agg #1', labels=None, use_black_oil_pvt=False, pressure_data_type='BHP', pressure_label=None, use_oil_rate=None, use_gas_rate=None, use_water_rate=None, wells=None, power_law_segments=1, artm_model=ARTMModelEnum.mzfd, improve_target=ARTMImproveTargetEnum.cumulative, regression_algorithm=ARTMRegressionAlgorithmEnum.genetic_algorithm, replicate_results_to_master_container=False, use_equivalent_rate=False, forecast_duration_hours=2160, forecast_type=ARTMForecastTypeEnum.constant_pressure, forecast_value=None, mandatory_well_properties=None)[source]#
- Parameters:
pvt_document (Document)
name (str)
labels (List[str] | None)
use_black_oil_pvt (bool)
pressure_data_type (str)
pressure_label (List[str] | None)
use_oil_rate (bool | None)
use_gas_rate (bool | None)
use_water_rate (bool | None)
wells (List[Well] | None)
power_law_segments (Literal[1, 2])
artm_model (ARTMModelEnum)
improve_target (ARTMImproveTargetEnum)
regression_algorithm (ARTMRegressionAlgorithmEnum)
replicate_results_to_master_container (bool)
use_equivalent_rate (bool)
forecast_duration_hours (float)
forecast_type (ARTMForecastTypeEnum)
forecast_value (float | None)
mandatory_well_properties (List[str] | None)
- Return type:
None