System#

class micromagneticmodel.System(name, energy=0, dynamics=0, m=None, T=0)#

System class.

This class is used for defining a micromagnetic system. In order to uniquely define a micromagnetic system, the following parameters can be provided:

  • Energy equation (system.energy)

  • Dynamics equation (system.dynamics)

  • Magnetisation field (system.m)

  • Temperature (system.T)

  • Name (system.name)

Parameters:
  • energy (micromagneticmodel.Energy, optional) – Energy equation. Defaults to 0.

  • dynamics (micromagneticmodel.Dynamics, optional) – Dynamics equation. Defaults to 0.

  • m (disretisedfield.Field, optional) – Magnetisation field. Defaults to None.

  • T (numbers.Real) – Temperature. Defaults to 0.

  • name (str, optional) – Name of the system. Defaults to 'unnamed'.

Examples

  1. Defining a system.

>>> import micromagneticmodel as mm
>>> import discretisedfield as df
...
>>> p1 = (0, 0, 0)
>>> p2 = (10e-9, 10e-9, 10e-9)
>>> n = (5, 5, 5)
>>> region = df.Region(p1=p1, p2=p2)
>>> mesh = df.Mesh(region=region, n=n)
>>> m = df.Field(mesh, nvdim=3, value=(0, 0, 1), norm=1e6)
>>> energy = mm.Exchange(A=1e-11) + mm.Demag()
>>> dynamics = mm.Precession(gamma0=mm.consts.gamma0) +             mm.Damping(alpha=0.1)
>>> T = 0
>>> name = 'my_cool_system'
>>> system = mm.System(energy=energy,
...                    dynamics=dynamics,
...                    m=m,
...                    T=T,
...                    name=name)

Methods

__dir__

Default dir() implementation.

__eq__

Return self==value.

__repr__

Representation string.

Properties

T

Descriptor allowing setting attributes only with scalars (numbers.Real).

dynamics

Dynamics equation of the system.

energy

Energy equation of the system.

m

Descriptor allowing setting attributes only with values of a certain type.

name

Python identifier descriptor.


__repr__()#

Representation string.

Returns:

Representation string.

Return type:

str

Examples

  1. Getting representation string.

>>> import micromagneticmodel as mm
...
>>> system = mm.System(name='my_cool_system')
>>> repr(system)
"System(name='my_cool_system')"
property dynamics#

Dynamics equation of the system.

Parameters:

value (micromagneticmodel.Dynamics, micromagneticmodel.DynamicsTerm) – Dynamics container/term of the system.

Returns:

Dynamics container of the system.

Return type:

micromagneticmodel.Dynamics

Examples

  1. System’s dynamics equation.

>>> import micromagneticmodel as mm
...
>>> system = mm.System(name='my_cool_system')
>>> repr(system.dynamics)  # energy not set yet
'Dynamics()'
>>> system.dynamics = mm.Damping(alpha=0.001)
>>> repr(system.dynamics)
'Damping(alpha=0.001)'
>>> system.dynamics += mm.Precession(gamma0=2.21e5)
>>> repr(system.dynamics)
'Damping(alpha=0.001) + Precession(gamma0=221000.0)'

See also

energy()

property energy#

Energy equation of the system.

Parameters:

value (micromagneticmodel.Energy, micromagneticmodel.EnergyTerm) – Energy container/term of the system.

Returns:

Energy container of the system.

Return type:

micromagneticmodel.Energy

Examples

  1. System’s energy equation.

>>> import micromagneticmodel as mm
...
>>> system = mm.System(name='my_cool_system')
>>> repr(system.energy)  # energy not set yet
'Energy()'
>>> system.energy = mm.Exchange(A=1e-12)
>>> repr(system.energy)
'Exchange(A=1e-12)'
>>> system.energy += mm.Demag()
>>> repr(system.energy)
'Exchange(A=1e-12) + Demag()'

See also

dynamics()