get_domain

emg3d.meshes.get_domain(x0=0, freq=1, res=0.3, limits=None, min_width=None, fact_min=0.2, fact_neg=5, fact_pos=None)[source]

Get domain extent and minimum cell width as a function of skin depth.

Returns the extent of the computation domain and the minimum cell width as a multiple of the skin depth, with possible user restrictions on minimum computation domain and range of possible minimum cell widths.

\[\begin{split}\delta &= 503.3 \sqrt{\frac{\rho}{f}} , \\ x_\text{start} &= x_0-k_\text{neg}\delta , \\ x_\text{end} &= x_0+k_\text{pos}\delta , \\ h_\text{min} &= k_\text{min} \delta .\end{split}\]
Parameters:
x0 : float

Center of the computation domain. Normally the source location. Default is 0.

freq : float

Frequency (Hz) to compute the skin depth. The skin depth is a concept defined in the frequency domain. If a negative frequency is provided, it is assumed that the computation is carried out in the Laplace domain. To compute the skin depth, the value of freq is then multiplied by \(-2\pi\), to simulate the closest frequency-equivalent.

Default is 1 Hz.

res : float, optional

Resistivity (Ohm m) to compute skin depth. Default is 0.3 Ohm m (sea water).

limits : None or list

[start, end] of model domain. This extent represents the minimum extent of the domain. The domain is therefore only adjusted if it has to reach outside of [start, end]. Default is None.

min_width : None, float, or list of two floats

Minimum cell width is computed as a function of skin depth: fact_min*sd. If min_width is a float, this is used. If a list of two values [min, max] are provided, they are used to restrain min_width. Default is None.

fact_min, fact_neg, fact_pos : floats

The skin depth is multiplied with these factors to estimate:

  • Minimum cell width (fact_min, default 0.2)
  • Domain-start (fact_neg, default 5), and
  • Domain-end (fact_pos, defaults to fact_neg).
Returns:
h_min : float

Minimum cell width.

domain : list

Start- and end-points of computation domain.