MasterAnisotropyCartLLG

Calculates a residual contribution for the uniaxial magnetic anisotropy energy -K1 (m.n)^2 - K2 (m.n)^4 (K1 > 0: easy axis along n). The material property K2 is optional (taken as zero if no material provides it). Optional hard-axis term Kh (m.nh)^2 (Kh > 0: hard axis along nh; material properties Kh, nhx, nhy, nhz) in both routes; it has no |m|^2 part, so with nh perpendicular to n it leaves |m| = m_e in the domains of the LLB route.

Overview

Computes the residual and jacobian entries from the LLG equation due to a free energy density, , corresponding to uniaxial magnetocrystalline anisotropy,

where is the normalized magnetization, and are the anisotropy constants and is the (normalized) anisotropy director. This is the standard convention (as in OOMMF, MuMax3 and the MAG standard problems): gives an easy axis along , an easy plane normal to , and with an easy cone at . The material property K2 is optional and is taken as zero when no material provides it. Note that in the literature, it is typical to use but we reserve this within the MOOSE ecosystem for the surface normals of the finite element mesh.

warningwarning:Sign convention changed

Before October 2026 this kernel implemented , so input files written for earlier versions used for an easy axis. Such inputs must flip the sign of K1. The energy postprocessor MasterMagneticAnisotropyEnergy already used and is consistent with this kernel, including the term.

The effective field due to this term is, in index notation,

The LLG equation for the normalized magnetization, in the Landau-Lifshitz form used by all Master*CartLLG kernels, is

(1)

with the gyromagnetic ratio (g0) and the Gilbert damping. Multiplying by a test function and integrating over the volume, the kernel supplies the term

where is the Levi-Civita symbol and is not replaced by 1. Inserting the anisotropy field gives the residual contribution for ,

with the optional field scale (Hscale).

Hard axis and the Landau-Lifshitz-Bloch route

The optional hard-axis term (material properties Kh, nhx, nhy, nhz; makes hard) works in both routes and gives biaxial walls with a Walker breakdown.

With llb = true the kernel solves the LLB equation (Finite-temperature micromagnetics) with the transverse form of the energy, . It has the same torque as the usual form but does not shift away from in the domains. K1 is ; the material properties alpha_perp and alpha_par are required.

[Kernels<<<{"href": "../../syntax/Kernels/index.html"}>>>]
  [MasterAnisotropyCartLLG_x]
    type = MasterAnisotropyCartLLG<<<{"description": "Calculates a residual contribution for the uniaxial magnetic anisotropy energy -K1 (m.n)^2 - K2 (m.n)^4 (K1 > 0: easy axis along n). The material property K2 is optional (taken as zero if no material provides it). Optional hard-axis term Kh (m.nh)^2 (Kh > 0: hard axis along nh; material properties Kh, nhx, nhy, nhz) in both routes; it has no |m|^2 part, so with nh perpendicular to n it leaves |m| = m_e in the domains of the LLB route.", "href": "MasterAnisotropyCartLLG.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = mag_x
    component<<<{"description": "An integer corresponding to the direction in order parameter space this kernel acts in (e.g. for unrotated functionals 0 for q_x, 1 for q_y, 2 for q_z)."}>>> = 0
  []
[]
(test/tests/magnets/llb_biaxial_chi.i)

Example Input File Syntax

Input Parameters

  • componentAn integer corresponding to the direction in order parameter space this kernel acts in (e.g. for unrotated functionals 0 for q_x, 1 for q_y, 2 for q_z).

    C++ Type:unsigned int

    Controllable:No

    Description:An integer corresponding to the direction in order parameter space this kernel acts in (e.g. for unrotated functionals 0 for q_x, 1 for q_y, 2 for q_z).

  • mag_xThe x component of the constrained magnetic vector

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The x component of the constrained magnetic vector

  • mag_yThe y component of the constrained magnetic vector

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The y component of the constrained magnetic vector

  • mag_zThe z component of the constrained magnetic vector

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The z component of the constrained magnetic vector

  • variableThe name of the variable that this residual object operates on

    C++ Type:NonlinearVariableName

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of the variable that this residual object operates on

Required Parameters

  • Hscale1scaling factor for effective fields

    Default:1

    C++ Type:Real

    Unit:(no unit assumed)

    Controllable:No

    Description:scaling factor for effective fields

  • blockThe list of blocks (ids or names) that this object will be applied

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:The list of blocks (ids or names) that this object will be applied

  • displacementsThe displacements

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The displacements

  • g01electron gyromagnetic factor

    Default:1

    C++ Type:Real

    Unit:(no unit assumed)

    Controllable:No

    Description:electron gyromagnetic factor

  • llbFalseLandau-Lifshitz-Bloch route (m = M/Ms0, |m| free): transverse damping alpha_perp/|m|^2 and longitudinal damping alpha_par (material properties alpha_perp, alpha_par); alpha stays the coupling lambda in the g0/(1 + alpha^2) prefactor

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Landau-Lifshitz-Bloch route (m = M/Ms0, |m| free): transverse damping alpha_perp/|m|^2 and longitudinal damping alpha_par (material properties alpha_perp, alpha_par); alpha stays the coupling lambda in the g0/(1 + alpha^2) prefactor

  • llb_m2_eps1e-06Regularisation of 1/|m|^2 -> 1/(|m|^2 + llb_m2_eps) in the LLB damping terms; matters only where |m| ~ sqrt(llb_m2_eps), e.g. at the centre of a linear wall

    Default:1e-06

    C++ Type:Real

    Unit:(no unit assumed)

    Controllable:No

    Description:Regularisation of 1/|m|^2 -> 1/(|m|^2 + llb_m2_eps) in the LLB damping terms; matters only where |m| ~ sqrt(llb_m2_eps), e.g. at the centre of a linear wall

  • mu01permeability of the vacuum

    Default:1

    C++ Type:Real

    Unit:(no unit assumed)

    Controllable:No

    Description:permeability of the vacuum

Optional Parameters

  • absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution

  • extra_matrix_tagsThe extra tags for the matrices this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the matrices this Kernel should fill

  • extra_vector_tagsThe extra tags for the vectors this Kernel should fill

    C++ Type:std::vector<TagName>

    Controllable:No

    Description:The extra tags for the vectors this Kernel should fill

  • matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether this object is only doing assembly to matrices (no vectors)

  • matrix_tagssystemThe tag for the matrices this Kernel should fill

    Default:system

    C++ Type:MultiMooseEnum

    Options:nontime, system

    Controllable:No

    Description:The tag for the matrices this Kernel should fill

  • vector_tagsnontimeThe tag for the vectors this Kernel should fill

    Default:nontime

    C++ Type:MultiMooseEnum

    Options:nontime, time

    Controllable:No

    Description:The tag for the vectors this Kernel should fill

Contribution To Tagged Field Data Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

    C++ Type:std::vector<AuxVariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Determines whether this object is calculated using an implicit or explicit form

  • save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

    C++ Type:std::vector<AuxVariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)

  • search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).

    Default:nearest_node_connected_sides

    C++ Type:MooseEnum

    Options:nearest_node_connected_sides, all_proximate_sides

    Controllable:No

    Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).

  • seed0The seed for the master random number generator

    Default:0

    C++ Type:unsigned int

    Controllable:No

    Description:The seed for the master random number generator

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Material Property Retrieval Parameters

Input Files