Engines

Delft Advanced Research Terra Simulator

class darts.engines.conn_mesh

Bases: pybind11_object

Class for connection-based mesh and it`s properties

add_conn(self: darts.engines.conn_mesh, arg0: int, arg1: int, arg2: float, arg3: float) int
add_wells(self: darts.engines.conn_mesh, arg0: darts.engines.ms_well_vector) int
add_wells_mpfa(self: darts.engines.conn_mesh, arg0: darts.engines.ms_well_vector, arg1: int) int
connect_segments(self: darts.engines.conn_mesh, arg0: ms_well, arg1: ms_well, arg2: int, arg3: int, arg4: int) int
get_res_tran(self: darts.engines.conn_mesh, tran: darts.engines.value_vector, tranD: darts.engines.value_vector) int

Get reservoir transmissibilities

get_wells_tran(self: darts.engines.conn_mesh, tran: darts.engines.value_vector) int

Get well indexes

init(*args, **kwargs)

Overloaded function.

  1. init(self: darts.engines.conn_mesh, arg0: str) -> int

Initialize from TPFACONNS (TPFACONNSN) keyword file

  1. init(self: darts.engines.conn_mesh, block_m: darts.engines.index_vector, block_p: darts.engines.index_vector, tran: darts.engines.value_vector, tranD: darts.engines.value_vector = value_vector[]) -> int

Initialize by connection list defined by block_m, block_p, tran and tranD arrays

init_const_1d(self: darts.engines.conn_mesh, arg0: float, arg1: int) int
init_grav_coef(self: darts.engines.conn_mesh, grav_const: float = 9.80665e-05) int

Initialize gravity coefficients for every connection

init_mpfa(*args, **kwargs)

Overloaded function.

  1. init_mpfa(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: int, arg7: int) -> int

  2. init_mpfa(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: darts.engines.value_vector, arg7: int, arg8: int, arg9: int) -> int

init_mpfa_e(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: darts.engines.value_vector, arg7: int, arg8: int, arg9: int) int
init_mpsa(*args, **kwargs)

Overloaded function.

  1. init_mpsa(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: int, arg6: int, arg7: int, arg8: int) -> int

  2. init_mpsa(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: int, arg7: int, arg8: int, arg9: int) -> int

init_pm(*args, **kwargs)

Overloaded function.

  1. init_pm(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: int, arg7: int, arg8: int) -> int

  2. init_pm(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: darts.engines.value_vector, arg7: darts.engines.value_vector, arg8: int, arg9: int, arg10: int) -> int

  3. init_pm(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: darts.engines.value_vector, arg7: darts.engines.value_vector, arg8: darts.engines.value_vector, arg9: darts.engines.value_vector, arg10: int, arg11: int, arg12: int) -> int

init_pme(self: darts.engines.conn_mesh, arg0: darts.engines.index_vector, arg1: darts.engines.index_vector, arg2: darts.engines.index_vector, arg3: darts.engines.index_vector, arg4: darts.engines.value_vector, arg5: darts.engines.value_vector, arg6: darts.engines.value_vector, arg7: darts.engines.value_vector, arg8: darts.engines.value_vector, arg9: darts.engines.value_vector, arg10: int, arg11: int, arg12: int) int
init_poro(self: darts.engines.conn_mesh, arg0: str) int
reverse_and_sort(self: darts.engines.conn_mesh) int
reverse_and_sort_dvel(self: darts.engines.conn_mesh) int
reverse_and_sort_mpfa(self: darts.engines.conn_mesh) int
reverse_and_sort_mpsa(self: darts.engines.conn_mesh) int
reverse_and_sort_pm(self: darts.engines.conn_mesh) int
reverse_and_sort_pme(self: darts.engines.conn_mesh) int
save_enthalpy(self: darts.engines.conn_mesh, arg0: str) int
save_poro(self: darts.engines.conn_mesh, arg0: str) int
save_pressure(self: darts.engines.conn_mesh, arg0: str) int
save_temperature(self: darts.engines.conn_mesh, arg0: str) int
save_volume(self: darts.engines.conn_mesh, arg0: str) int
save_zmf(self: darts.engines.conn_mesh, arg0: str) int
set_res_tran(self: darts.engines.conn_mesh, tran: darts.engines.value_vector, tranD: darts.engines.value_vector) int

Set reservoir transmissibilities

set_wells_tran(*args, **kwargs)

Overloaded function.

  1. set_wells_tran(self: darts.engines.conn_mesh, tran: darts.engines.value_vector) -> int

Set well indexes

  1. set_wells_tran(self: darts.engines.conn_mesh, tran: darts.engines.value_vector) -> int

Set well indexes

class darts.engines.engine_base

Bases: pybind11_object

Base simulator engine class

add_value_to_Q(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
add_value_to_Q_inj_p(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
add_value_to_Q_p(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
add_value_to_cov_inj_p(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
add_value_to_cov_prod_p(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
add_value_to_inj_wei_p(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
add_value_to_prod_wei_p(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
apply_newton_update(self: darts.engines.engine_base, arg0: float) int
calc_adjoint_gradient_dirac_all(self: darts.engines.engine_base) int
calc_newton_residual(self: darts.engines.engine_base) float
calc_well_residual(self: darts.engines.engine_base) float
clear_Q(self: darts.engines.engine_base) int
clear_Q_inj_p(self: darts.engines.engine_base) int
clear_Q_p(self: darts.engines.engine_base) int
clear_cov_inj_p(self: darts.engines.engine_base) int
clear_cov_prod_p(self: darts.engines.engine_base) int
clear_inj_wei_p(self: darts.engines.engine_base) int
clear_previous_adjoint_assembly(self: darts.engines.engine_base) int
clear_prod_wei_p(self: darts.engines.engine_base) int
post_newtonloop(self: darts.engines.engine_base, arg0: float, arg1: float) int
print_stat(self: darts.engines.engine_base) int
push_back_to_BHP_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_BHP_wei_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_Q_all(self: darts.engines.engine_base) int
push_back_to_Q_inj_all(self: darts.engines.engine_base) int
push_back_to_binary_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_cov_BHP_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_cov_customized_op_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_cov_inj_all(self: darts.engines.engine_base) int
push_back_to_cov_prod_all(self: darts.engines.engine_base) int
push_back_to_cov_temperature_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_cov_well_tempr_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_customized_op_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_customized_op_wei_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_inj_wei_all(self: darts.engines.engine_base) int
push_back_to_prod_wei_all(self: darts.engines.engine_base) int
push_back_to_temperature_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_temperature_wei_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_well_tempr_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
push_back_to_well_tempr_wei_all(self: darts.engines.engine_base, arg0: darts.engines.value_vector) int
report(self: darts.engines.engine_base) int
run(self: darts.engines.engine_base, arg0: float) int
run_single_newton_iteration(self: darts.engines.engine_base, arg0: float) int
run_timestep(self: darts.engines.engine_base, arg0: float, arg1: float) int
solve_linear_equation(self: darts.engines.engine_base) int
test_assembly(self: darts.engines.engine_base, arg0: int, arg1: int, arg2: int) int
test_spmv(self: darts.engines.engine_base, arg0: int, arg1: int, arg2: int) int
class darts.engines.engine_super_cpu1_1_t

Bases: engine_base

Isothermal CPU simulator engine for 1 components and 1 phases with diffusion and kinetic reaction

init(self: darts.engines.engine_super_cpu1_1_t, arg0: darts.engines.conn_mesh, arg1: darts.engines.ms_well_vector, arg2: darts.engines.op_vector, arg3: darts.engines.sim_params, arg4: darts.engines.timer_node) int

Initialize simulator by mesh, tables and wells

class darts.engines.engine_super_cpu2_1

Bases: engine_base

Non-isothermal CPU simulator engine for 2 components and 1 phases with diffusion and kinetic reaction

init(self: darts.engines.engine_super_cpu2_1, arg0: darts.engines.conn_mesh, arg1: darts.engines.ms_well_vector, arg2: darts.engines.op_vector, arg3: darts.engines.sim_params, arg4: darts.engines.timer_node) int

Initialize simulator by mesh, tables and wells

class darts.engines.engine_super_elastic_cpu1_2

Bases: engine_base

Isothermal CPU simulator engine for 1 components and 2 phases with momentum balance, diffusion and kinetic reaction

apply_newton_update(self: darts.engines.engine_super_elastic_cpu1_2, arg0: float) int
calc_newton_residual(self: darts.engines.engine_super_elastic_cpu1_2) darts.engines.value_vector
init(self: darts.engines.engine_super_elastic_cpu1_2, arg0: darts.engines.conn_mesh, arg1: darts.engines.ms_well_vector, arg2: darts.engines.op_vector, arg3: darts.engines.sim_params, arg4: darts.engines.timer_node) int

Initialize simulator by mesh, tables and wells

post_newtonloop(self: darts.engines.engine_super_elastic_cpu1_2, arg0: float, arg1: float) int
class darts.engines.engine_super_mp_cpu2_1

Bases: engine_base

Non-isothermal CPU simulator engine for 2 components and 1 phases with diffusion and kinetic reaction

init(self: darts.engines.engine_super_mp_cpu2_1, arg0: darts.engines.conn_mesh, arg1: darts.engines.ms_well_vector, arg2: darts.engines.op_vector, arg3: darts.engines.sim_params, arg4: darts.engines.timer_node) int

Initialize simulator by mesh, tables and wells

run_single_newton_iteration(self: darts.engines.engine_super_mp_cpu2_1, arg0: float) int
class darts.engines.ms_well

Bases: pybind11_object

Multisegment well, modeled as an extension of the reservoir

init_mech_rate_parameters(self: darts.engines.ms_well, N_VARS: int, P_VAR: int, n_vars: int, phase_names: List[str], rate_ev: operator_set_gradient_evaluator_iface, thermal: int = 0) None

Init by NC and rate operators for poromechanics

init_rate_parameters(self: darts.engines.ms_well, n_vars: int, phase_names: List[str], rate_ev: operator_set_gradient_evaluator_iface, thermal: int = 0) None

Init by NC and rate operators

class darts.engines.multilinear_adaptive_cpu_interpolator_i_d_1_1

Bases: operator_set_gradient_evaluator_iface

Operator set interpolator with j index type and d value type for 1 operators in 1-dimensional parameter space

evaluate(self: darts.engines.multilinear_adaptive_cpu_interpolator_i_d_1_1, state: darts.engines.value_vector, values: darts.engines.value_vector) int

Evaluate operators

evaluate_with_derivatives(self: darts.engines.multilinear_adaptive_cpu_interpolator_i_d_1_1, state: darts.engines.value_vector, block_idx: darts.engines.index_vector, values: darts.engines.value_vector, derivatives: darts.engines.value_vector) int

Evaluate operators and derivatives (v)

init(self: darts.engines.multilinear_adaptive_cpu_interpolator_i_d_1_1) int

Initialize interpolator

init_timer_node(self: darts.engines.multilinear_adaptive_cpu_interpolator_i_d_1_1, timer_node: darts.engines.timer_node) None

Initialize timer

write_to_file(self: darts.engines.multilinear_adaptive_cpu_interpolator_i_d_1_1, arg0: str) int

Write interpolator data to file

class darts.engines.multilinear_adaptive_cpu_interpolator_l_d_1_1

Bases: operator_set_gradient_evaluator_iface

Operator set interpolator with m index type and d value type for 1 operators in 1-dimensional parameter space

evaluate(self: darts.engines.multilinear_adaptive_cpu_interpolator_l_d_1_1, state: darts.engines.value_vector, values: darts.engines.value_vector) int

Evaluate operators

evaluate_with_derivatives(self: darts.engines.multilinear_adaptive_cpu_interpolator_l_d_1_1, state: darts.engines.value_vector, block_idx: darts.engines.index_vector, values: darts.engines.value_vector, derivatives: darts.engines.value_vector) int

Evaluate operators and derivatives (v)

init(self: darts.engines.multilinear_adaptive_cpu_interpolator_l_d_1_1) int

Initialize interpolator

init_timer_node(self: darts.engines.multilinear_adaptive_cpu_interpolator_l_d_1_1, timer_node: darts.engines.timer_node) None

Initialize timer

write_to_file(self: darts.engines.multilinear_adaptive_cpu_interpolator_l_d_1_1, arg0: str) int

Write interpolator data to file

class darts.engines.pm_discretizer

Bases: pybind11_object

Multipoint discretizer for poromechanics

calc_all_fluxes_once(self: darts.engines.pm_discretizer, arg0: float) None
get_gradient(self: darts.engines.pm_discretizer, arg0: int) Tuple[darts.engines.index_vector, List[float]]
get_thermal_gradient(self: darts.engines.pm_discretizer, arg0: int) Tuple[darts.engines.index_vector, List[float]]
init(self: darts.engines.pm_discretizer, arg0: int, arg1: int, arg2: darts.engines.index_vector) None
reconstruct_gradients_per_cell(self: darts.engines.pm_discretizer, arg0: float) None
reconstruct_gradients_thermal_per_cell(self: darts.engines.pm_discretizer, arg0: float) None
class darts.engines.sim_params

Bases: pybind11_object

Class simulation parameters

property first_ts

Length of the first time step (days)

class linear_solver_t

Bases: pybind11_object

Available types of linear solvers

Members:

cpu_gmres_cpr_amg

cpu_gmres_ilu0

cpu_superlu

cpu_gmres_cpr_amg1r5

cpu_gmres_fs_cpr

cpu_samg

gpu_gmres_cpr_amg

gpu_gmres_ilu0

gpu_gmres_cpr_aips

gpu_gmres_cpr_amgx_ilu

gpu_gmres_cpr_amgx_ilu_sp

gpu_gmres_cpr_amgx_amgx

gpu_gmres_amgx

gpu_amgx

gpu_gmres_cpr_nf

gpu_bicgstab_cpr_amgx

gpu_cusolver

property name
class newton_solver_t

Bases: pybind11_object

Available types of newton solvers

Members:

newton_std

newton_global_chop

newton_local_chop

newton_inflection_point

property name
class nonlinear_norm_t

Bases: pybind11_object

Available types of nonlinear norm

Members:

L1

L2

LINF

property name
class darts.engines.timer_node

Bases: pybind11_object

Timers tree structure

get_timer(self: darts.engines.timer_node) float
print(self: darts.engines.timer_node, arg0: str, arg1: str) str
reset_recursive(self: darts.engines.timer_node) None
start(self: darts.engines.timer_node) None
stop(self: darts.engines.timer_node) None

Physics_sup

class darts.models.physics_sup.physics_comp_sup.Compositional(property_container, components, phases, timer, n_points, min_p, max_p, min_z, max_z, min_t=-1, max_t=-1, thermal=0, platform='cpu', itor_type='multilinear', itor_mode='adaptive', itor_precision='d', cache=False, output_props: DefaultPropertyEvaluator | None = None)[source]

Bases: PhysicsBase

__init__(property_container, components, phases, timer, n_points, min_p, max_p, min_z, max_z, min_t=-1, max_t=-1, thermal=0, platform='cpu', itor_type='multilinear', itor_mode='adaptive', itor_precision='d', cache=False, output_props: DefaultPropertyEvaluator | None = None)[source]
init_wells(wells)[source]
n_axes_points

Name of interpolation method and engine used for this physics:

property_operators = {}
rate_operators = {}
reservoir_operators = {}
set_boundary_conditions(mesh, uniform_pressure, uniform_composition)[source]
set_operators(property_container, thermal, output_properties=None)[source]
set_uniform_T_initial_conditions(mesh, uniform_pressure, uniform_composition: list, uniform_temp)[source]

“” Function to set uniform initial reservoir condition :param -mesh: mesh object :param -uniform_pressure: uniform pressure setting :param -uniform_composition: uniform uniform_composition setting

set_uniform_initial_conditions(mesh, uniform_pressure, uniform_composition: list)[source]
wellbore_operators = {}

Properties

Properties Black Oil

class darts.models.physics_sup.properties_black_oil.CapillaryPressurePcgo(pvt)[source]

Bases: property_evaluator_iface

__init__(self: darts.engines.property_evaluator_iface) None[source]
evaluate(*args, **kwargs)[source]

Overloaded function.

  1. evaluate(self: darts.engines.property_evaluator_iface, state: darts.engines.value_vector) -> float

Evaluate property value

  1. evaluate(self: darts.engines.property_evaluator_iface, states: darts.engines.value_vector, n_blocks: int, values: darts.engines.value_vector) -> int

Evaluate property values

class darts.models.physics_sup.properties_black_oil.CapillaryPressurePcow(pvt)[source]

Bases: property_evaluator_iface

__init__(self: darts.engines.property_evaluator_iface) None[source]
evaluate(*args, **kwargs)[source]

Overloaded function.

  1. evaluate(self: darts.engines.property_evaluator_iface, state: darts.engines.value_vector) -> float

Evaluate property value

  1. evaluate(self: darts.engines.property_evaluator_iface, states: darts.engines.value_vector, n_blocks: int, values: darts.engines.value_vector) -> int

Evaluate property values

class darts.models.physics_sup.properties_black_oil.DensityGas(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(pres, pbub, xgo)[source]
class darts.models.physics_sup.properties_black_oil.DensityOil(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(pres, pbub, xgo)[source]
class darts.models.physics_sup.properties_black_oil.DensityWat(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(pres, pbub, xgo)[source]
class darts.models.physics_sup.properties_black_oil.GasRelPerm(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(gas_sat, wat_sat)[source]
class darts.models.physics_sup.properties_black_oil.OilRelPerm(pvt)[source]

Bases: object

Krog(gas_sat)[source]
Krow(wat_sat)[source]
__init__(pvt)[source]
evaluate(gas_sat, wat_sat)[source]
class darts.models.physics_sup.properties_black_oil.RockCompactionEvaluator(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(state)[source]
class darts.models.physics_sup.properties_black_oil.ViscGas(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(pres, pbub)[source]
class darts.models.physics_sup.properties_black_oil.ViscOil(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(pres, pbub)[source]
class darts.models.physics_sup.properties_black_oil.ViscWat(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(pres, pbub)[source]
class darts.models.physics_sup.properties_black_oil.WatRelPerm(pvt)[source]

Bases: object

__init__(pvt)[source]
evaluate(gas_sat, wat_sat)[source]
class darts.models.physics_sup.properties_black_oil.flash_black_oil(pvt)[source]

Bases: object

__init__(pvt)[source]
bubble_point_pressure(pres, z)[source]
evaluate(pres, z)[source]

Properties CCS Thermal

Basic Properties

class darts.models.physics_sup.properties_basic.CapillaryPressure(p_entry=0, swc=0, labda=2)[source]

Bases: object

__init__(p_entry=0, swc=0, labda=2)[source]
evaluate(sat)[source]

default evaluator of capillary pressure Pc based on pow :param sat: saturation :return: Pc

class darts.models.physics_sup.properties_basic.ConstFunc(value)[source]

Bases: object

__init__(value)[source]
evaluate(dummy1=0, dummy2=0, dummy3=0, dummy4=0)[source]
class darts.models.physics_sup.properties_basic.ConstantK(nc, ki, min_z=1e-11)[source]

Bases: Flash

__init__(nc, ki, min_z=1e-11)[source]
evaluate(pressure, temperature, zc)[source]
class darts.models.physics_sup.properties_basic.Density(dens0, compr=0.0, p0=1.0)[source]

Bases: object

__init__(dens0, compr=0.0, p0=1.0)[source]
evaluate(pressure, temperature: float | None = None, x: list | None = None)[source]
class darts.models.physics_sup.properties_basic.Density4Ions(density, compressibility=0, p_ref=1, ions_fac=0)[source]

Bases: object

__init__(density, compressibility=0, p_ref=1, ions_fac=0)[source]
evaluate(pres, ion_liq_molefrac)[source]
class darts.models.physics_sup.properties_basic.DensityBrineCo2(components, dens0=1000.0, compr=0.0, p0=1.0, x_mult=0.0)[source]

Bases: Density

__init__(components, dens0=1000.0, compr=0.0, p0=1.0, x_mult=0.0)[source]
evaluate(pressure, temperature, x)[source]
class darts.models.physics_sup.properties_basic.Enthalpy(tref=273.15, hcap=0.0357)[source]

Bases: object

__init__(tref=273.15, hcap=0.0357)[source]
evaluate(pressure: float | None = None, temperature: float | None = None, x: list | None = None)[source]
class darts.models.physics_sup.properties_basic.Flash(nph, nc)[source]

Bases: object

__init__(nph, nc)[source]
evaluate(pressure, temperature, zc)[source]
class darts.models.physics_sup.properties_basic.KineticBasic(equi_prod, kin_rate_cte, ne, combined_ions=True)[source]

Bases: object

__init__(equi_prod, kin_rate_cte, ne, combined_ions=True)[source]
evaluate(pressure, temperature, x, nu_sol)[source]
class darts.models.physics_sup.properties_basic.PhaseRelPerm(phase, swc=0, sgr=0)[source]

Bases: object

__init__(phase, swc=0, sgr=0)[source]
evaluate(sat)[source]
darts.models.physics_sup.properties_basic.RR_func(zc, k, eps)[source]
class darts.models.physics_sup.properties_basic.RockCompactionEvaluator(pref=1, compres=1.45e-05)[source]

Bases: object

__init__(pref=1, compres=1.45e-05)[source]
evaluate(pressure)[source]
class darts.models.physics_sup.properties_basic.RockEnergyEvaluator(c_vr=3710.0, T_ref=273.15)[source]

Bases: object

__init__(c_vr=3710.0, T_ref=273.15)[source]
evaluate(temperature)[source]
class darts.models.physics_sup.properties_basic.flash_3phase(components)[source]

Bases: object

__init__(components)[source]
evaluate(p, T, zc)[source]

Operators

class darts.models.physics_sup.operator_evaluator_sup.DefaultPropertyEvaluator(variables, property_container)[source]

Bases: operator_set_evaluator_iface

__init__(self: darts.engines.operator_set_evaluator_iface) None[source]
evaluate(state, values)[source]

Class methods which evaluates the state operators for the element based physics :param state: state variables [pres, comp_0, …, comp_N-1] :param values: values of the operators (used for storing the operator values) :return: updated value for operators, stored in values

class darts.models.physics_sup.operator_evaluator_sup.RateOperators(property_container)[source]

Bases: operator_set_evaluator_iface

__init__(self: darts.engines.operator_set_evaluator_iface) None[source]
evaluate(state, values)[source]

Class methods which evaluates the state operators for the element based physics :param state: state variables [pres, comp_0, …, comp_N-1] :param values: values of the operators (used for storing the operator values) :return: updated value for operators, stored in values

class darts.models.physics_sup.operator_evaluator_sup.ReservoirOperators(property_container, thermal=0)[source]

Bases: operator_set_evaluator_iface

__init__(self: darts.engines.operator_set_evaluator_iface) None[source]
evaluate(state, values)[source]

Class methods which evaluates the state operators for the element based physics :param state: state variables [pres, comp_0, …, comp_N-1] :param values: values of the operators (used for storing the operator values) :return: updated value for operators, stored in values

class darts.models.physics_sup.operator_evaluator_sup.ReservoirThermalOperators(property_container, thermal=1)[source]

Bases: ReservoirOperators

__init__(self: darts.engines.operator_set_evaluator_iface) None[source]
evaluate(state, values)[source]

Class methods which evaluates the state operators for the element based physics :param state: state variables [pres, comp_0, …, comp_N-1] :param values: values of the operators (used for storing the operator values) :return: updated value for operators, stored in values

class darts.models.physics_sup.operator_evaluator_sup.WellOperators(property_container, thermal=0)[source]

Bases: operator_set_evaluator_iface

__init__(self: darts.engines.operator_set_evaluator_iface) None[source]
evaluate(state, values)[source]

Class methods which evaluates the state operators for the element based physics :param state: state variables [pres, comp_0, …, comp_N-1] :param values: values of the operators (used for storing the operator values) :return: updated value for operators, stored in values

Models

class darts.models.darts_model.DartsModel[source]

Bases: object

Base class with multiple functions

__init__()[source]

” Initialize DartsModel class.

check_performance(overwrite=0, diff_norm_normalized_tol=1e-09, diff_abs_max_normalized_tol=1e-07, rel_diff_tol=1, perf_file='', pkl_suffix='')[source]

Function to check the performance data to make sure whether the performance has been changed

export_vtk(file_name='data', local_cell_data={}, global_cell_data={}, vars_data_dtype=<class 'numpy.float32'>, export_grid_data=True)[source]
get_performance_data()[source]

Function to get the needed performance data

init()[source]
Function to initialize the model, which includes:
  • initialize well (perforation) position

  • initialize well rate parameters

  • initialize reservoir condition

  • initialize well control settings

  • build accumulation_flux_operator_interpolator list

  • initialize engine

static load_performance_data(file_name='', pkl_suffix='')[source]
load_restart_data(filename='restart.pkl')[source]

Function to load data from previous simulation and uses them for following simulation. :param filename: restart_data filename

print_stat()[source]

Function to print the statistics information, including total timesteps, Newton iteration, linear iteration, etc..

print_timers()[source]
Function to print the time information, including total time elapsed,

time consumption at different stages of the simulation, etc..

reset()[source]

Function to initialize the engine by calling ‘init’ method.

run(days=0)[source]
run_python(days=0, restart_dt=0, timestep_python=False)[source]
run_timestep_python(dt, t)[source]
save_performance_data(file_name='', pkl_suffix='')[source]
save_restart_data(filename='restart.pkl')[source]

Function to save the simulation data for restart usage. :param filename: Name of the file where restart_data stores.

set_boundary_conditions()[source]
set_initial_conditions()[source]
set_op_list()[source]

Reservoirs

class darts.models.reservoirs.struct_reservoir.StructReservoir(timer, nx: int, ny: int, nz: int, dx, dy, dz, permx, permy, permz, poro, depth, actnum=1, global_to_local=0, op_num=0, coord=0, zcorn=0, is_cpg=False)[source]

Bases: object

__init__(timer, nx: int, ny: int, nz: int, dx, dy, dz, permx, permy, permz, poro, depth, actnum=1, global_to_local=0, op_num=0, coord=0, zcorn=0, is_cpg=False)[source]

Class constructor method

Parameters:
  • timer – timer object to measure discretization time

  • nx – number of reservoir blocks in the x-direction

  • ny – number of reservoir blocks in the y-direction

  • nz – number of reservoir blocks in the z-direction

  • dx – size of the reservoir blocks in the x-direction (scalar or vector form) [m]

  • dy – size of the reservoir blocks in the y-direction (scalar or vector form) [m]

  • dz – size of the reservoir blocks in the z-direction (scalar or vector form) [m]

  • permx – permeability of the reservoir blocks in the x-direction (scalar or vector form) [mD]

  • permy – permeability of the reservoir blocks in the y-direction (scalar or vector form) [mD]

  • permz – permeability of the reservoir blocks in the z-direction (scalar or vector form) [mD]

  • poro – porosity of the reservoir blocks

  • actnum – attribute of activity of the reservoir blocks (all are active by default)

  • global_to_local – one can define arbitrary indexing (mapping from global to local) for local arrays. Default indexing is by X (fastest),then Y, and finally Z (slowest)

  • op_num – index of required operator set of the reservoir blocks (the first by default). Use to introduce PVTNUM, SCALNUM, etc.

  • coord – COORD keyword values for more accurate geometry during VTK export (no values by default)

  • zcron – ZCORN keyword values for more accurate geometry during VTK export (no values by default)

add_perforation(well, i, j, k, well_radius=0.1524, well_index=-1, well_indexD=-1, segment_direction='z_axis', skin=0, multi_segment=True, verbose=False)[source]

well_indexD - thermal well index (for heat loss through the wellbore) if -1, use computed value based on cell geometry; if 0 - no heat losses

add_well(name, wellbore_diameter=0.15)[source]
export_vtk(file_name, t, local_cell_data, global_cell_data, export_constant_data=True)[source]
generate_cpg_vtk_grid()[source]
generate_vtk_grid(strict_vertical_layers=True, compute_depth_by_dz_sum=True)[source]
get_cell_cpg_widths()[source]
get_cell_cpg_widths_new()[source]
get_well(well_name)[source]

find well by name :param well_name: :return: well object

init_wells()[source]
set_boundary_volume(xy_minus=-1, xy_plus=-1, yz_minus=-1, yz_plus=-1, xz_minus=-1, xz_plus=-1)[source]
class darts.models.reservoirs.unstruct_reservoir.UnstructReservoir[source]

Bases: object

add_perforation(well, res_block, well_index, well_indexD)[source]

Class method which ads perforation to each (existing!) well

Parameters:
  • well – data object which contains data of the particular well

  • res_block – reservoir block in which the well has a perforation

  • well_index – well index (productivity index)

Returns:

add_well(name, depth)[source]

Class method which adds wells heads to the reservoir (Note: well head is not equal to a perforation!)

Parameters:
  • name

  • depth

Returns:

calc_boundary_cells(boundary_data)[source]

Class method which calculates constant boundary values at a specif constant x,y,z-coordinate

Parameters:

boundary_data – dictionary with the boundary location (X,Y,Z, and location)

Returns:

Discretizer

Structured Discretizer

class darts.mesh.struct_discretizer.StructDiscretizer(nx, ny, nz, dx, dy, dz, permx, permy, permz, global_to_local=0, coord=0, zcorn=0, is_cpg=False)[source]
__init__(nx, ny, nz, dx, dy, dz, permx, permy, permz, global_to_local=0, coord=0, zcorn=0, is_cpg=False)[source]

Class constructor method.

Parameters:
  • nx – number of reservoir blocks in the x-direction

  • ny – number of reservoir blocks in the y-direction

  • nz – number of reservoir blocks in the z-direction

  • dx – size of the reservoir blocks in the x-direction (scalar or vector form) [m]

  • dy – size of the reservoir blocks in the y-direction (scalar or vector form) [m]

  • dz – size of the reservoir blocks in the z-direction (scalar or vector form) [m]

  • permx – permeability of the reservoir blocks in the x-direction (scalar or vector form) [mD]

  • permy – permeability of the reservoir blocks in the y-direction (scalar or vector form) [mD]

  • permz – permeability of the reservoir blocks in the z-direction (scalar or vector form) [mD]

  • global_to_local – one can define arbitrary indexing (mapping from global to local) for local arrays. Default indexing is by X (fastest),then Y, and finally Z (slowest)

calc_cpg_discr()[source]

Class methods which performs the actual construction of the connection list

Return cell_m:

minus-side of the connection

Return cell_p:

plus-side of the connection

Return tran:

transmissibility value of connection

Return tran_thermal:

geometric coefficient of connection

calc_structured_discr()[source]

Class methods which performs the actual construction of the connection list

Return cell_m:

minus-side of the connection

Return cell_p:

plus-side of the connection

Return tran:

transmissibility value of connection

Return tran_thermal:

geometric coefficient of connection

calc_volumes()[source]

Class method which reshapes the volumes of all the cells to a flat array (Ntot x 1)

Returns:

flat volume array (Ntot x 1)

calc_well_index(i, j, k, well_radius=0.1524, segment_direction='z_axis', skin=0)[source]

Class method which construct the well index for each well segment/perforation

Parameters:
  • i – “human” counting of x-location coordinate of perforation

  • j – “human” counting of y-location coordinate of perforation

  • k – “human” counting of z-location coordinate of perforation

  • well_radius – radius of the well-bore

  • segment_direction – direction in which the segment perforates the reservoir block

  • skin – skin factor for pressure loss around well-bore due to formation damage

Return well_index:

well-index of particular perforation

convert_to_3d_array(data, data_name: str)[source]

Class method which converts the data object (scalar or vector) to a true 3D array (Nx,Ny,Nz)

Parameters:
  • data – any type of data, e.g. permeability of the cells (scalar, vector, or array form)

  • data_name – name of the data object (e.g. ‘permx’)

Return data:

true data 3D data array

convert_to_flat_array(data, data_name: str)[source]

Class methods which converts data object from any type to true flat array of size (Ntot x 1)

Parameters:
  • data – data object of any type (e.g. permeability of the cells) (scalar, vector, or 3D array form)

  • data_name – name of the data object (e.g. ‘permx’)

Return data:

true flat array (Ntot x 1)

static dump_connection_list(cell_m, cell_p, conn, filename)[source]

Static method which dumps the connection list to a file

Parameters:
  • cell_m – minus-side of the connection

  • cell_p – plus-side of the connection

  • conn – transmisibility value of connection

  • filename – name of the desired file

Returns:

Unstructured Discretizer

class darts.mesh.unstruct_discretizer.UnstructDiscretizer(permx, permy, permz, frac_aper, mesh_file: str, poro=0.2, num_matrix_cells=0, num_fracture_cells=0, num_well_cells=0, verbose=False)[source]
__init__(permx, permy, permz, frac_aper, mesh_file: str, poro=0.2, num_matrix_cells=0, num_fracture_cells=0, num_well_cells=0, verbose=False)[source]

Class constructor method

Parameters:
  • permx – permeability data object (either in scalar or vector form) in x-direction

  • permy – permeability data object (either in scalar or vector form) in y-direction

  • permz – permeability data object (either in scalar or vector form) in z-direction

  • frac_aper – fracture aperture data object (either in scalar or vector form)

  • mesh_file – name of the mesh file (in string form)

  • num_matrix_cells – number of matrix cells, if known before hand! (in scalar form)

  • num_fracture_cells – number of fracture cells, if known before hand! (in scalar form)

calc_boundary_cells(boundary_data)[source]

Class method which calculates constant boundary values at a specif constant x,y,z-coordinate

Parameters:

boundary_data – dictionary with the boundary location (X,Y,Z, and location)

Returns:

calc_boundary_cells_new(boundary_data)[source]

Class method which calculates constant boundary values at a specif constant x,y,z-coordinate

Parameters:

boundary_data – dictionary with the boundary direction (x,y, or z) and type (min or max)

Returns:

calc_cell_information(cache=0)[source]

Class method which calculates the geometrical properties of the grid

calc_cell_information_with_wells(well_locations, well_radii, cache=0)[source]

Class method which calculates the geometrical properties of the grid

calc_connections_all_cells(cache=0)[source]

Class methods which calculates the connection list for all cell types (matrix & fracture)

Return cell_m:

minus-side of the connection

Return cell_p:

plus-side of the connection

Return tran:

transmissibility value of connection

Return tran_thermal:

geometric coefficient of connection

check_fracture_data_input(data, data_name: str)[source]

Class method which checks the input data for fracture cells

Parameters:
  • data – scalar or vector with data

  • data_name – string which represents the data

Returns:

correct data object size

check_matrix_data_input(data, data_name: str)[source]

Class method which checks the input data for matrix cells

Parameters:
  • data – scalar or vector with data

  • data_name – string which represents the data

Returns:

correct data object size

load_mesh(cache=0)[source]

Class method which loads the mesh data of a specified file, using the module meshio module (third party).

load_mesh_with_wells(well_centers, well_radii, cache=0)[source]

Class method which reads msh file with meshio or reads mesh_data from cache

store_centroid_all_cells()[source]

Class method which loops over all the cells and stores the volume in single array (first frac, then mat) :return:

store_depth_all_cells()[source]

Class method which loops over all the cells and stores the depth in single array (first frac, then mat) :return:

store_volume_all_cells()[source]

Class method which loops over all the cells and stores the volume in single array (first frac, then mat) :return:

static write_conn2p_therm_to_file(cell_m, cell_p, tran, tranD, file_name)[source]

Static method which write a connection list to the specified file (for thermal application)

Parameters:
  • cell_m – negative residual contribution of cell block connections of interface

  • cell_p – positive residual contribution of cell block connections of interface

  • tran – transmissibility value of the interface

  • tranD – geometric coefficient of interface

  • file_name – file name where to write connection list

Returns:

static write_conn2p_to_file(cell_m, cell_p, tran, file_name)[source]

Static method which write a connection list to the specified file (for non-thermal application)

Parameters:
  • cell_m – negative residual contribution of cell block connections of interface

  • cell_p – positive residual contribution of cell block connections of interface

  • tran – transmissibility value of the interface

  • file_name – file name where to write connection list

Returns:

write_depth_to_file(file_name)[source]

Class method which loops over all the cells and writes the volume into a file (first frac, then mat) :return:

static write_property_to_file(data, key_word: str, file_name: str, num_cells: int)[source]

Static method which writes any specified property (in data) to any specified file

Parameters:
  • data – data object required to write to a file

  • key_word – keyword (usually read by other simulator)

  • file_name – name of the file where to write

  • num_cells – number of reservoir blocks

Returns:

write_to_vtk(output_directory, property_array, cell_property, ith_step)[source]

Class method which writes output of unstructured grid to VTK format

Parameters:
  • output_directory – directory of output files

  • property_array – np.array containing all cell properties (N_cells x N_prop)

  • cell_property – list with property names (visible in ParaView (format strings)

  • ith_step – integer containing the output step

Returns:

write_volume_to_file(file_name)[source]

Class method which loops over all the cells and writes the volume into a file (first frac, then mat) :return: