Skip to content

Magnetism

The Magnetism module group adds a magnetic-field and magnetic-energy contribution on top of the phase-field state. It ships two pieces: a property class (MagneticProperties) that holds per-phase susceptibility data and an applied field with a linear gradient, and a solver (LinearMagneticSolver) that solves for the perturbed field inside a heterogeneous susceptibility distribution and adds the magnetic driving force to phase-field evolution.

Key Classes and Concepts

  • MagneticProperties: storage for the applied field H0, its 3×3 gradient tensor H0i/xj, and the per-phase susceptibility χα.
  • LinearMagneticSolver: computes the perturbed magnetic field and the resulting contribution to the phase-field driving force.

Models

Constitutive relation

For a linear magnetic medium the magnetisation follows the susceptibility:

(1)M(x)=χ(ϕ(x))H(x),χ(ϕ)=αϕαχα.

Applied field

A uniform field plus a linear spatial gradient:

(2)Happlied(x)=H0+(H0)x,

with H0=(H0x,H0y,H0z) and the nine gradient components H0i/xj all read individually.

Usage

Input

Placed in the @LinearMagneticSolver block:

text
@LinearMagneticSolver

$H0X   Applied field X component                    : 1.0
$H0Y   Applied field Y component                    : 0.0
$H0Z   Applied field Z component                    : 0.0

$H0XX  Gradient dHx/dx                              : 0.0
$H0YX  Gradient dHy/dx                              : 0.0
$H0ZX  Gradient dHz/dx                              : 0.0
$H0XY  Gradient dHx/dy                              : 0.0
$H0YY  Gradient dHy/dy                              : 0.0
$H0ZY  Gradient dHz/dy                              : 0.0
$H0XZ  Gradient dHx/dz                              : 0.0
$H0YZ  Gradient dHy/dz                              : 0.0
$H0ZZ  Gradient dHz/dz                              : 0.0

$chi_0 Susceptibility of phase 0                    : 1.0e-5
$chi_1 Susceptibility of phase 1                    : 5.0e-5

Every $H0* value defaults to 0.0. The $chi_<n> keys are read for each active phase.

Output

Fields written via LinearMagneticSolver::WriteVTK — consult the header for the exact field names. The driving force contribution is applied through the shared DrivingForce object.

Example

Cross-reference an example under OpenPhase-main/examples/ that constructs LinearMagneticSolver. If none is present in your release, the minimum call pattern is:

cpp
LinearMagneticSolver LMS(OPSettings, InputFile);

// In the time loop, after phase-field increments are computed:
LMS.Solve(Phi, BC);

Dependencies

Released under the GNU GPLv3 License.