simnibs.simulation.electric_dipole

simnibs.simulation.electric_dipole(mesh, cond, dipole_positions, dipole_moments, source_model, solver_options=None, units='mm')

Electric dipole simulations using the partial integration method

Parameters:
  • mesh (simnibs.mesh_io.Msh) – Mesh file with geometry information

  • cond (simnibs.msh.mesh_io.ElementData) – An ElementData field with conductivity information

  • dipole_positions (Nx3 ndarray) – Positions of the dipoles. Each dipole will be a separate simulation

  • dipole_moments (Nx3 ndarray) – Moment of each dipole in ampere-meter (Am).

  • source_model (str) – Source model to use (partial integration, st. venant).

  • solver_options (str (optional)) – Options for the sparse solver. Default: CG + AMG

Returns:

v – Electric potential caused by each dipole

Return type:

np.ndarray of size Nxmesh.nodes.nr