Antiferromagnet#
- class Antiferromagnet#
Bases:
Magnet
Create an antiferromagnet instance.
- __init__(world, grid, name='', geometry=None, regions=None)#
This class can also be used to create a Ferrimagnet instance since both sublattices are independently modifiable.
- Parameters:
world (World) – World in which the antiferromagnet lives.
grid (Grid) – The number of cells in x, y, z the antiferromagnet should be divided into.
geometry (None, ndarray, or callable (default=None)) –
The geometry of the antiferromagnet 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 whether 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 an antiferromagnet can be set in the same three ways as the geometry. This parameter indexes each grid cell to a certain region.
name (str (default="")) – The antiferromagnet’s identifier. If the name is empty (the default), a name for the antiferromagnet will be created.
- property sub1: Ferromagnet#
First sublattice instance.
- property sub2: Ferromagnet#
Second sublattice instance.
- property sublattices: tuple[Ferromagnet]#
Both sublattice instances
- other_sublattice(sub)#
Returns sister sublattice of given sublattice.
- Parameters:
sub (Ferromagnet)
- Return type:
- property bias_magnetic_field: Parameter#
Uniform bias magnetic field which will affect an antiferromagnet.
The value should be specifed in Teslas.
- property enable_demag: bool#
Enable/disable demagnetization switch of both sublattices.
Default = True.
- minimize(tol=1e-06, nsamples=20)#
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=20)) – 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 (i.e. the sum of sublattices) 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 afmex_cell: Parameter#
Intracell antiferromagnetic exchange constant (J/m). This parameter plays the role of exchange constant of the antiferromagnetic homogeneous exchange interaction in a single simulation cell.
- property afmex_nn: Parameter#
Intercell antiferromagnetic exchange constant (J/m). This parameter plays the role of exchange constant of the antiferromagnetic inhomogeneous exchange interaction between neighbouring simulation cells.
See also
- property inter_afmex_nn: InterParameter#
Interregional antiferromagnetic exchange constant (J/m). 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_afmex_nn to zero.
This parameter should be set with
>>> magnet.inter_afmex_nn.set_between(region1, region2, value)
- property scale_afmex_nn: InterParameter#
Scaling of the antiferromagnetic exchange constant between different regions. This factor is multiplied by the harmonic mean of the exchange constants of the two regions.
If inter_afmex_nn is set to a non-zero value, then this overrides scale_afmex_nn, i.e. scale_afmex_nn is automatically set to zero when inter_afmex_nn is not.
This parameter should be set with
>>> magnet.scale_afmex_nn.set_between(region1, region2, value)
- property latcon: Parameter#
Lattice constant (m).
Physical lattice constant of the Antiferromagnet. This doesn’t break the micromagnetic character of the simulation package, but is only used to calculate the homogeneous exchange field, i.e. the antiferromagnetic exchange interaction between spins at the same site.
Default = 0.35 nm.
See also
- property dmi_tensor: DmiTensor#
Get the DMI tensor of this Antiferromagnet. This tensor describes intersublattice DMI exchange.
Note that individual sublattices can have their own tensor to describe intrasublattice DMI exchange.
- Returns:
The DMI tensor of this Antiferromagnet.
- Return type:
See also
- property dmi_tensors: DmiTensorGroup#
Returns the DMI tensor of self, self.sub1 and self.sub2.
This group can be used to set the intersublattice and both intrasublattice DMI tensors at the same time.
For example, to set interfacial DMI in the whole system to the same value, one could use
>>> magnet = Antiferromagnet(world, grid) >>> magnet.dmi_tensors.set_interfacial_dmi(1e-3)
Or to set an individual tensor element, one could use
>>> magnet.dmi_tensors.xxy = 1e-3
See also
- property dmi_vector#
- DMI vector D (J/m³) associated with the homogeneous DMI (in a single simulation cell),
defined by the energy density ε = D . (m1 x m2) with m1 and m2 being the sublattice magnetizations.
See also
- property neel_vector: FieldQuantity#
Weighted dimensionless Neel vector of an antiferromagnet/ferrimagnet. (msat1*m1 - msat2*m2) / (msat1 + msat2)
- property full_magnetization: FieldQuantity#
Full antiferromagnetic magnetization M1 + M2 (A/m).
See also
- property angle_field: FieldQuantity#
Returns the deviation from the optimal angle (180°) between magnetization vectors in the same cell which are coupled by the intracell exchange interaction (rad).
See also
- property max_intracell_angle: ScalarQuantity#
The maximal deviation from 180° between AFM-exchange coupled magnetization vectors in the same simulation cell (rad).
See also
- property total_energy_density: FieldQuantity#
Total energy density of both sublattices combined (J/m³). Kinetic and elastic energy densities of the antiferromagnet are also included if elastodynamics is enabled.
- property total_energy: ScalarQuantity#
Total energy of both sublattices combined (J). Kinetic and elastic energies of the antiferromagnet are also included if elastodynamics is enabled.