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

Base class for all materials in BELFEM. More...

#include <cl_Material.hpp>

Inheritance diagram for belfem::Material:
[legend]
Collaboration diagram for belfem::Material:
[legend]

Public Member Functions

 Material (const MaterialType aType, const bool aIsIsotropic=true)
 Constructor.
virtual ~Material ()
 Destructor - deletes owned B-H curves and Jc/n functions.
 Material (const Material &)=delete
Materialoperator= (const Material &)=delete
 Material (Material &&)=delete
Materialoperator= (Material &&)=delete
bool have (const MaterialProperty aProperty) const
 Check if a material property is available.
bool have_defect () const
 Check if the material has a defect.
bool have_heating () const
 Check if the material has a heating function.
bool use_piecewise () const
 Check if we use piecewise instead of power-law.
bool depends (const MaterialProperty aProperty, const MaterialDependency aDependency) const
 Check if a property depends on a specific variable.
const MaterialDependencyBitsetdependencies (const MaterialProperty aProperty) const
 Get all dependencies for a property.
bool is_isotropic () const
 Check if material is isotropic.
MaterialType type () const
 Get the material type.
const stringlabel () const
 Get material label.
const stringnumber () const
 Get material number/identifier.
void load_bh_curve (const material::BhCurve *aCurve)
 Activate a B-H curve as the permeability source (ferromagnets).
void flag (const uint8_t aIndex=0)
 Set flag (multi-purpose flag used by Kernel).
void unflag (const uint8_t aIndex=0)
 Clear flag.
bool is_flagged (const uint8_t aIndex=0) const
 Check if material is flagged.
bool is_constant (const MaterialProperty aProperty) const
 Check if a property is constant (temperature-independent).
virtual void set_RRR (const real RRR)
 Set the residual resistivity ratio (for noble metals).
virtual real density (const real T=gTroom) const
 Density as a function of temperature.
real ref_density () const
 Reference density at reference temperature.
real M () const
 Molar mass.
virtual real cp (const real T=gTroom) const
 Specific heat capacity.
virtual real dcpdT (const real T=gTroom) const
virtual real d2cpdT2 (const real T=gTroom) const
virtual real lambda (const real T=gTroom) const
 Thermal conductivity (isotropic).
virtual real dlambdadT (const real T=gTroom) const
virtual real lambda (const real T, const real B, const real beta) const
 Thermal conductivity for noble metals with magnetoresistance.
virtual real dlambdadT (const real T, const real B, const real beta) const
virtual real dlambdadB (const real T, const real B, const real beta) const
virtual real dlambdadbeta (const real T, const real B, const real beta) const
virtual real lambda (const real T, const real B_par, const real B_perp, const real J) const
 Thermal conductivity for HTS materials.
virtual real dlambdadT (const real T, const real B_par, const real B_perp, const real J) const
virtual real rho (const real T) const
 Electrical resistivity (isotropic).
virtual real drhodT (const real T) const
virtual real rho (const real T, const real B, const real beta) const
 Electrical resistivity for noble metals with magnetoresistance.
virtual real drhodT (const real T, const real B, const real beta) const
virtual real drhodB (const real T, const real B, const real beta) const
virtual real drhodbeta (const real T, const real B, const real beta) const
real rho_powerlaw (const real normJ) const
 Power law resistivity for HTS (constant jc and n).
real rho_powerlaw (const real normJ, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatially-dependent defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).
real rho_powerlaw (const real normJ, real normB, const real angleNxB) const
 Power law resistivity for HTS (field-dependent jc, constant n).
real rho_powerlaw (const real normJ, real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation.
real rho_powerlaw (const real normJ, const real T, real normB, const real angleNxB) const
 Power law resistivity for HTS (full temperature and field dependence).
real rho_powerlaw (const real normJ, const real T, real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).
real rho_powerlaw (const real normJ, const real T) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant.
real rho_powerlaw (const real normJ, const real T, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.
real rho_piecewise (const real normJ) const
 Piecewise resistivity for HTS (constant jc and n).
real rho_piecewise (const real normJ, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatially-dependent defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).
real rho_piecewise (const real normJ, real normB, const real angleNxB) const
 Piecewise resistivity for HTS (field-dependent jc, constant n).
real rho_piecewise (const real normJ, real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation.
real rho_piecewise (const real normJ, const real T, real normB, const real angleNxB) const
 Piecewise resistivity for HTS (full temperature and field dependence).
real rho_piecewise (const real normJ, const real T, real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).
real rho_piecewise (const real normJ, const real T) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant: \(J_c(T)\) and \(n(T)\) from the user-supplied callbacks Material::jc_custom() / Material::n_custom().
real rho_piecewise (const real normJ, const real T, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.
real rho_riva (const real normJ, const real T, const real normB, const real angleNxB) const
 Riva-law resistivity: the superconducting power-law channel in parallel with the normal-state channel.
real rho_riva (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 defect overload: jc_eff = D(x,y,z,t)·jc throughout
real drho_riva_dJ (const real normJ, const real T, const real normB, const real angleNxB) const
 dρ/d|J| of rho_riva: w²·dρ_PL/dJ with w = ρ_n/(ρ_PL+ρ_n)
real drho_riva_dJ (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
real drho_riva_dB (const real normJ, const real T, const real normB, const real angleNxB) const
 dρ/d|B| of rho_riva: w²·dρ_PL/dB ( dρ_n/dB = 0 on this path )
real drho_riva_dB (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
real drho_riva_dT (const real normJ, const real T, const real normB, const real angleNxB) const
 dρ/dT of rho_riva: w²·dρ_PL/dT + (1−w)²·dρ_n/dT
real drho_riva_dT (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
real n (const real normB, const real angleNxB, const real T) const
 Direct evaluation of the n-value as a function of \(|B|\), \(\angle(n,B)\) and \(T\).
real n (const real normB, const real angleNxB) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(n(|B|, \angle(n,B))\) without temperature dependence.
real jc (const real normB, const real angleNxB, const real T) const
 Direct evaluation of the critical current density \(J_c(|B|, \angle(n,B), T)\).
real jc (const real normB, const real angleNxB) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle(n,B))\) without temperature dependence.
real jc (const real normB, const real angleNxB, const real T, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Variant with spatial defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).
real jc (const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle(n,B))\) with spatial defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).
real drho_powerlaw_dJ (const real normJ, const real T, const real normB, const real angleNxB) const
 Derivative of power-law resistivity with respect to current density magnitude.
real drho_powerlaw_dJ (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).
real drho_powerlaw_dJ (const real normJ) const
 Analytic Jacobian \(d\rho_{eff}/dJ\) of the power-law model.
real drho_powerlaw_dJ (const real normJ, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatial defect modulation applied to \(J_c\).
real drho_powerlaw_dJ (const real normJ, const real T) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant: \(J_c(T)\) and \(n(T)\) from Material::jc_custom() / Material::n_custom().
real drho_powerlaw_dJ (const real normJ, const real T, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.
real drho_powerlaw_dJ (const real normJ, const real normB, const real angleNxB) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) via mJcFunction; \(n\) remains constant.
real drho_powerlaw_dJ (const real normJ, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation; \(n\) remains constant.
real drho_piecewise_dJ (const real normJ, const real T, const real normB, const real angleNxB) const
 Derivative of piecewise resistivity with respect to current density magnitude.
real drho_piecewise_dJ (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).
real drho_powerlaw_dB (const real normJ, const real T, const real normB, const real angleNxB) const
 Derivative of power-law resistivity with respect to |B| at fixed J, T, θ ( jc = jc(T,|B|,θ), n = n(T,|B|,θ) ).
real drho_powerlaw_dB (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc
real drho_powerlaw_dT (const real normJ, const real T, const real normB, const real angleNxB) const
 Derivative of power-law resistivity with respect to T at fixed J, |B|, θ ( T-leg: jc(T), n(T) AND ρ_n(T) all move — the quench-feedback tangent ).
real drho_powerlaw_dT (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc
real drho_piecewise_dB (const real normJ, const real T, const real normB, const real angleNxB) const
 Derivative of piecewise resistivity with respect to |B| at fixed J, T, θ
real drho_piecewise_dB (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc
real drho_piecewise_dT (const real normJ, const real T, const real normB, const real angleNxB) const
 Derivative of piecewise resistivity with respect to T at fixed J, |B|, θ ( T-leg ).
real drho_piecewise_dT (const real normJ, const real T, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc
real drho_piecewise_dJ (const real normJ) const
 Branch-aware Jacobian \(d\rho/dJ\) of the three-regime piecewise model.
real drho_piecewise_dJ (const real normJ, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatial defect modulation applied to \(J_c\).
real drho_piecewise_dJ (const real normJ, const real T) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant: \(J_c(T)\) and \(n(T)\) from Material::jc_custom() / Material::n_custom().
real drho_piecewise_dJ (const real normJ, const real T, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.
real drho_piecewise_dJ (const real normJ, const real normB, const real angleNxB) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) via mJcFunction; \(n\) remains constant.
real drho_piecewise_dJ (const real normJ, const real normB, const real angleNxB, const real x, const real y, const real z, const real t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation; \(n\) remains constant.
virtual real rho_i (const real T) const
 Intrinsic (phonon) electrical resistivity of a metal, ρ = ρ_i(T) + ρ_0.
virtual real H (const real B) const
 Magnetic field strength from flux density.
virtual real mu (const real H, const real T=BELFEM_QUIET_NAN) const
 Magnetic permeability.
virtual void dmudH (const real H, real &mu, real &dmudH) const
 Magnetic permeability and its derivative.
virtual real E (real T=gTroom) const
 Young's modulus.
virtual real nu (real T=gTroom) const
 Poisson's ratio.
virtual real G (real T=gTroom) const
 Shear modulus.
virtual real K (real T=gTroom) const
 Bulk modulus.
virtual real alpha (real T=gTroom) const
 Thermal expansion coefficient.
virtual real l (real T) const
 Relative length after thermal expansion.
virtual real Rp02 (real T=gTroom) const
 Yield stress (0.2% offset).
virtual real debye (const real T) const
 Debye temperature.
virtual void set_bh_curve (const material::BhCurve *aCurve)
 Assign a B-H curve to this material.
void set_jc_function (const material::JcFunction *aFunction)
 Assign a critical current density function.
void set_n_function (const material::JcFunction *aFunction)
 Assign a power law exponent function.
void set_piecewise (const bool aUsePiecewise)
void set_resistivity_law (const ResistivityLaw aLaw)
ResistivityLaw resistivity_law () const
bool use_riva () const
virtual void set_user_defined_function (const MaterialProperty Property, const MaterialDependency Dependency, MatFunc1 *Function)
 Set a user-defined function with one dependency (for UserDefinedMaterial).
virtual void set_user_defined_function (const MaterialProperty Property, const MaterialDependency Dependency1, const MaterialDependency Dependency2, MatFunc2 *Function)
 Set a user-defined function with two dependencies (for UserDefinedMaterial).
virtual void set_user_defined_function (const MaterialProperty Property, const MaterialDependency Dependency1, const MaterialDependency Dependency2, const MaterialDependency Dependency3, MatFunc3 *Function)
 Set a user-defined function with three dependencies (for UserDefinedMaterial).
void set_user_defined_defect (DefectFunc *Function)
 Set a user-defined defect function with x, y, z, t dependencies.
void read_defect (const string &aLibraryPath, const string &aLabel)
 Read a defect from the library.
void set_user_defined_heating (HeatFunc *Function)
 Set a user-defined volumetric heat load [ W/m³ ] as a function of x, y, z [ m ] and t [ s ].
void read_heating (const string &aLibraryPath, const string &aLabel)
 Read a heating function from a plugin library.
virtual real evaluate_polynomial (const MaterialProperty Property, const real T) const
 Evaluate a polynomial for a given property (for UserDefinedMaterial).
virtual real evaluate_derivative_of_polynomial (const MaterialProperty Property, const real T) const
virtual void set_user_defined_polynomial (const MaterialProperty Property, const std::vector< real > &Coefficients)
 Set a polynomial function for a property (for UserDefinedMaterial).
virtual void set_user_defined_polynomial (const MaterialProperty Property, const Cell< real > &Coefficients)
void set_label (const string &aLabel)
 PROTECTED INTERFACE FOR DERIVED MATERIALS.
void set_number (const string &aNumber)
 Set material number/identifier (for derived classes).
void set_have (const MaterialProperty aProperty, const bool aHave=true)
 Mark a property as available.
void reset_dependencies (const MaterialProperty aProperty)
 Reset all dependencies for a property.
void set_dependency (const MaterialProperty aProperty, const MaterialDependency aDependency)
 Add a dependency to a property.
void set_constant (const MaterialProperty aProperty, const real aValue)
 Define a property as constant.
void set_custom (const MaterialProperty aProperty)
 Mark property as using custom evaluation function.
real constant_property (const MaterialProperty aProperty) const
 Get constant property value.
virtual real spline_property (const MaterialProperty aProperty, const real aX) const
 Evaluate property using spline interpolation.
virtual real dspline_property (const MaterialProperty aProperty, const real aX) const
virtual real ddspline_property (const MaterialProperty aProperty, const real aX) const
virtual void set_table_flags (const bool aFlag)
virtual real jc_custom (const real T) const
virtual real n_custom (const real T) const
real volumetric_heatload (const real x, const real y, const real z, const real time) const
 Artificial volumetric heat load [ W/m³ ] from the heating plugin.

Protected Member Functions

real jc_eval (const real T, const real normB, const real angleNxB) const
 O1 "full-signature policy" helpers: the assembly path always passes the full ( T, normB, angleNxB ) set; the material consumes what its Jc / n functions depend on and ignores the rest.
real djc_eval_dB (const real T, const real normB, const real angleNxB) const
real dn_eval_dB (const real T, const real normB, const real angleNxB) const
 d(n)/d|B|, same routing as djc_eval_dB
real djc_eval_dT (const real T, const real normB, const real angleNxB) const
real dn_eval_dT (const real T, const real normB, const real angleNxB) const
 d(n)/dT, same routing as djc_eval_dT
real n_eval (const real T, const real normB, const real angleNxB) const
void check_riva_n_source () const
real n_eval_raw (const real T, const real normB, const real angleNxB) const
bool riva_rho_pl (const real normJ, const real jc, const real n, const real ec, real &rhoPL) const
void create_spline (const MaterialProperty aProperty, const real adYdX0=BELFEM_QUIET_NAN, const real adXdX1=BELFEM_QUIET_NAN)
 PROPERTY EVALUATION FUNCTIONS.
real alpha_switch_temperature () const
 Temperature below which alpha is taken from the Grueneisen branch.
real density_const (const real T) const
virtual real density_custom (const real T) const
real return_zero (const real T) const
 Shared binding for derivative channels that are identically zero.
real cp_const (const real T) const
real dcpdT_finite_difference (const real T) const
real d2cpdT2_finite_difference (const real T) const
real cp_spline (const real T) const
real dcpdT_spline (const real T) const
real d2cpdT2_spline (const real T) const
virtual real cp_custom (const real T) const
virtual real dcpdT_custom (const real T) const
virtual real d2cpdT2_custom (const real T) const
real lambda_const (const real T) const
real dlambdadT_finite_difference (const real T) const
real lambda_spline (const real T) const
real dlambdadT_spline (const real T) const
virtual real lambda_custom (const real T) const
virtual real dlambdadT_custom (const real T) const
real drhodT_finite_difference (const real T) const
real rho_const (const real T) const
virtual real rho_custom (const real T) const
virtual real drhodT_custom (const real T) const
virtual real rho_spline (const real T) const
virtual real drhodT_spline (const real T) const
virtual real rho_kohler (const real T, const real normB, const real angleJxB) const
virtual real drhodT_kohler (const real T, const real normB, const real angleJxB) const
virtual real drhodB_kohler (const real T, const real normB, const real angleJxB) const
virtual real drhodbeta_kohler (const real T, const real normB, const real angleJxB) const
virtual real rho_table (const real T, const real normB, const real angleJxB) const
virtual real drhodT_table (const real T, const real normB, const real angleJxB) const
virtual real drhodB_table (const real T, const real normB, const real angleJxB) const
virtual real drhodbeta_table (const real T, const real normB, const real angleJxB) const
virtual real lambda_custom (const real T, const real normB, const real angle) const
virtual real lambda_table (const real T, const real normB, const real angle) const
real H_const (const real B) const
virtual real H_bhcurve (const real B) const
real mu_const (const real H, const real T) const
virtual real mu_bhcurve (const real H, const real T) const
virtual real mu_custom (const real H, const real T) const
void dmudH_const (const real H, real &mu, real &dmudH) const
virtual void dmudH_bhcurve (const real H, real &mu, real &dmudH) const
real E_const (const real T) const
real E_spline (const real T) const
virtual real E_custom (const real T) const
virtual real dEdT_custom (const real T) const
real nu_const (const real T) const
real nu_spline (const real T) const
virtual real nu_custom (const real T) const
real alpha_const (const real T) const
real alpha_spline (const real T) const
virtual real alpha_custom (const real T) const
real Rp02_const (const real T) const
real Rp02_spline (const real T) const
virtual real Rp02_custom (const real T) const
real debye_const (const real T) const
real debye_spline (const real T) const
virtual real debye_custom (const real T) const
virtual real rho_i_custom (const real T) const
real rho_i_spline (const real T) const
virtual void reset_spline (const MaterialProperty aProperty)
virtual void create_spline (real(Material::*aFunction)(const real aT) const, const MaterialProperty aProperty, const uint aStartBC, const uint aEndBC, const real adYdX0=BELFEM_QUIET_NAN, const real adYdX1=BELFEM_QUIET_NAN)

Protected Attributes

real(Material::*) mFunctionRhoKohler (const real T, const real normB, const real angle) const = nullptr
real(Material::*) mFunctiondRhoKohlerdT (const real T, const real normB, const real angle) const = nullptr
real(Material::*) mFunctiondRhoKohlerdB (const real T, const real normB, const real angle) const = nullptr
real(Material::*) mFunctiondRhoKohlerdbeta (const real T, const real normB, const real angle) const = nullptr
real(Material::*) mFunctionH (const real B) const = nullptr
real(Material::*) mFunctionMu (const real H, const real T) const = nullptr
void(Material::*) mFunctionDMuDH (double, double &, double &) const = nullptr
const material::JcFunctionmJcFunction = nullptr
const material::JcFunctionmNFunction = nullptr

Detailed Description

Base class for all materials in BELFEM.

The Material class provides a unified interface for accessing physical properties of materials. Properties can be constant, temperature-dependent, or depend on multiple variables (field, current, etc.) depending on the material type.

Key features:

  • Automatic property function dispatching based on dependencies
  • Support for both constant and variable properties
  • Spline-based interpolation for tabulated data
  • Custom functions for complex material behavior
  • Ownership management for B-H curves and Jc functions

Usage:

Material* cu = factory.create_material("copper");
cu->set_RRR(100);
real rho = cu->rho(77.0); // Resistivity at 77K
Factory class for creating material objects and associated property functions.
Definition cl_MaterialFactory.hpp:74
Material * create_material(const string &aLabel, const real aRRR=BELFEM_QUIET_NAN, const bool aBuildTables=true)
Create a material by label.
Definition cl_MaterialFactory.cpp:491
Material(const MaterialType aType, const bool aIsIsotropic=true)
Constructor.
Definition cl_Material.cpp:149
virtual real rho(const real T) const
Electrical resistivity (isotropic).
Definition cl_Material.hpp:2038
virtual void set_RRR(const real RRR)
Set the residual resistivity ratio (for noble metals).
Definition cl_Material.cpp:217
double real
Definition typedefs.hpp:36

IMPORTANT NOTES:

  • For HTS materials, use rho_powerlaw() instead of rho()
  • For thermal M-matrix, use ref_density() or density(gTroom), not density(T)
  • Material owns and deletes assigned B-H curves and Jc/n functions
  • Variable names in material functions are exempt from BELFEM naming rules
See also
BELFEM Materials Module - Usage Guide

Constructor & Destructor Documentation

◆ Material() [1/3]

belfem::Material::Material ( const MaterialType aType,
const bool aIsIsotropic = true )

Constructor.

Parameters
aTypeMaterial type (Ferro, HTS, PureMetal, etc.)
aIsIsotropicTrue if material properties are isotropic (default)

◆ ~Material()

belfem::Material::~Material ( )
virtual

Destructor - deletes owned B-H curves and Jc/n functions.

◆ Material() [2/3]

belfem::Material::Material ( const Material & )
delete

◆ Material() [3/3]

belfem::Material::Material ( Material && )
delete

Member Function Documentation

◆ alpha()

real belfem::Material::alpha ( real T = gTroom) const
inlinevirtual

Thermal expansion coefficient.

Parameters
TTemperature [K] (default: room temperature)
Returns
Thermal expansion coefficient [1/K]

Defined as α = (1/l)·∂l/∂T, NOT (1/l)·Δl/ΔT!

◆ alpha_const()

real belfem::Material::alpha_const ( const real T) const
inlineprotected

◆ alpha_custom()

◆ alpha_spline()

real belfem::Material::alpha_spline ( const real T) const
inlineprotected

◆ alpha_switch_temperature()

real belfem::Material::alpha_switch_temperature ( ) const
inlineprotected

Temperature below which alpha is taken from the Grueneisen branch.

min( 0.618 * theta_Debye, gTAlphaSwitchMax ). The Debye factor is a convention, not a derivation - it sits comfortably above the temperature at which dln(C)/dT changes sign, which is where the fitted expansion curve stops being consistent with the heat capacity.

◆ check_riva_n_source()

void belfem::Material::check_riva_n_source ( ) const
protected

setup gate for the riva law: refuses a PROVABLY bad n source ( table bound or constant at or below 1 ). Called from set_resistivity_law and set_n_function, so the outcome does not depend on which of the two is called first.

◆ constant_property()

real belfem::Material::constant_property ( const MaterialProperty aProperty) const
inline

Get constant property value.

◆ cp()

real belfem::Material::cp ( const real T = gTroom) const
inlinevirtual

Specific heat capacity.

Parameters
TTemperature [K] (default: room temperature)
Returns
Specific heat capacity [J/(kg·K)]

◆ cp_const()

real belfem::Material::cp_const ( const real T) const
inlineprotected

◆ cp_custom()

◆ cp_spline()

real belfem::Material::cp_spline ( const real T) const
inlineprotected

◆ create_spline() [1/2]

void belfem::Material::create_spline ( const MaterialProperty aProperty,
const real adYdX0 = BELFEM_QUIET_NAN,
const real adXdX1 = BELFEM_QUIET_NAN )
protected

PROPERTY EVALUATION FUNCTIONS.

These functions are called via function pointers for property evaluation. Each property has up to four variants:

  • *_const: Returns constant value
  • *_spline: Interpolates from spline
  • *_custom: Calls derived class's custom implementation
  • *_table: Uses lookup table (for field-dependent properties)

The appropriate function is selected during material initialization based on how the property is defined.

Create spline for a property with optional boundary derivatives

◆ create_spline() [2/2]

void belfem::Material::create_spline ( real(Material::* aFunction )(const real aT) const,
const MaterialProperty aProperty,
const uint aStartBC,
const uint aEndBC,
const real adYdX0 = BELFEM_QUIET_NAN,
const real adYdX1 = BELFEM_QUIET_NAN )
protectedvirtual

◆ d2cpdT2()

real belfem::Material::d2cpdT2 ( const real T = gTroom) const
inlinevirtual

◆ d2cpdT2_custom()

real belfem::Material::d2cpdT2_custom ( const real T) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ d2cpdT2_finite_difference()

real belfem::Material::d2cpdT2_finite_difference ( const real T) const
inlineprotected

◆ d2cpdT2_spline()

real belfem::Material::d2cpdT2_spline ( const real T) const
inlineprotected

◆ dcpdT()

real belfem::Material::dcpdT ( const real T = gTroom) const
inlinevirtual

◆ dcpdT_custom()

real belfem::Material::dcpdT_custom ( const real T) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ dcpdT_finite_difference()

real belfem::Material::dcpdT_finite_difference ( const real T) const
inlineprotected

◆ dcpdT_spline()

real belfem::Material::dcpdT_spline ( const real T) const
inlineprotected

◆ ddspline_property()

real belfem::Material::ddspline_property ( const MaterialProperty aProperty,
const real aX ) const
virtual

◆ debye()

real belfem::Material::debye ( const real T) const
inlinevirtual

Debye temperature.

Parameters
TTemperature [K]
Returns
Debye temperature [K]

◆ debye_const()

real belfem::Material::debye_const ( const real T) const
inlineprotected

◆ debye_custom()

◆ debye_spline()

real belfem::Material::debye_spline ( const real T) const
inlineprotected

◆ dEdT_custom()

real belfem::Material::dEdT_custom ( const real T) const
protectedvirtual

◆ density()

real belfem::Material::density ( const real T = gTroom) const
inlinevirtual

Density as a function of temperature.

Parameters
TTemperature [K] (default: room temperature)
Returns
Density [kg/m³]

IMPORTANT: For thermal M-matrix, use ref_density() or density(gTroom), not density(T), because BELFEM computes on the undeformed mesh.

◆ density_const()

real belfem::Material::density_const ( const real T) const
inlineprotected

◆ density_custom()

real belfem::Material::density_custom ( const real T) const
inlineprotectedvirtual

◆ dependencies()

const MaterialDependencyBitset * belfem::Material::dependencies ( const MaterialProperty aProperty) const
inline

Get all dependencies for a property.

Parameters
aPropertyThe material property
Returns
Pointer to bitset containing all dependencies

◆ depends()

bool belfem::Material::depends ( const MaterialProperty aProperty,
const MaterialDependency aDependency ) const
inline

Check if a property depends on a specific variable.

Parameters
aPropertyThe material property
aDependencyThe dependency to check (T, B, angle, etc.)
Returns
True if the property depends on the specified variable

◆ djc_eval_dB()

real belfem::Material::djc_eval_dB ( const real T,
const real normB,
const real angleNxB ) const
inlineprotected

d(jc)/d|B| routed like jc_eval: JcFunction::deval_dB when a function is attached, 0 for the constants fallback ( the exact derivative of a constant ) — so constant-jc decks are bit-identical

◆ djc_eval_dT()

real belfem::Material::djc_eval_dT ( const real T,
const real normB,
const real angleNxB ) const
inlineprotected

d(jc)/dT, T-leg twin of djc_eval_dB: JcFunction::deval_dT when a function is attached, 0 for the constants fallback. For a T-dependent UserDefined without a deval_dT override the base-class 0 is a conservative fallback, not an exact derivative

◆ dlambdadB()

real belfem::Material::dlambdadB ( const real T,
const real B,
const real beta ) const
inlinevirtual

Reimplemented in belfem::material::Metal.

◆ dlambdadbeta()

real belfem::Material::dlambdadbeta ( const real T,
const real B,
const real beta ) const
inlinevirtual

Reimplemented in belfem::material::Metal.

◆ dlambdadT() [1/3]

real belfem::Material::dlambdadT ( const real T,
const real B,
const real beta ) const
inlinevirtual

◆ dlambdadT() [2/3]

real belfem::Material::dlambdadT ( const real T,
const real B_par,
const real B_perp,
const real J ) const
inlinevirtual

◆ dlambdadT() [3/3]

real belfem::Material::dlambdadT ( const real T = gTroom) const
inlinevirtual

◆ dlambdadT_custom()

real belfem::Material::dlambdadT_custom ( const real T) const
protectedvirtual

◆ dlambdadT_finite_difference()

real belfem::Material::dlambdadT_finite_difference ( const real T) const
inlineprotected

◆ dlambdadT_spline()

real belfem::Material::dlambdadT_spline ( const real T) const
inlineprotected

◆ dmudH()

void belfem::Material::dmudH ( const real H,
real & mu,
real & dmudH ) const
inlinevirtual

Magnetic permeability and its derivative.

Parameters
HMagnetic field strength [A/m]
muOutput: magnetic permeability [H/m]
dmudHOutput: derivative dμ/dH [H/m²]

◆ dmudH_bhcurve()

void belfem::Material::dmudH_bhcurve ( const real H,
real & mu,
real & dmudH ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ dmudH_const()

void belfem::Material::dmudH_const ( const real H,
real & mu,
real & dmudH ) const
inlineprotected

◆ dn_eval_dB()

real belfem::Material::dn_eval_dB ( const real T,
const real normB,
const real angleNxB ) const
inlineprotected

d(n)/d|B|, same routing as djc_eval_dB

◆ dn_eval_dT()

real belfem::Material::dn_eval_dT ( const real T,
const real normB,
const real angleNxB ) const
inlineprotected

d(n)/dT, same routing as djc_eval_dT

◆ drho_piecewise_dB() [1/2]

real belfem::Material::drho_piecewise_dB ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

Derivative of piecewise resistivity with respect to |B| at fixed J, T, θ

Returns
dρ/d|B| [Ω·m/T]

Exact per regime where the regime's law permits, staged where it does not ( 2026-08-13 audit, C5 accepted by both voices ):

  • power-law regime ( J ≤ j1 ): dp/d|B| WITHOUT the parallel factor, because rho_piecewise returns the RAW power law there — consistency is with the residual, not with drho_powerlaw_dB.
  • normal regime ( J > j3 ) and T > T_crit: exactly 0 ( ρ = ρ_n is independent of jc, n ).
  • Bézier blend ( j1 < J ≤ j3 ): 0 for now — the boundaries j1..j3 and the control points also move with jc, and that derivative is deferred; a zero here is today's global behaviour, locally. The tangent therefore has a jump at j1.

◆ drho_piecewise_dB() [2/2]

real belfem::Material::drho_piecewise_dB ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc

◆ drho_piecewise_dJ() [1/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ) const
inline

Branch-aware Jacobian \(d\rho/dJ\) of the three-regime piecewise model.

Branches mirror those of rho_piecewise():

  • Power-law regime \((J \le J_1)\): the parallel-combined chain rule of drho_powerlaw_dJ() is applied here. NOTE: rho_piecewise() returns the RAW power law in this regime (no parallel combination), so unlike drho_piecewise_dB/dT this tangent is not consistent with the residual there.
  • Normal regime \((J > J_3)\): \(\rho\) is constant, so the derivative is exactly zero.
  • Flux-flow transition \((J_1 < J \le J_3)\): differentiate the Bezier blend in log–log space. With \(L_\rho \equiv \log_{10}\rho\),

    \[ \frac{d\rho}{dJ} \;=\; \rho\,\ln 10\, \frac{dL_\rho}{dt}\, \frac{dt}{dJ}, \]

    where the parametric derivatives follow from the implicit relation \(a t^2 - 2bt - c(J) = 0\) defined in rho_piecewise(). Above \(T_{crit}\) the derivative is taken as zero (only \(\rho_n\) is returned by rho_piecewise()), and for \(|J| < \)BELFEM_EPSILON the derivative is zero to avoid the singular \(\log J\) term.

Required by the nonlinear iteration in the HTS solver (Messe et al. 2023, Sec. 2.7) so that Newton-Raphson can drive the residual through the curved transition without losing quadratic convergence.

This overload assumes constant \(J_c\) and \(n\).

Parameters
normJcurrent-density magnitude \(|J|\) [A/m²]
Returns
\(d\rho/dJ\) [Ω·m / (A/m²)]

◆ drho_piecewise_dJ() [2/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ,
const real normB,
const real angleNxB ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) via mJcFunction; \(n\) remains constant.

◆ drho_piecewise_dJ() [3/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation; \(n\) remains constant.

◆ drho_piecewise_dJ() [4/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ,
const real T ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant: \(J_c(T)\) and \(n(T)\) from Material::jc_custom() / Material::n_custom().

◆ drho_piecewise_dJ() [5/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

Derivative of piecewise resistivity with respect to current density magnitude.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant: both \(J_c\) and \(n\) come from JcFunction objects.

Parameters
normJCurrent density magnitude [A/m²]
normBMagnetic field magnitude [T]
angleNxBAngle between surface normal and B [rad]
TTemperature [K]
Returns
Derivative dρ/d||J|| [Ω·m³/A]

For Newton-Raphson: computes dρ/d||J|| for the piecewise model

◆ drho_piecewise_dJ() [6/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).

◆ drho_piecewise_dJ() [7/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ,
const real T,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.

◆ drho_piecewise_dJ() [8/8]

real belfem::Material::drho_piecewise_dJ ( const real normJ,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatial defect modulation applied to \(J_c\).

◆ drho_piecewise_dT() [1/2]

real belfem::Material::drho_piecewise_dT ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

Derivative of piecewise resistivity with respect to T at fixed J, |B|, θ ( T-leg ).

Returns
dρ/dT [Ω·m/K]

Follows rho_piecewise's OWN residual branch by branch:

  • T > T_crit and normal regime ( J > j3 ): exactly dρ_n/dT.
  • power-law regime ( J ≤ j1 ): raw-law derivative, NO parallel factor and NO ρ_n term — consistency is with the residual.
  • Bézier blend ( j1 < J ≤ j3 ): BOTH parts — the frozen-knot partial and the knot motion dtParam/dT through j1(T)..j3(T); the knot motion dominates. Degrades to the frozen part alone at the degenerate n−1 == mNff transition. Jumps at j1 and T_crit are inherited from the residual itself.

◆ drho_piecewise_dT() [2/2]

real belfem::Material::drho_piecewise_dT ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc

◆ drho_powerlaw_dB() [1/2]

real belfem::Material::drho_powerlaw_dB ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

Derivative of power-law resistivity with respect to |B| at fixed J, T, θ ( jc = jc(T,|B|,θ), n = n(T,|B|,θ) ).

Returns
dρ/d|B| [Ω·m/T]

Chain: dρ/d|B| = (r/p)² · [ ∂p/∂jc·djc/d|B| + ∂p/∂n·dn/d|B| ] with p the power-law resistivity, r the parallel combination with ρ_n, ∂p/∂jc = −n·p/jc and ∂p/∂n = p·ln(J/jc). Parallel factor and floor convention mirror drho_powerlaw_dJ exactly ( floored p in the factor, unfloored law differentiated ).

◆ drho_powerlaw_dB() [2/2]

real belfem::Material::drho_powerlaw_dB ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc

◆ drho_powerlaw_dJ() [1/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ) const
inline

Analytic Jacobian \(d\rho_{eff}/dJ\) of the power-law model.

For the parallel-combined model \(\rho_{eff} = (1/\rho_n + 1/\rho_{PL})^{-1}\) the chain rule gives

\[ \frac{d\rho_{eff}}{dJ} \;=\; \frac{d\rho_{PL}/dJ}{(1 + \rho_{PL}/\rho_n)^2}, \qquad \frac{d\rho_{PL}}{dJ} \;=\; \frac{E_c}{J_c^{2}}\,(n-1)\,\left(\frac{|J|}{J_c}\right)^{n-2}. \]

Required by the nonlinear (Newton-Raphson) iteration in the HTS solver to drive the residual below \(10^{-11}\) as recommended in Messe et al. 2023, Sec. 2.7. For \(|J| < \)BELFEM_EPSILON the derivative is taken as zero to avoid the \(0^{n-2}\) singularity when \(n < 2\).

This overload assumes constant \(J_c\) and \(n\).

Parameters
normJcurrent-density magnitude \(|J|\) [A/m²]
Returns
\(d\rho_{eff}/dJ\) [Ω·m / (A/m²)]

◆ drho_powerlaw_dJ() [2/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ,
const real normB,
const real angleNxB ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) via mJcFunction; \(n\) remains constant.

◆ drho_powerlaw_dJ() [3/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation; \(n\) remains constant.

◆ drho_powerlaw_dJ() [4/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ,
const real T ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant: \(J_c(T)\) and \(n(T)\) from Material::jc_custom() / Material::n_custom().

◆ drho_powerlaw_dJ() [5/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

Derivative of power-law resistivity with respect to current density magnitude.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant: both \(J_c\) and \(n\) come from JcFunction objects.

Parameters
normJCurrent density magnitude [A/m²]
normBMagnetic field magnitude [T]
angleNxBAngle between surface normal and B [rad]
TTemperature [K]
Returns
Derivative dρ/d||J|| [Ω·m³/A]

For Newton-Raphson: computes dρ/d||J|| where ρ = ρ(||J||, B, θ, T)

◆ drho_powerlaw_dJ() [6/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).

◆ drho_powerlaw_dJ() [7/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ,
const real T,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.

◆ drho_powerlaw_dJ() [8/8]

real belfem::Material::drho_powerlaw_dJ ( const real normJ,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatial defect modulation applied to \(J_c\).

◆ drho_powerlaw_dT() [1/2]

real belfem::Material::drho_powerlaw_dT ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

Derivative of power-law resistivity with respect to T at fixed J, |B|, θ ( T-leg: jc(T), n(T) AND ρ_n(T) all move — the quench-feedback tangent ).

Returns
dρ/dT [Ω·m/K]

Chain: dρ/dT = dp₀/dT / (1+ρ_PL/ρ_n)² + dρ_n/dT · (ρ_PL/(ρ_n+ρ_PL))² with dp₀/dT = p₀·( −(n/jc)·djc/dT + ln(J/jc)·dn/dT ). Floor convention mirrors drho_powerlaw_dB ( floored ρ_PL in the parallel factors, unfloored law differentiated ). No (djc==0 && dn==0) early-out: the ρ_n term is the only correct T-dependence of a constant-jc material and must survive.

◆ drho_powerlaw_dT() [2/2]

real belfem::Material::drho_powerlaw_dT ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

defect overload: jc_eff = D(x)·jc throughout, djc_eff = D·djc

◆ drho_riva_dB() [1/2]

real belfem::Material::drho_riva_dB ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

dρ/d|B| of rho_riva: w²·dρ_PL/dB ( dρ_n/dB = 0 on this path )

◆ drho_riva_dB() [2/2]

real belfem::Material::drho_riva_dB ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

◆ drho_riva_dJ() [1/2]

real belfem::Material::drho_riva_dJ ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

dρ/d|J| of rho_riva: w²·dρ_PL/dJ with w = ρ_n/(ρ_PL+ρ_n)

◆ drho_riva_dJ() [2/2]

real belfem::Material::drho_riva_dJ ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

◆ drho_riva_dT() [1/2]

real belfem::Material::drho_riva_dT ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

dρ/dT of rho_riva: w²·dρ_PL/dT + (1−w)²·dρ_n/dT

◆ drho_riva_dT() [2/2]

real belfem::Material::drho_riva_dT ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

◆ drhodB()

real belfem::Material::drhodB ( const real T,
const real B,
const real beta ) const
inlinevirtual

◆ drhodB_kohler()

real belfem::Material::drhodB_kohler ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ drhodB_table()

real belfem::Material::drhodB_table ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ drhodbeta()

real belfem::Material::drhodbeta ( const real T,
const real B,
const real beta ) const
inlinevirtual

◆ drhodbeta_kohler()

real belfem::Material::drhodbeta_kohler ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ drhodbeta_table()

real belfem::Material::drhodbeta_table ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ drhodT() [1/2]

real belfem::Material::drhodT ( const real T) const
inlinevirtual

◆ drhodT() [2/2]

real belfem::Material::drhodT ( const real T,
const real B,
const real beta ) const
inlinevirtual

◆ drhodT_custom()

real belfem::Material::drhodT_custom ( const real T) const
inlineprotectedvirtual

◆ drhodT_finite_difference()

real belfem::Material::drhodT_finite_difference ( const real T) const
inlineprotected

◆ drhodT_kohler()

real belfem::Material::drhodT_kohler ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ drhodT_spline()

real belfem::Material::drhodT_spline ( const real T) const
inlineprotectedvirtual

◆ drhodT_table()

real belfem::Material::drhodT_table ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ dspline_property()

real belfem::Material::dspline_property ( const MaterialProperty aProperty,
const real aX ) const
virtual

◆ E()

real belfem::Material::E ( real T = gTroom) const
inlinevirtual

Young's modulus.

Parameters
TTemperature [K] (default: room temperature)
Returns
Young's modulus [Pa]

◆ E_const()

real belfem::Material::E_const ( const real T) const
inlineprotected

◆ E_custom()

◆ E_spline()

real belfem::Material::E_spline ( const real T) const
inlineprotected

◆ evaluate_derivative_of_polynomial()

real belfem::Material::evaluate_derivative_of_polynomial ( const MaterialProperty Property,
const real T ) const
virtual

◆ evaluate_polynomial()

real belfem::Material::evaluate_polynomial ( const MaterialProperty Property,
const real T ) const
virtual

Evaluate a polynomial for a given property (for UserDefinedMaterial).

Internal method used by UserDefinedMaterial to evaluate polynomial-based property functions. Uses Horner's method for efficient evaluation.

Parameters
PropertyThe material property
TTemperature [K]
Returns
Property value at temperature T
Note
This is a virtual method overridden by UserDefinedMaterial

Reimplemented in belfem::material::UserDefinedMaterial.

◆ flag()

void belfem::Material::flag ( const uint8_t aIndex = 0)
inline

Set flag (multi-purpose flag used by Kernel).

◆ G()

real belfem::Material::G ( real T = gTroom) const
inlinevirtual

Shear modulus.

Parameters
TTemperature [K] (default: room temperature)
Returns
Shear modulus G = E/(2(1+ν)) [Pa]

◆ H()

real belfem::Material::H ( const real B) const
inlinevirtual

Magnetic field strength from flux density.

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

◆ H_bhcurve()

real belfem::Material::H_bhcurve ( const real B) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ H_const()

real belfem::Material::H_const ( const real B) const
inlineprotected

◆ have()

bool belfem::Material::have ( const MaterialProperty aProperty) const
inline

Check if a material property is available.

Parameters
aPropertyThe property to check
Returns
True if the property is implemented for this material

◆ have_defect()

bool belfem::Material::have_defect ( ) const
inline

Check if the material has a defect.

Returns
True if a defect function was defined

◆ have_heating()

bool belfem::Material::have_heating ( ) const
inline

Check if the material has a heating function.

Returns
True if a heating function was defined

◆ is_constant()

bool belfem::Material::is_constant ( const MaterialProperty aProperty) const
inline

Check if a property is constant (temperature-independent).

Parameters
aPropertyThe property to check
Returns
True if the property is constant

◆ is_flagged()

bool belfem::Material::is_flagged ( const uint8_t aIndex = 0) const
inline

Check if material is flagged.

Returns
True if flag is set

◆ is_isotropic()

bool belfem::Material::is_isotropic ( ) const
inline

Check if material is isotropic.

Returns
True if all properties are isotropic

◆ jc() [1/4]

real belfem::Material::jc ( const real normB,
const real angleNxB ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle(n,B))\) without temperature dependence.

◆ jc() [2/4]

real belfem::Material::jc ( const real B,
const real angleNxB,
const real T ) const
inline

Direct evaluation of the critical current density \(J_c(|B|, \angle(n,B), T)\).

Used by post-processing and by overloads of rho_powerlaw() / rho_piecewise() that take a JcFunction-supplied \(J_c(B,\angle,T)\). For materials with a constant \(J_c\), use Material::constant_property(MaterialProperty::jc) instead.

Precondition
mJcFunction must have been installed (checked in debug mode). Note: Material::have(jc) is true even when \(J_c\) was set as a plain constant, so it is not sufficient to guard the function pointer — the explicit nullptr check is required.

◆ jc() [3/4]

real belfem::Material::jc ( const real normB,
const real angleNxB,
const real T,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Variant with spatial defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).

◆ jc() [4/4]

real belfem::Material::jc ( const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle(n,B))\) with spatial defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).

◆ jc_custom()

real belfem::Material::jc_custom ( const real T) const
inlinevirtual

◆ jc_eval()

real belfem::Material::jc_eval ( const real T,
const real normB,
const real angleNxB ) const
inlineprotected

O1 "full-signature policy" helpers: the assembly path always passes the full ( T, normB, angleNxB ) set; the material consumes what its Jc / n functions depend on and ignores the rest.

JcFunction subclasses override either eval( B, angle ) or eval( B, angle, T ) — the respective other default throws — so we route on the declared T-dependence. Falls back to the plain constants when no function is attached.

◆ K()

real belfem::Material::K ( real T = gTroom) const
inlinevirtual

Bulk modulus.

Parameters
TTemperature [K] (default: room temperature)
Returns
Bulk modulus K = E/(3(1-2ν)) [Pa]

◆ l()

real belfem::Material::l ( real T) const
virtual

Relative length after thermal expansion.

Parameters
TTemperature [K]
Returns
Relative length l/l₀ [-]

Reimplemented in belfem::material::Metal, and belfem::material::SplineLookupTable.

◆ label()

const string & belfem::Material::label ( ) const
inline

Get material label.

Returns
Material label string (e.g., "Copper", "YBCO")

◆ lambda() [1/3]

real belfem::Material::lambda ( const real T,
const real B,
const real beta ) const
inlinevirtual

Thermal conductivity for noble metals with magnetoresistance.

Parameters
TTemperature [K]
BMagnetic field magnitude [T]
betaAngle between field and current [rad]
Returns
Thermal conductivity [W/(m·K)]

NOTE: metals evaluate Kohler's rule directly; when a metal was constructed with tables enabled, set_RRR() builds <label>_RRR<n>.hdf5 and the field-dependent evaluation reads it instead. Alloys require the table.

Reimplemented in belfem::material::Alloy, and belfem::material::Metal.

◆ lambda() [2/3]

real belfem::Material::lambda ( const real T,
const real B_par,
const real B_perp,
const real J ) const
inlinevirtual

Thermal conductivity for HTS materials.

Parameters
TTemperature [K]
B_parParallel magnetic field component [T]
B_perpPerpendicular magnetic field component [T]
JCurrent density magnitude [A/m²]
Returns
Thermal conductivity [W/(m·K)]

Reimplemented in belfem::material::Alloy, and belfem::material::Metal.

◆ lambda() [3/3]

real belfem::Material::lambda ( const real T = gTroom) const
inlinevirtual

Thermal conductivity (isotropic).

Parameters
TTemperature [K] (default: room temperature)
Returns
Thermal conductivity [W/(m·K)]

Reimplemented in belfem::material::Alloy, and belfem::material::Metal.

◆ lambda_const()

real belfem::Material::lambda_const ( const real T) const
inlineprotected

◆ lambda_custom() [1/2]

real belfem::Material::lambda_custom ( const real T) const
protectedvirtual

◆ lambda_custom() [2/2]

real belfem::Material::lambda_custom ( const real T,
const real normB,
const real angle ) const
protectedvirtual

◆ lambda_spline()

real belfem::Material::lambda_spline ( const real T) const
inlineprotected

◆ lambda_table()

real belfem::Material::lambda_table ( const real T,
const real normB,
const real angle ) const
protectedvirtual

◆ load_bh_curve()

void belfem::Material::load_bh_curve ( const material::BhCurve * aCurve)

Activate a B-H curve as the permeability source (ferromagnets).

Parameters
aCurveConcrete B-H curve; the material takes ownership.

Kept free of the concrete curve type: the caller (MaterialFactory) builds the linalg-backed BhSplineCurve, so base Material never depends on Spline/linalg. Stores the curve via set_bh_curve() and routes mu/H/dmudH through it.

◆ M()

real belfem::Material::M ( ) const
inline

Molar mass.

Returns
Molar mass [kg/mol]

◆ mu()

real belfem::Material::mu ( const real H,
const real T = BELFEM_QUIET_NAN ) const
inlinevirtual

Magnetic permeability.

Parameters
HMagnetic field strength [A/m]
TTemperature [K] (used by user-defined / polynomial mu(H,T); ignored by the constant and B-H-curve bindings)
Returns
Magnetic permeability [H/m]

◆ mu_bhcurve()

real belfem::Material::mu_bhcurve ( const real H,
const real T ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ mu_const()

real belfem::Material::mu_const ( const real H,
const real T ) const
inlineprotected

◆ mu_custom()

real belfem::Material::mu_custom ( const real H,
const real T ) const
protectedvirtual

◆ n() [1/2]

real belfem::Material::n ( const real normB,
const real angleNxB ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(n(|B|, \angle(n,B))\) without temperature dependence.

◆ n() [2/2]

real belfem::Material::n ( const real normB,
const real angleNxB,
const real T ) const
inline

Direct evaluation of the n-value as a function of \(|B|\), \(\angle(n,B)\) and \(T\).

Used by post-processing and by overloads of rho_powerlaw() / rho_piecewise() that take a JcFunction-supplied \(n(B,\angle,T)\). For materials with a constant \(n\), use Material::constant_property(MaterialProperty::n) instead.

Precondition
mNFunction must have been installed (checked in debug mode).

◆ n_custom()

real belfem::Material::n_custom ( const real T) const
inlinevirtual

◆ n_eval()

real belfem::Material::n_eval ( const real T,
const real normB,
const real angleNxB ) const
inlineprotected

◆ n_eval_raw()

real belfem::Material::n_eval_raw ( const real T,
const real normB,
const real angleNxB ) const
inlineprotected

unfloored n as routed from table / custom / constant — n_eval clamps this at 1, and the dn_eval_* derivatives return 0 while the clamp binds

◆ nu()

real belfem::Material::nu ( real T = gTroom) const
inlinevirtual

Poisson's ratio.

Parameters
TTemperature [K] (default: room temperature)
Returns
Poisson's ratio [-]

◆ nu_const()

real belfem::Material::nu_const ( const real T) const
inlineprotected

◆ nu_custom()

real belfem::Material::nu_custom ( const real T) const
protectedvirtual

◆ nu_spline()

real belfem::Material::nu_spline ( const real T) const
inlineprotected

◆ number()

const string & belfem::Material::number ( ) const
inline

Get material number/identifier.

Returns
Material number if it exists, empty string otherwise

◆ operator=() [1/2]

Material & belfem::Material::operator= ( const Material & )
delete

◆ operator=() [2/2]

Material & belfem::Material::operator= ( Material && )
delete

◆ read_defect()

void belfem::Material::read_defect ( const string & aLibraryPath,
const string & aLabel )

Read a defect from the library.

Parameters
aLibraryPathpath to the shared library holding the defect, resolved through material::data_file(): the run directory first, then $BELFEM_DATA/material, and otherwise handed to dlopen unchanged
aLabelname of the defect to read

◆ read_heating()

void belfem::Material::read_heating ( const string & aLibraryPath,
const string & aLabel )

Read a heating function from a plugin library.

Parameters
aLibraryPathpath to the shared library holding the heating function, resolved through material::data_file(): the run directory first, then $BELFEM_DATA/material, and otherwise handed to dlopen unchanged
aLabelname of the heating function; the library must export <label>_init( Material * )

◆ ref_density()

real belfem::Material::ref_density ( ) const
inline

Reference density at reference temperature.

Returns
Reference density [kg/m³]

Use this for thermal M-matrix calculations.

◆ reset_dependencies()

void belfem::Material::reset_dependencies ( const MaterialProperty aProperty)

Reset all dependencies for a property.

◆ reset_spline()

void belfem::Material::reset_spline ( const MaterialProperty aProperty)
protectedvirtual

◆ resistivity_law()

ResistivityLaw belfem::Material::resistivity_law ( ) const
inline

◆ return_zero()

real belfem::Material::return_zero ( const real T) const
inlineprotected

Shared binding for derivative channels that are identically zero.

Bound wherever a property is held constant, so that its first and higher derivatives vanish. One function rather than one clone per property and per derivative order.

◆ rho() [1/2]

real belfem::Material::rho ( const real T) const
inlinevirtual

Electrical resistivity (isotropic).

Parameters
TTemperature [K]
Returns
Electrical resistivity [Ω·m]

For HTS materials, use rho_powerlaw() instead.

Reimplemented in belfem::material::Alloy, and belfem::material::Metal.

◆ rho() [2/2]

real belfem::Material::rho ( const real T,
const real B,
const real beta ) const
inlinevirtual

Electrical resistivity for noble metals with magnetoresistance.

Parameters
TTemperature [K]
BMagnetic field magnitude [T]
betaAngle between field and current [rad]
Returns
Electrical resistivity [Ω·m]

NOTE: metals evaluate Kohler's rule directly; when a metal was constructed with tables enabled, set_RRR() builds <label>_RRR<n>.hdf5 and the field-dependent evaluation reads it instead. Alloys require the table.

Reimplemented in belfem::material::Alloy, and belfem::material::Metal.

◆ rho_const()

real belfem::Material::rho_const ( const real T) const
inlineprotected

◆ rho_custom()

real belfem::Material::rho_custom ( const real T) const
inlineprotectedvirtual

◆ rho_i()

real belfem::Material::rho_i ( const real T) const
inlinevirtual

Intrinsic (phonon) electrical resistivity of a metal, ρ = ρ_i(T) + ρ_0.

Parameters
TTemperature [K]
Returns
Intrinsic electrical resistivity [Ω·m]

◆ rho_i_custom()

real belfem::Material::rho_i_custom ( const real T) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ rho_i_spline()

real belfem::Material::rho_i_spline ( const real T) const
inlineprotected

◆ rho_kohler()

real belfem::Material::rho_kohler ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

◆ rho_piecewise() [1/8]

real belfem::Material::rho_piecewise ( const real normJ) const
inline

Piecewise resistivity for HTS (constant jc and n).

Three-regime resistivity (power law / flux-flow / normal) with a smooth Bezier transition in log–log space.

Parameters and return value are documented on the definition in powerlaws.hpp, together with the derivation and its references.

Use this for HTS materials instead of rho(T).

The pure power law diverges as \(J \rightarrow \infty\), which is unphysical above the critical regime: an HTS conductor saturates at the resistivity of its normal-state matrix once the superconductor is fully driven. This model splits the \(J\)-axis into three regimes connected smoothly in \((\log_{10} J,\,\log_{10}\rho)\) space:

  • Power-law regime \((J \le J_1)\): standard \(\rho_{PL}(J) = (E_c/J_c)\,(J/J_c)^{n-1}\).
  • Flux-flow transition \((J_1 < J \le J_3)\): a quadratic Bezier curve in \((\log_{10} J,\,\log_{10}\rho)\) connecting \((\log J_1, \log \rho_1)\) to \((\log J_3, \log \rho_n)\) with the middle control point at \((\log J_2, \log \rho_n)\).
  • Normal regime \((J > J_3)\): \(\rho = \rho_n(T)\).

The transition currents are

\[ J_1 \;=\; J_c \cdot 10^{D/n}, \qquad J_2 \;=\; J_1 \cdot \left(\rho_n / \rho_1\right)^{1/(n-1)}, \qquad J_3 \;=\; J_1 \cdot \left(\rho_n / \rho_1\right)^{1/N_{ff}}, \]

where the knee is placed a fixed \(D = 2.5\) decades above \(J_c\) ( hardcoded; the member mD is not consulted ) and mNff (default 3) controls the slope of the flux-flow regime. Above the assumed critical temperature \(T_{crit}\), only \(\rho_n\) is returned.

The Bezier parameter \(t \in [0,1]\) for a queried \(J\) is the positive root of \(a\,t^2 - 2\,b\,t - c = 0\) with \(a = \log J_1 - 2\log J_2 + \log J_3\), \(b = \log J_1 - \log J_2\), and \(c = \log J - \log J_1\). The actual resistivity is then

\[ \log_{10}\rho_{FF}(J) = (1-t)^2 \log\rho_1 + 2(1-t)\,t \log\rho_n + t^2 \log\rho_n . \]

This three-regime extension is BELFEM-specific; it complements the pure Rhyner power law (Messe et al. 2023, Sec. 2.6) so that the same material can be evaluated above the critical regime in quench simulations without numerical blow-up.

Parameters
normJcurrent-density magnitude \(|J|\) [A/m²]
Returns
effective electric resistivity [Ω·m]
Precondition
\(J_c > 0\) and \(n > 1\) (checked in debug mode).
The Bezier coefficient \(|a|\) must be non-degenerate (checked in debug mode for the flux-flow branch).

◆ rho_piecewise() [2/8]

real belfem::Material::rho_piecewise ( const real normJ,
const real T ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant: \(J_c(T)\) and \(n(T)\) from the user-supplied callbacks Material::jc_custom() / Material::n_custom().

◆ rho_piecewise() [3/8]

real belfem::Material::rho_piecewise ( const real normJ,
const real T,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.

◆ rho_piecewise() [4/8]

real belfem::Material::rho_piecewise ( const real normJ,
const real T,
real normB,
const real angleNxB ) const
inline

Piecewise resistivity for HTS (full temperature and field dependence).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant: both \(J_c\) and \(n\) come from JcFunction objects, and \(\rho_n\) is evaluated at the local temperature T.

Parameters
normJCurrent density magnitude [A/m²]
normBMagnetic field magnitude [T]
angleNxBAngle between surface normal and B [rad]
TTemperature [K]
Returns
Electrical resistivity [Ω·m]

◆ rho_piecewise() [5/8]

real belfem::Material::rho_piecewise ( const real normJ,
const real T,
real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).

◆ rho_piecewise() [6/8]

real belfem::Material::rho_piecewise ( const real normJ,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatially-dependent defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).

◆ rho_piecewise() [7/8]

real belfem::Material::rho_piecewise ( const real normJ,
real normB,
const real angleNxB ) const
inline

Piecewise resistivity for HTS (field-dependent jc, constant n).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) via mJcFunction; \(n\) remains constant.

Parameters
normJCurrent density magnitude [A/m²]
normBMagnetic field magnitude [T]
angleNxBAngle between surface normal and B [rad]
Returns
Electrical resistivity [Ω·m]

◆ rho_piecewise() [8/8]

real belfem::Material::rho_piecewise ( const real normJ,
real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation.

◆ rho_powerlaw() [1/8]

real belfem::Material::rho_powerlaw ( const real normJ) const
inline

Power law resistivity for HTS (constant jc and n).

Effective resistivity from the E–J power law (Rhyner 1993), parallel-combined with the normal-state resistivity.

Parameters and return value are documented on the definition in powerlaws.hpp, together with the derivation and its references.

Computes ρ = ( 1/ρ_n + 1/ρ_PL )^-1 with ρ_PL = (Ec/jc)·(J/jc)^(n-1) for constant jc and n ( parallel combination with the normal-state resistivity ρ_n, see powerlaws.hpp ). Use this for HTS materials instead of rho(T).

The intrinsic HTS power law is

\[ \rho_{PL}(J) \;=\; \frac{E_c}{J_c}\left(\frac{|J|}{J_c}\right)^{n-1}, \]

where \(E_c\) is the critical-field criterion (typically \(10^{-4}\) V/m), \(J_c\) is the critical current density and \(n\) is the resistive-transition exponent ( \(n \rightarrow 1\) → linear, \(n \rightarrow \infty\) → ideal critical-state).

To bound \(\rho\) from above as \(J \gg J_c\) and from below as \(J \rightarrow 0\), the effective resistivity is the parallel combination of \(\rho_{PL}\) with the normal-state resistivity \(\rho_n(T)\):

\[ \rho_{eff}(J) \;=\; \left(\frac{1}{\rho_n} + \frac{1}{\rho_{PL}}\right)^{-1}. \]

\(\rho_{PL}\) is floored at mRhoMin, which is ZERO by default (2026-08-10): a positive floor desynchronizes the value from drho_powerlaw_dJ, which differentiates the unfloored law — with the old 1e-16 the Newton tangent was wrong for all \(J \lesssim 0.87\,J_c\) on typical tape constants. Anyone raising mRhoMin again must also zero the derivative while the floor binds.

In this overload \(J_c\) and \(n\) are read as plain constants (configured via Material::set_constant) and \(\rho_n\) is evaluated at the global bulk temperature gTbulk.

Parameters
normJcurrent-density magnitude \(|J|\) [A/m²]
Returns
effective electric resistivity [Ω·m]
See also
Rhyner, Physica C 212 (1993) 292–300.
Messe et al., Supercond. Sci. Technol. 36 (2023) 114001, Sec. 2.6.

◆ rho_powerlaw() [2/8]

real belfem::Material::rho_powerlaw ( const real normJ,
const real T ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only variant.

\(J_c(T)\) and \(n(T)\) are obtained from the user-supplied callbacks Material::jc_custom() and Material::n_custom(), allowing materials with bespoke analytic \(T\)-laws (e.g. Kim-style fits) without going through a JcFunction.

◆ rho_powerlaw() [3/8]

real belfem::Material::rho_powerlaw ( const real normJ,
const real T,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Temperature-only custom-callback variant with spatial defect modulation.

◆ rho_powerlaw() [4/8]

real belfem::Material::rho_powerlaw ( const real normJ,
const real T,
real normB,
const real angleNxB ) const
inline

Power law resistivity for HTS (full temperature and field dependence).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully field- and temperature-dependent variant: \(J_c = J_c(|B|, \angle, T)\) and \(n = n(|B|, \angle, T)\), both supplied via mJcFunction / mNFunction.

Parameters
normJCurrent density magnitude [A/m²]
normBMagnetic field magnitude [T]
angleNxBAngle between surface normal and B [rad]
TTemperature [K]
Returns
Electrical resistivity [Ω·m]

Computes ρ = ( 1/ρ_n + 1/ρ_PL )^-1 with ρ_PL = (Ec/jc)·(J/jc)^(n-1) where jc = jc(B, angle, T) and n = n(B, angle, T).

\(\rho_n\) is evaluated at the local temperature T (not gTbulk).

◆ rho_powerlaw() [5/8]

real belfem::Material::rho_powerlaw ( const real normJ,
const real T,
real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Fully \((|B|, \angle, T)\)-dependent variant with spatial defect modulation applied to \(J_c\).

◆ rho_powerlaw() [6/8]

real belfem::Material::rho_powerlaw ( const real normJ,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Constant \(J_c\) / \(n\) with spatially-dependent defect modulation \(J_c \rightarrow J_c \cdot d(x,y,z,t)\).

◆ rho_powerlaw() [7/8]

real belfem::Material::rho_powerlaw ( const real normJ,
real normB,
const real angleNxB ) const
inline

Power law resistivity for HTS (field-dependent jc, constant n).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent critical current: \(J_c = J_c(|B|, \angle(n,B))\) supplied via mJcFunction.

Parameters
normJCurrent density magnitude [A/m²]
normBMagnetic field magnitude [T]
angleNxBAngle between surface normal and B [rad]
Returns
Electrical resistivity [Ω·m]

Computes ρ = ( 1/ρ_n + 1/ρ_PL )^-1 with ρ_PL = (Ec/jc)·(J/jc)^(n-1) where jc = jc(B, angle).

\(n\) remains a constant.

◆ rho_powerlaw() [8/8]

real belfem::Material::rho_powerlaw ( const real normJ,
real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Field-dependent \(J_c(|B|, \angle)\) with spatial defect modulation.

◆ rho_riva() [1/2]

real belfem::Material::rho_riva ( const real normJ,
const real T,
const real normB,
const real angleNxB ) const
inline

Riva-law resistivity: the superconducting power-law channel in parallel with the normal-state channel.

Returns
ρ = ρ_PL·ρ_n / ( ρ_PL + ρ_n ) [Ω·m]

The parallel combination of Duron et al. 2004, used by Riva 2021 (EPFL thesis 8754, Eq. 5.4). Same model core as rho_powerlaw, but total over the full table range: jc_eff ≤ 0 or nonfinite (dead defect, underflow) falls back to the fully normal branch, the power-law channel is evaluated in log10 space with an overflow early-out, and n arrives pre-floored at 1 from n_eval (ohmic limit ρ_PL = ec/jc, J-independent). Only the assembly-path signatures (J,T,|B|,θ) ± defect exist; jc and n arrive through the usual dependency routing ( table or constants ).

◆ rho_riva() [2/2]

real belfem::Material::rho_riva ( const real normJ,
const real T,
const real normB,
const real angleNxB,
const real x,
const real y,
const real z,
const real t ) const
inline

defect overload: jc_eff = D(x,y,z,t)·jc throughout

◆ rho_spline()

real belfem::Material::rho_spline ( const real T) const
inlineprotectedvirtual

◆ rho_table()

real belfem::Material::rho_table ( const real T,
const real normB,
const real angleJxB ) const
protectedvirtual

Reimplemented in belfem::material::Metal.

◆ riva_rho_pl()

bool belfem::Material::riva_rho_pl ( const real normJ,
const real jc,
const real n,
const real ec,
real & rhoPL ) const
inlineprotected

shared riva kernel: power-law channel resistivity in log10 space. Returns false when the channel has overflowed past the normal state ( caller takes the fully-normal branch: ρ = ρn )

◆ Rp02()

real belfem::Material::Rp02 ( real T = gTroom) const
inlinevirtual

Yield stress (0.2% offset).

Parameters
TTemperature [K] (default: room temperature)
Returns
Yield stress Rp0.2 [Pa]

◆ Rp02_const()

real belfem::Material::Rp02_const ( const real T) const
inlineprotected

◆ Rp02_custom()

real belfem::Material::Rp02_custom ( const real T) const
protectedvirtual

◆ Rp02_spline()

real belfem::Material::Rp02_spline ( const real T) const
inlineprotected

◆ set_bh_curve()

void belfem::Material::set_bh_curve ( const material::BhCurve * aCurve)
virtual

Assign a B-H curve to this material.

Parameters
aCurvePointer to B-H curve (material takes ownership)

IMPORTANT: Material takes ownership and will delete the curve.

Virtual so that load_bh_curve() (defined on the base) dispatches to the B-H-capable override in Metal; the base implementation errors.

Reimplemented in belfem::material::Metal.

◆ set_constant()

void belfem::Material::set_constant ( const MaterialProperty aProperty,
const real aValue )

Define a property as constant.

◆ set_custom()

void belfem::Material::set_custom ( const MaterialProperty aProperty)

Mark property as using custom evaluation function.

◆ set_dependency()

void belfem::Material::set_dependency ( const MaterialProperty aProperty,
const MaterialDependency aDependency )

Add a dependency to a property.

◆ set_have()

void belfem::Material::set_have ( const MaterialProperty aProperty,
const bool aHave = true )

Mark a property as available.

◆ set_jc_function()

void belfem::Material::set_jc_function ( const material::JcFunction * aFunction)

Assign a critical current density function.

Parameters
aFunctionPointer to Jc function (material takes ownership)

IMPORTANT: Material takes ownership and will delete the function.

◆ set_label()

void belfem::Material::set_label ( const string & aLabel)

PROTECTED INTERFACE FOR DERIVED MATERIALS.

This section contains utility functions for derived material classes to set up their properties. The Material class uses a strategy pattern where properties can be:

  1. Constant - stored directly in mConstantProperties
  2. Spline-interpolated - using tabulated data
  3. Custom - using specialized functions in derived classes

When a property is set up, the appropriate function pointer is assigned (e.g., mFunctionRho points to rho_const, rho_spline, or rho_custom).

Set material label (for derived classes)

◆ set_n_function()

void belfem::Material::set_n_function ( const material::JcFunction * aFunction)

Assign a power law exponent function.

Parameters
aFunctionPointer to n function (material takes ownership)

IMPORTANT: Material takes ownership and will delete the function.

◆ set_number()

void belfem::Material::set_number ( const string & aNumber)

Set material number/identifier (for derived classes).

◆ set_piecewise()

void belfem::Material::set_piecewise ( const bool aUsePiecewise)

◆ set_resistivity_law()

void belfem::Material::set_resistivity_law ( const ResistivityLaw aLaw)

◆ set_RRR()

void belfem::Material::set_RRR ( const real RRR)
virtual

Set the residual resistivity ratio (for noble metals).

Parameters
RRRResidual resistivity ratio (ρ(273K)/ρ(0K))

Reimplemented in belfem::material::Metal.

◆ set_table_flags()

void belfem::Material::set_table_flags ( const bool aFlag)
virtual

Reimplemented in belfem::material::Metal.

◆ set_user_defined_defect()

void belfem::Material::set_user_defined_defect ( DefectFunc * Function)

Set a user-defined defect function with x, y, z, t dependencies.

Parameters
FunctionPointer to user function with signature: real(real, real, real, real)

◆ set_user_defined_function() [1/3]

void belfem::Material::set_user_defined_function ( const MaterialProperty Property,
const MaterialDependency Dependency,
MatFunc1 * Function )
virtual

Set a user-defined function with one dependency (for UserDefinedMaterial).

This method is primarily used by UserDefinedMaterial to assign custom property evaluation functions. Most users should not call this directly; instead, use MaterialFactory::create_material() with a user library.

Parameters
PropertyThe material property to define
DependencyThe dependency type (typically MaterialDependency::T)
FunctionPointer to user function with signature: real(const Material*, real)
Note
This is a virtual method overridden by UserDefinedMaterial

Reimplemented in belfem::material::UserDefinedMaterial.

◆ set_user_defined_function() [2/3]

void belfem::Material::set_user_defined_function ( const MaterialProperty Property,
const MaterialDependency Dependency1,
const MaterialDependency Dependency2,
const MaterialDependency Dependency3,
MatFunc3 * Function )
virtual

Set a user-defined function with three dependencies (for UserDefinedMaterial).

This method is primarily used by UserDefinedMaterial to assign custom property evaluation functions for three-parameter properties like rho(T,B,angle).

Parameters
PropertyThe material property to define
Dependency1First dependency
Dependency2Second dependency
Dependency3Third dependency
FunctionPointer to user function with signature: real(const Material*, real, real, real)
Note
This is a virtual method overridden by UserDefinedMaterial

Reimplemented in belfem::material::UserDefinedMaterial.

◆ set_user_defined_function() [3/3]

void belfem::Material::set_user_defined_function ( const MaterialProperty Property,
const MaterialDependency Dependency1,
const MaterialDependency Dependency2,
MatFunc2 * Function )
virtual

Set a user-defined function with two dependencies (for UserDefinedMaterial).

This method is primarily used by UserDefinedMaterial to assign custom property evaluation functions for two-parameter properties like mu(H,T) or jc(B,angle).

Parameters
PropertyThe material property to define
Dependency1First dependency
Dependency2Second dependency
FunctionPointer to user function with signature: real(const Material*, real, real)
Note
This is a virtual method overridden by UserDefinedMaterial

Reimplemented in belfem::material::UserDefinedMaterial.

◆ set_user_defined_heating()

void belfem::Material::set_user_defined_heating ( HeatFunc * Function)

Set a user-defined volumetric heat load [ W/m³ ] as a function of x, y, z [ m ] and t [ s ].

Parameters
FunctionPointer to user function with signature: real(real, real, real, real)

◆ set_user_defined_polynomial() [1/2]

void belfem::Material::set_user_defined_polynomial ( const MaterialProperty Property,
const Cell< real > & Coefficients )
virtual

◆ set_user_defined_polynomial() [2/2]

void belfem::Material::set_user_defined_polynomial ( const MaterialProperty Property,
const std::vector< real > & Coefficients )
virtual

Set a polynomial function for a property (for UserDefinedMaterial).

Defines a property as a polynomial in temperature: f(T) = c₀T^n + c₁T^(n-1) + ... + c_n This is a convenience function for user-defined materials.

IMPORTANT: Coefficients are in DESCENDING order (MATLAB style), highest degree first.

Parameters
PropertyThe material property to define
CoefficientsPolynomial coefficients [c₀, c₁, c₂, ...] in DESCENDING order (highest degree first)
Note
This is a virtual method overridden by UserDefinedMaterial

Reimplemented in belfem::material::UserDefinedMaterial.

◆ spline_property()

real belfem::Material::spline_property ( const MaterialProperty aProperty,
const real aX ) const
virtual

Evaluate property using spline interpolation.

Reimplemented in belfem::material::Metal, and belfem::material::SplineLookupTable.

◆ type()

MaterialType belfem::Material::type ( ) const
inline

Get the material type.

Returns
Material type (Ferro, HTS, PureMetal, etc.)

◆ unflag()

void belfem::Material::unflag ( const uint8_t aIndex = 0)
inline

Clear flag.

◆ use_piecewise()

bool belfem::Material::use_piecewise ( ) const
inline

Check if we use piecewise instead of power-law.

Returns
True if a we use piecewise resistivity

◆ use_riva()

bool belfem::Material::use_riva ( ) const
inline

◆ volumetric_heatload()

real belfem::Material::volumetric_heatload ( const real x,
const real y,
const real z,
const real time ) const
inline

Artificial volumetric heat load [ W/m³ ] from the heating plugin.

Member Data Documentation

◆ mFunctionDMuDH

void(Material::*) belfem::Material::mFunctionDMuDH(double, double &, double &) const = nullptr
protected

◆ mFunctiondRhoKohlerdB

real(Material::*) belfem::Material::mFunctiondRhoKohlerdB(const real T, const real normB, const real angle) const = nullptr
protected

◆ mFunctiondRhoKohlerdbeta

real(Material::*) belfem::Material::mFunctiondRhoKohlerdbeta(const real T, const real normB, const real angle) const = nullptr
protected

◆ mFunctiondRhoKohlerdT

real(Material::*) belfem::Material::mFunctiondRhoKohlerdT(const real T, const real normB, const real angle) const = nullptr
protected

◆ mFunctionH

real(Material::*) belfem::Material::mFunctionH(const real B) const = nullptr
protected

◆ mFunctionMu

real(Material::*) belfem::Material::mFunctionMu(const real H, const real T) const = nullptr
protected

◆ mFunctionRhoKohler

real(Material::*) belfem::Material::mFunctionRhoKohler(const real T, const real normB, const real angle) const = nullptr
protected

◆ mJcFunction

const material::JcFunction* belfem::Material::mJcFunction = nullptr
protected

◆ mNFunction

const material::JcFunction* belfem::Material::mNFunction = nullptr
protected

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