Utilities Module

pygfunction.utilities.cardinal_point(direction)
pygfunction.utilities.erfint(x)

Integral of the error function.

Parameters:
xfloat or array

Argument.

Returns:
float or array

Integral of the error function.

pygfunction.utilities.exp1(x)

Exponential integral E1.

Parameters:
xfloat or array

Argument.

Returns:
E1float or array

Exponential integral.

References

pygfunction.utilities.segment_ratios(nSegments, end_length_ratio=0.02)

Discretize a borehole into segments of different lengths using a geometrically expanding mesh from the provided end-length-ratio towards the middle of the borehole. Eskilson (1987) [2] proposed that segment lengths increase with a factor of sqrt(2) towards the middle of the borehole. Here, the expansion factor is inferred from the provided number of segments and end-length-ratio.

Parameters:
nSegmentsint

Number of line segments along the borehole.

end_length_ratio: float, optional

The ratio of the height of the borehole that accounts for the end segment lengths. Default is 0.02.

Returns:
segment_ratiosarray

The segment ratios along the borehole, from top to bottom.

References

Examples

>>> gt.utilities.segment_ratios(5)
array([0.02, 0.12, 0.72, 0.12, 0.02])
pygfunction.utilities.time_ClaessonJaved(dt, tmax, cells_per_level=5)

Build a time vector of expanding cell width following the method of Claesson and Javed [3].

Parameters:
dtfloat

Simulation time step (in seconds).

tmaxfloat

Maximum simulation time (in seconds).

cells_per_levelint, optional

Number of time steps cells per level. Cell widths double every cells_per_level cells. Default is 5.

Returns:
timearray

Time vector.

References

Examples

>>> time = gt.utilities.time_ClaessonJaved(3600., 12*3600.)
array([3600.0, 7200.0, 10800.0, 14400.0, 18000.0, 25200.0, 32400.0,
       39600.0, 46800.0])
pygfunction.utilities.time_MarcottePasquier(dt, tmax, non_expanding_cells=48)

Build a time vector of expanding cell width following the method of Marcotte and Pasquier [4].

Parameters:
dtfloat

Simulation time step (in seconds).

tmaxfloat

Maximum simulation time (in seconds).

non_expanding_cellsint, optional

Number of cells before geomteric expansion starts. Default is 48.

Returns:
timearray

Time vector.

References

Examples

>>> time = gt.utilities.time_MarcottePasquier(3600., 13*3600.,
                                              non_expanding_cells=6)
array([3600., 7200., 10800., 14400., 18000., 21600., 28800., 43200.,
       72000.])
pygfunction.utilities.time_geometric(dt, tmax, Nt)

Build a time vector of geometrically expanding cell width.

Parameters:
dtfloat

Simulation time step (in seconds).

tmaxfloat

Maximum simulation time (in seconds).

Ntint

Total number of time steps.

Returns:
timearray

Time vector.

Examples

>>> time = gt.utilities.time_geometric(3600., 13*3600., 5)
array([3600., 8971.99474335, 16988.19683297, 28950.14002383, 46800.])