Skip to content

SimGridRegular API Reference

geoloop.axisym.AxisymetricEL.SimGridRegular

A regular 3D grid for simulation.

This class sets up a grid with nx cells in x, ny cells in y, and nz cells in z. It can handle transmissivity and fluxes in x, y, z directions, volumetric specific heat of fluid and rock, and heat production.

__init__

__init__(
    nx: int,
    ny: int,
    nz: int,
    txyz: ndarray,
    fxyz: ndarray,
    rcf: float,
    rcbulk: float,
    axyz: ndarray,
)

Constructor for SimGridRegular.

Parameters:

Name Type Description Default
nx int

Number of grid cells in x-direction.

required
ny int

Number of grid cells in y-direction.

required
nz int

Number of grid cells in z-direction.

required
txyz ndarray

Transmissivity array in x, y, z directions (shape: 3 x nx x ny x nz).

required
fxyz ndarray

Flux array in x, y, z directions (shape: 3 x nx x ny x nz).

required
rcf float

Fluid volumetric specific heat [J m^-3 K^-1].

required
rcbulk float

Bulk volumetric specific heat [J m^-3 K^-1].

required
axyz ndarray

Heat production integrated over cell volume [W].

required

set_initvalues

set_initvalues(temp: ndarray) -> None

Set the initial values of the grid.

Parameters:

Name Type Description Default
temp ndarray

Initial values to assign to the grid.

required

checkindex

checkindex(ii: int, jj: int, kk: int) -> bool

Check if the given indices are within the grid bounds.

Parameters:

Name Type Description Default
ii int

Index along x-axis.

required
jj int

Index along y-axis.

required
kk int

Index along z-axis.

required

Returns:

Type Description
bool

True if the indices are within bounds, False otherwise.

clearDirichlet

clearDirichlet() -> None

Reset Dirichlet boundary conditions.

All nodes are set to have no fixed (Dirichlet) boundary condition.

addDirichlet

addDirichlet(
    indexlist: list[list[int]], value: float
) -> None

Apply Dirichlet boundary conditions to specified cells.

Adds a list of cell indices as dirichlet boundary conditions with the value specified.

Parameters:

Name Type Description Default
indexlist list of list of int

List of cell indices, each as [i, j, k]. ([ [i,j,k], [i,j,k], ..])

required
value float

Value to apply to the specified cells.

required