BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::material::BhCurve Class Reference

B-H curve for ferromagnetic materials. More...

#include <cl_BhCurve.hpp>

Inheritance diagram for belfem::material::BhCurve:
[legend]

Public Member Functions

 BhCurve (const string &aPath, const string &aLabel)
 Constructor - records the database path and group label.
virtual ~BhCurve ()=default
 Virtual destructor ( the concrete curve owns and deletes its splines ).
virtual real nu (const real B) const
 Reluctivity ν(B) = H/B.
virtual real mu (const real H) const
 Permeability μ(H) = B/H.
virtual void dmudH (const real H, real &mu, real &dmudH) const
 Permeability and its derivative with respect to H.
real B (const real H) const
 Magnetic flux density from field intensity.
real H (const real B) const
 Magnetic field intensity from flux density.

Protected Attributes

const proc_t mCommRank
 MPI rank.
const string mPath
 path where data file is located
const string mLabel
 Material label for error messages.

Detailed Description

B-H curve for ferromagnetic materials.

Represents the magnetization curve B(H) and its inverse H(B) for ferromagnetic materials using cubic spline interpolation of tabulated data.

The curve provides:

  • ν(B) = H/B: Reluctivity [A/(T·m)]
  • μ(H) = B/H: Permeability [T·m/A]
  • dμ/dH: Derivative of permeability for Newton iterations
  • B(H): Magnetic flux density from field intensity
  • H(B): Magnetic field intensity from flux density

For fields above saturation (B > Bsat or H > Hsat), the material behaves linearly with an offset due to saturation magnetization:

  • B = μ₀·( H + Msat ) for H > Hsat
  • H = ν₀·B − Msat for B > Bsat ( Msat = ν₀·Bsat − Hsat, in A/m )

Data file format (HDF5 database):

  • aPath points to an HDF5 file that holds one group per material.
  • aLabel selects the group (e.g. "RoxieIron", "SAE1010").
  • Each group stores two serialized cubic splines, "bnur" ( ν(B) ) and "hnur" ( 1/μ(H) ), plus the scalars "bsat" and "hsat".

Usage (BhCurve is abstract; construct the concrete BhSplineCurve):

BhCurve* bh = new BhSplineCurve( "bhdata.hdf5", "RoxieIron" );
material->load_bh_curve(bh); // Material takes ownership
// Later, in FEM assembly:
real H = material->H(B); // field intensity at |B| through the curve
// ( reluctivity itself is bh->nu(B); Material::nu() is Poisson's ratio )
BhCurve(const string &aPath, const string &aLabel)
Constructor - records the database path and group label.
Definition cl_BhCurve.cpp:20
real H(const real B) const
Magnetic field intensity from flux density.
Definition cl_BhCurve.hpp:160
real B(const real H) const
Magnetic flux density from field intensity.
Definition cl_BhCurve.hpp:154
BhSplineCurve(const string &aPath, const string &aLabel)
Definition cl_Material_BhSplineCurve.cpp:23
Definition cl_BhCurve.cpp:19
double real
Definition typedefs.hpp:36
See also
BELFEM Materials Module - Usage Guide

Constructor & Destructor Documentation

◆ BhCurve()

belfem::material::BhCurve::BhCurve ( const string & aPath,
const string & aLabel )

Constructor - records the database path and group label.

Parameters
aPathPath to the HDF5 database file (e.g. "bhdata.hdf5")
aLabelGroup name to load (e.g. "RoxieIron")

The concrete BhSplineCurve opens the HDF5 file, selects the group named aLabel and reads the pre-computed cubic splines "bnur" ( ν(B) ) and "hnur" ( 1/μ(H) ) together with the saturation scalars "bsat" and "hsat"; Msat is derived from these.

◆ ~BhCurve()

virtual belfem::material::BhCurve::~BhCurve ( )
virtualdefault

Virtual destructor ( the concrete curve owns and deletes its splines ).

Member Function Documentation

◆ B()

real belfem::material::BhCurve::B ( const real H) const
inline

Magnetic flux density from field intensity.

Parameters
HMagnetic field intensity magnitude [A/m]
Returns
Magnetic flux density B [T]

Convenience function: B = μ(H) · H

◆ dmudH()

void belfem::material::BhCurve::dmudH ( const real H,
real & mu,
real & dmudH ) const
virtual

Permeability and its derivative with respect to H.

Parameters
HMagnetic field intensity magnitude [A/m]
[out]muPermeability μ(H) [T·m/A]
[out]dmudHDerivative dμ/dH [T·m/A²]

Computes both μ and dμ/dH efficiently for Newton-Raphson iterations in nonlinear magnetic FEM solvers.

For H < Hsat: Uses spline evaluation and derivative For H ≥ Hsat: Analytical formulas for linear regime

Reimplemented in belfem::material::BhSplineCurve.

◆ H()

real belfem::material::BhCurve::H ( const real B) const
inline

Magnetic field intensity from flux density.

Parameters
BMagnetic flux density magnitude [T]
Returns
Magnetic field intensity H [A/m]

Convenience function: H = ν(B) · B

◆ mu()

real belfem::material::BhCurve::mu ( const real H) const
virtual

Permeability μ(H) = B/H.

Parameters
HMagnetic field intensity magnitude [A/m]
Returns
Permeability μ [T·m/A]

For H < Hsat: Uses cubic spline interpolation For H ≥ Hsat: Returns μ₀·(1 + Msat/H)

Reimplemented in belfem::material::BhSplineCurve.

◆ nu()

real belfem::material::BhCurve::nu ( const real B) const
virtual

Reluctivity ν(B) = H/B.

Parameters
BMagnetic flux density magnitude [T]
Returns
Reluctivity ν [A/(T·m)]

For B < Bsat: Uses cubic spline interpolation For B ≥ Bsat: Returns ν₀ - Msat/B (linear + offset)

Reimplemented in belfem::material::BhSplineCurve.

Member Data Documentation

◆ mCommRank

const proc_t belfem::material::BhCurve::mCommRank
protected

MPI rank.

◆ mLabel

const string belfem::material::BhCurve::mLabel
protected

Material label for error messages.

◆ mPath

const string belfem::material::BhCurve::mPath
protected

path where data file is located


The documentation for this class was generated from the following files: