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, its gradient tensor , 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:
Applied field
A uniform field plus a linear spatial gradient:
with
Usage
Input
Placed in the @LinearMagneticSolver block:
@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-5Every $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:
LinearMagneticSolver LMS(OPSettings, InputFile);
// In the time loop, after phase-field increments are computed:
LMS.Solve(Phi, BC);Dependencies
- PhaseField — supplies
for the mixture rule. - BoundaryConditions.
- Settings, DrivingForce.