simpeg.electromagnetics.time_domain.Fields3DMagneticField#

class simpeg.electromagnetics.time_domain.Fields3DMagneticField(simulation)[source]#

Bases: FieldsTDEM

Fields class for storing 3D total magnetic field solutions.

This class stores the total magnetic field solution computed using a time_domain.Simulation3DElectricField simulation object. This class can be used to extract the following quantities:

  • 'h', 'b', 'dbdt' and 'dbdt' on mesh edges.

  • 'j' and 'e' on mesh faces.

  • 'charge' at cell centers.

See the example below to learn how fields can be extracted from a Fields3DMagneticField object.

Parameters:
simulationtime_domain.Simulation3DMagneticField

The TDEM simulation object associated with the fields.

Attributes

aliasFields

The aliased fields of the object.

approxSize

Approximate cost of storing all of the known fields in MB.

dtype

Python data type(s) used to store the fields.

knownFields

The field solutions and where they are discretized on the mesh.

mesh

Mesh used by the simulation.

simulation

The simulation object used to compute the field solution.

survey

Survey used by the simulation.

Methods

startup()

Run startup to connect the simulation's discrete attributes to the fields object.

Examples

The Fields3DMagneticField object stores the total magnetic field solution on mesh edges. To extract the discrete magnetic fields and current density for all sources and time-steps:

f = simulation.fields(m)
h = f[:, 'h', :]
j = f[:, 'j', :]

The array h returned will have shape (n_edges, n_sources, n_steps). And the array j returned will have shape (n_faces, n_sources, n_steps). We can also extract the fields for a subset of the sources and time-steps as follows:

f = simulation.fields(m)
h = f[source_list, 'e', t_inds]
j = f[source_list, 'j', t_inds]