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.
If the geometry contains all cells in the grid, then use None (the default)
Use an ndarray which specifies for each cell wheter or not it is in the geometry.
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 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.
See also
- property enable_slonczewski_torque: bool#
Enable/disable Slonczewski spin transfer torue.
Default = True.
See also
- 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(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.
See also
- 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
- 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
- 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
- property Lambda: Parameter#
Slonczewski Λ parameter.
See also
epsilon_prime
,jcur
,pol
,fixed_layer
,fixed_layer_on_top
,free_layer_thickness
- 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.
See also
epsilon_prime
,jcur
,Lambda
,pol
,fixed_layer
,fixed_layer_on_top
- 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.
See also
epsilon_prime
,jcur
,Lambda
,pol
,fixed_layer
,free_layer_thickness
- property epsilon_prime: Parameter#
Slonczewski secondary STT term ε’.
See also
jcur
,Lambda
,pol
,fixed_layer
,fixed_layer_on_top
,free_layer_thickness
- property fixed_layer: Parameter#
Slonczewski fixed layer polarization.
See also
epsilon_prime
,jcur
,Lambda
,pol
,fixed_layer_on_top
,free_layer_thickness
- property pol: Parameter#
Electrical current polarization.
See also
epsilon_prime
,jcur
,Lambda
,fixed_layer
,fixed_layer_on_top
,free_layer_thickness
,xi
- property jcur: Parameter#
Electrical current density (A/m²).
See also
epsilon_prime
,Lambda
,pol
,fixed_layer
,fixed_layer_on_top
,free_layer_thickness
,xi
- property dmi_tensor: DmiTensor#
Get the DMI tensor of this Ferromagnet.
See also
- Returns:
The DMI tensor of this ferromagnet.
- Return type:
- property applied_potential: Parameter#
The applied electrical potential (V).
Cells with Nan values do not have an applied potential.
See also
- property conductivity: Parameter#
Conductivity without considering anisotropic magneto resistance (S/m).
- property frozen_spins: Parameter#
Defines spins that should be fixed by setting torque to (0, 0, 0) wherever frozen_spins is not 0.
- 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
- 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³).
See also
- property demag_energy: ScalarQuantity#
Energy related to the demag field (J).
See also
- property anisotropy_field: FieldQuantity#
Anisotropic effective field term (T).
See also
- property anisotropy_energy_density: FieldQuantity#
Energy density related to the magnetic anisotropy (J/m³).
See also
- property anisotropy_energy: ScalarQuantity#
Energy related to the magnetic anisotropy (J).
See also
- property exchange_field: FieldQuantity#
Effective field of the exchange interaction (T).
See also
- property exchange_energy_density: FieldQuantity#
Energy density related to the exchange interaction (J/m³).
See also
- property exchange_energy: ScalarQuantity#
Energy related to the exchange interaction (J).
See also
- 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:
See also
- 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:
See also
- property dmi_energy: ScalarQuantity#
Energy related to the Dzyaloshinskii-Moriya interaction (J).
- Returns:
dmi_energy_density
- Return type:
See also
- property external_field: FieldQuantity#
Sum of external fields (T).
See also
- property zeeman_energy_density: FieldQuantity#
Energy density related to external fields (J/m³).
See also
- property zeeman_energy: ScalarQuantity#
Energy related to external fields (J).
See also
- 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
- property total_energy: ScalarQuantity#
Energy related to the total effective field (J).
See also
- 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}\]See also
- property thermal_noise: FieldQuantity#
Thermal noise on the magnetization.
See also
- property full_magnetization: FieldQuantity#
Unnormalized magnetization (A/m).
See also
- 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³).
See also
- property magnetoelastic_energy: ScalarQuantity#
Energy related to magnetoelastic field (J).
- property magnetoelastic_force: FieldQuantity#
Magnetoelastic body force density due to magnetostriction effect (N/m³).
See also