Ferromagnet#

class Ferromagnet#

Bases: Magnet

Create a ferromagnet instance.

__init__(world, grid, name='', geometry=None, regions=None)#
Parameters:
  • world (World) – World in which the ferromagnet lives.

  • grid (Grid) – The number of cells in x, y, z the ferromagnet should be divided into.

  • geometry (None, ndarray, or callable (default=None)) –

    The geometry of the ferromagnet can be set in three ways.

    1. If the geometry contains all cells in the grid, then use None (the default)

    2. Use an ndarray which specifies for each cell wheter or not it is in the geometry.

    3. Use a function which takes x, y, and z coordinates as arguments and returns true if this position is inside the geometry and false otherwise.

  • regions (None, ndarray, or callable (default=None)) –

    The regional structure of a ferromagnet can be set in the same three ways as the geometry. This parameter indexes each grid cell to a certain region.

    Note

    The values of InterParameters which act between different regions are stored in an array with a size that scales with the square of the maximal index value. Therefore, if possible, it’s good practice to keep each region index as close to zero as possible. E.g. defining two regions with indices 1 and 500 will work, but occupies more memory and will pay in performance than giving them the values 0 and 1.

  • name (str (default="")) – The ferromagnet’s identifier. If the name is empty (the default), a name for the ferromagnet will be created.

property magnetization: Variable#

Direction of the magnetization (normalized).

property is_sublattice: bool#

Returns True if the ferromagnet is a sublattice of a host magnet.

property enable_demag: bool#

Enable/disable demagnetization switch.

Default = True.

property enable_openbc: bool#

Enable/disable open boundary conditions.

When set to False (default), Neumann boundary conditions are applied. These affect the calculation of DMI and exchange field terms.

property enable_zhang_li_torque: bool#

Enable/disable Zhang-Li spin transfer torque.

Default = True.

property enable_slonczewski_torque: bool#

Enable/disable Slonczewski spin transfer torue.

Default = True.

property bias_magnetic_field: Parameter#

Uniform bias magnetic field which will affect a ferromagnet.

The value should be specifed in Teslas.

minimize(tol=1e-06, nsamples=10)#

Minimize the total energy.

Fast energy minimization, but less robust than relax() when starting from a high energy state.

Parameters:
  • tol (int / float (default=1e-6)) – The maximum allowed difference between consecutive magnetization evaluations when advancing toward an energy minimum.

  • nsamples (int (default=10)) – The number of consecutive magnetization evaluations that must not differ by more than the tolerance “tol”.

See also

relax

relax(tol=1e-09)#

Relax the state to an energy minimum.

The system evolves in time without precession (pure damping) until the total energy hits the noise floor. Hereafter, relaxation keeps on going until the maximum torque is minimized.

Compared to minimize(), this function takes a longer time to execute, but is more robust when starting from a high energy state (i.e. random).

Parameters:

tol (float, default=1e-9) – The lowest maximum error of the timesolver.

property RelaxTorqueThreshold: float#

Threshold torque used for relaxing the system (default = -1).

If set to a negative value (default behaviour), the system relaxes until the torque is steady or increasing.

If set to a positive value, the system relaxes until the torque is smaller than or equal to this threshold.

See also

relax

property msat: Parameter#

Saturation magnetization (A/m).

Default = 1.0 A/m

property alpha: Parameter#

LLG damping parameter.

property aex: Parameter#

Exchange constant (J/m).

property inter_exchange: InterParameter#

Exchange constant (J/m) between different regions. If set to zero (default), then the harmonic mean of the exchange constants of the two regions are used.

When no exchange interaction between different regions is wanted, set scale_exchange to zero.

This parameter should be set with

>>> magnet.inter_exchange.set_between(region1, region2, value)
>>> magnet.inter_exchange = value # uniform value

See also

aex, scale_exchange

property scale_exchange: InterParameter#

Scaling of the exchange constant between different regions.

This parameter can be set with

>>> magnet.scale_exchange.set_between(region1, region2, value)
>>> magnet.scale_exchange = value # uniform value

See also

aex, inter_exchange

property ku1: Parameter#

Uniaxial anisotropy parameter Ku1 (J/m³).

See also

ku2, anisU

property ku2: Parameter#

Uniaxial anisotropy parameter Ku2 (J/m³).

See also

ku1, anisU

property anisU: Parameter#

Uniaxial anisotropy direction (the easy axis).

See also

ku1, ku2

property kc1: Parameter#

Cubic anisotropy parameter Kc1 (J/m³).

See also

kc2, kc3, anisC1, anisC2

property kc2: Parameter#

Cubic anisotropy parameter Kc2 (J/m³).

See also

kc1, kc3, anisC1, anisC2

property kc3: Parameter#

Cubic anisotropy parameter Kc3 (J/m³).

See also

kc1, kc2, anisC1, anisC2

property anisC1: Parameter#

First cubic anisotropy direction.

See also

kc1, kc2, kc3, anisC2

property anisC2: Parameter#

Second cubic anisotropy direction.

See also

kc1, kc2, kc3, anisC1

property Lambda: Parameter#

Slonczewski Λ parameter.

property free_layer_thickness: Parameter#

Slonczewski free layer thickness (m). If set to zero (default), then the thickness will be deduced from the mesh size.

property fixed_layer_on_top: bool#

The position of the fixed layer. If set to True (default), then the layer will be at the top. Otherwise it will be at the bottom.

property epsilon_prime: Parameter#

Slonczewski secondary STT term ε’.

property fixed_layer: Parameter#

Slonczewski fixed layer polarization.

property xi: Parameter#

Non-adiabaticity of the Zhang-Li spin-transfer torque.

See also

jcur, pol

property pol: Parameter#

Electrical current polarization.

property jcur: Parameter#

Electrical current density (A/m²).

property temperature: Parameter#

Temperature (K).

See also

thermal_noise

property dmi_tensor: DmiTensor#

Get the DMI tensor of this Ferromagnet.

See also

DmiTensor

Returns:

The DMI tensor of this ferromagnet.

Return type:

DmiTensor

property applied_potential: Parameter#

The applied electrical potential (V).

Cells with Nan values do not have an applied potential.

property conductivity: Parameter#

Conductivity without considering anisotropic magneto resistance (S/m).

property amr_ratio: Parameter#

Anisotropic magneto resistance ratio.

property frozen_spins: Parameter#

Defines spins that should be fixed by setting torque to (0, 0, 0) wherever frozen_spins is not 0.

property B1: Parameter#

First magnetoelastic coupling constant (J/m³).

See also

B2

property B2: Parameter#

Second magnetoelastic coupling constant (J/m³).

See also

B1

property poisson_system: PoissonSystem#

Get the poisson solver which computes the electric potential.

property torque: FieldQuantity#

Total torque on the magnetization (rad/s).

property llg_torque: FieldQuantity#

Torque on the magnetization exerted by the total effective field (rad/s).

property damping_torque: FieldQuantity#

Torque used by the relax function (rad/s). This is the term in the Landau-Liftshitz-Gilbert torque with the damping factor α.

See also

relax, llg_torque, alpha

property spin_transfer_torque: FieldQuantity#

Spin transfer torque exerted on the magnetization (rad/s).

property max_torque: ScalarQuantity#

The maximum value of the torque over all cells (rad/s).

property demag_energy_density: FieldQuantity#

Energy density related to the demag field (J/m³).

property demag_energy: ScalarQuantity#

Energy related to the demag field (J).

property anisotropy_field: FieldQuantity#

Anisotropic effective field term (T).

property anisotropy_energy_density: FieldQuantity#

Energy density related to the magnetic anisotropy (J/m³).

property anisotropy_energy: ScalarQuantity#

Energy related to the magnetic anisotropy (J).

property exchange_field: FieldQuantity#

Effective field of the exchange interaction (T).

property exchange_energy_density: FieldQuantity#

Energy density related to the exchange interaction (J/m³).

property exchange_energy: ScalarQuantity#

Energy related to the exchange interaction (J).

property max_angle: ScalarQuantity#

Maximal angle difference of the magnetization between exchange coupled cells (rad).

property dmi_field: FieldQuantity#

Effective field of the Dzyaloshinskii-Moriya interaction (T).

Returns a FieldQuantity which evaluates the effective field corresponding to the DMI energy density.

Returns:

dmi_field

Return type:

mumaxplus.FieldQuantity

property dmi_energy_density: FieldQuantity#

Energy density related to the Dzyaloshinskii-Moriya interaction (J/m³).

Returns a FieldQuantity which evaluates the Dzyaloshinskii-Moriya energy density:

\[\varepsilon_{\text{DMI}} = \frac{1}{2} D_{ijk} \left[ m_j \frac{d}{dx_i} m_k - m_k \frac{d}{dx_i} m_j \right]\]
Returns:

dmi_energy_density

Return type:

mumaxplus.FieldQuantity

property dmi_energy: ScalarQuantity#

Energy related to the Dzyaloshinskii-Moriya interaction (J).

Returns:

dmi_energy_density

Return type:

ScalarQuantity

property external_field: FieldQuantity#

Sum of external fields (T).

property zeeman_energy_density: FieldQuantity#

Energy density related to external fields (J/m³).

property zeeman_energy: ScalarQuantity#

Energy related to external fields (J).

property effective_field: FieldQuantity#

Sum of all effective field terms (T).

property total_energy_density#

Energy density related to the total effective field (J/m³).

See also

total_energy

property total_energy: ScalarQuantity#

Energy related to the total effective field (J).

property electrical_potential: FieldQuantity#

Electrical potential (V).

Calculates the electrical potential with a Poisson solver, using the applied_potential and conductivity(_tensor).

property conductivity_tensor: FieldQuantity#

Conductivity tensor taking into account AMR (S/m).

This quantity has six components (Cxx, Cyy, Czz, Cxy, Cxz, Cyz) which forms the symmetric conductivity tensor:

\[\begin{split}\begin{bmatrix} Cxx & Cxy & Cxz \\ Cxy & Cyy & Cyz \\ Cxz & Cyz & Czz \end{bmatrix}\end{split}\]
property thermal_noise: FieldQuantity#

Thermal noise on the magnetization.

See also

temperature

property full_magnetization: FieldQuantity#

Unnormalized magnetization (A/m).

See also

magnetization, msat

property inhomogeneous_exchange_field: FieldQuantity#

Effective field of the inhomogeneous exchange interaction (T). This field is related to the antiferromagnetic exchange interaction between neighbouring cells.

property homogeneous_exchange_field: FieldQuantity#

Effective field of the homogeneous exchange interaction (T). This field is related to the antiferromagnetic exchange interaction between spins in a single simulation cell.

property inhomogeneous_exchange_energy_density: FieldQuantity#

Energy density related to the inhomogeneous exchange interaction (J/m³). This energy density is related to the antiferromagnetic exchange interaction between neighbouring cells.

property homogeneous_exchange_energy_density: FieldQuantity#

Energy density related to the homogeneous exchange interaction (J/m³). This energy density is related to the antiferromagnetic exchange interaction between spins in a single simulation cell.

property inhomogeneous_exchange_energy: ScalarQuantity#

Energy related to the inhomogeneous exchange interaction (J). This energy is related to the antiferromagnetic exchange interaction between neighbouring cells.

property homogeneous_exchange_energy: ScalarQuantity#

Energy related to the homogeneous exchange interaction (J). This energy is related to the antiferromagnetic exchange interaction between spins in a single simulation cell.

property homogeneous_dmi_field#

Effective field of the homogeneous DMI (T).

property homogeneous_dmi_energy_density#

Energy density related to the homogeneous DMI (J/m³).

property homogeneous_dmi_energy#

Energy related to the homogeneous DMI (J).

property magnetoelastic_field: FieldQuantity#

Magnetoelastic effective field due to effects of inverse magnetostriction (T).

property magnetoelastic_energy_density: FieldQuantity#

Energy density related to magnetoelastic field (J/m³).

property magnetoelastic_energy: ScalarQuantity#

Energy related to magnetoelastic field (J).

property magnetoelastic_force: FieldQuantity#

Magnetoelastic body force density due to magnetostriction effect (N/m³).