Linear Magnetic Solver
LinearMagneticSolver computes the perturbed magnetic field inside a heterogeneous susceptibility distribution, given an applied field
Key Classes and Concepts
LinearMagneticSolver : public OPObject: the field solver and driving-force publisher.
Usage
Input
Defined in the @LinearMagneticSolver block.
text
@LinearMagneticSolver
# Applied uniform field (A/m) {#applied-uniform-field-am}
$H0X Applied field X component : 1.0
$H0Y Applied field Y component : 0.0
$H0Z Applied field Z component : 0.0
# Linear gradient ∂H_i / ∂x_j (row = i, column = j) {#linear-gradient-h_i-x_j-row-i-column-j}
$H0XX ∂Hx/∂x : 0.0
$H0YX ∂Hy/∂x : 0.0
$H0ZX ∂Hz/∂x : 0.0
$H0XY ∂Hx/∂y : 0.0
$H0YY ∂Hy/∂y : 0.0
$H0ZY ∂Hz/∂y : 0.0
$H0XZ ∂Hx/∂z : 0.0
$H0YZ ∂Hy/∂z : 0.0
$H0ZZ ∂Hz/∂z : 0.0
# Per-phase susceptibility {#per-phase-susceptibility}
$chi_0 Susceptibility of phase 0 : 1.0e-5
$chi_1 Susceptibility of phase 1 : 5.0e-5Every $H0* token defaults to 0.0. $chi_<n> must be supplied for each active phase.
Output
- VTK: the solver writes the applied-field, perturbed-field, and magnetisation fields through
WriteVTK(consult the header for the exact names). - The magnetic driving force is added to the shared
DrivingForceobject when the solver is stepped.
Example
cpp
#include "Magnetism/LinearMagneticSolver.h"
LinearMagneticSolver LMS(OPSettings, InputFile);
for(RTC.tStep = RTC.tStart; RTC.tStep <= RTC.nSteps; RTC.IncrementTimeStep())
{
// ... phase-field update ...
LMS.Solve(Phi, BC);
if (RTC.WriteVTK()) LMS.WriteVTK(OPSettings, RTC.tStep);
}Dependencies
- Magnetism — overview page with the constitutive relation.
- PhaseField — supplies
for the mixture rule. - DrivingForce — receives the magnetic contribution.
- BoundaryConditions.