User-defined material loaded from external shared library. More...
#include <cl_Material_UserDefined.hpp>
Public Member Functions | |
| UserDefinedMaterial (const string &aLibraryPath, const string &aLabel) | |
| Constructor - loads and initializes user-defined material. | |
| ~UserDefinedMaterial () override | |
| Destructor - closes the dynamically loaded library. | |
| void | set_user_defined_function (const MaterialProperty Property, const MaterialDependency Dependency, MatFunc1 *Function) override |
| Set a user-defined function with one dependency (typically temperature). | |
| void | set_user_defined_function (const MaterialProperty Property, const MaterialDependency Dependency1, const MaterialDependency Dependency2, MatFunc2 *Function) override |
| Set a user-defined function with two dependencies. | |
| void | set_user_defined_function (const MaterialProperty Property, const MaterialDependency Dependency1, const MaterialDependency Dependency2, const MaterialDependency Dependency3, MatFunc3 *Function) override |
| Set a user-defined function with three dependencies. | |
| void | set_user_defined_polynomial (const MaterialProperty Property, const Cell< real > &Coefficients) override |
| Set a polynomial function for a material property. | |
| void | set_user_defined_polynomial (const MaterialProperty Property, const std::vector< real > &Coefficients) override |
| Set a polynomial function for a property (for UserDefinedMaterial). | |
| real | evaluate_polynomial (const MaterialProperty Property, const real T) const override |
| Evaluate a polynomial function for a given property and temperature. | |
| real | evaluate_derivative_of_polynomial (const MaterialProperty Property, const real T) const override |
| Public Member Functions inherited from belfem::Material | |
| 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 | |
| Material & | operator= (const Material &)=delete |
| Material (Material &&)=delete | |
| Material & | operator= (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 MaterialDependencyBitset * | dependencies (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 string & | label () const |
| Get material label. | |
| const string & | number () 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 |
| 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. | |
| 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) |
| 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 | E_custom (const real T) const override |
| Custom Young's modulus evaluation - calls user function. | |
| real | nu_custom (const real T) const override |
| Custom Poisson's ratio evaluation - calls user function. | |
| real | cp_custom (const real T) const override |
| Custom specific heat evaluation - calls user function. | |
| real | lambda_custom (const real T) const override |
| Custom thermal conductivity evaluation (temperature only) - calls user function. | |
| real | lambda_custom (const real T, const real normB, const real angle) const override |
| Custom thermal conductivity evaluation (with field) - calls user function. | |
| real | rho_custom (const real T) const override |
| Custom electrical resistivity evaluation (temperature only) - calls user function. | |
| real | rho_kohler (const real T, const real normB, const real angle) const override |
| Custom electrical resistivity evaluation (with field) - calls user function. | |
| real | jc_custom (const real T) const override |
| Custom jc evaluation (temperature only) - calls user function. | |
| real | n_custom (const real T) const override |
| Custom n evaluation (temperature only) - calls user function. | |
| real | alpha_custom (const real T) const override |
| Custom thermal expansion coefficient evaluation - calls user function. | |
| real | Rp02_custom (const real T) const override |
| Custom 0.2% proof stress evaluation - calls user function. | |
| real | mu_custom (const real H, const real T) const override |
| Custom magnetic permeability evaluation - dispatches to polynomial or user function. | |
| Protected Member Functions inherited from belfem::Material | |
| 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 | 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 | dlambdadT_custom (const real T) const |
| real | drhodT_finite_difference (const real T) const |
| real | rho_const (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 | 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_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 |
| 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 | dEdT_custom (const real T) const |
| real | nu_const (const real T) const |
| real | nu_spline (const real T) const |
| real | alpha_const (const real T) const |
| real | alpha_spline (const real T) const |
| real | Rp02_const (const real T) const |
| real | Rp02_spline (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) |
Additional Inherited Members | |
| Protected Attributes inherited from belfem::Material | |
| 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::JcFunction * | mJcFunction = nullptr |
| const material::JcFunction * | mNFunction = nullptr |
User-defined material loaded from external shared library.
This class enables users to define custom materials by implementing property functions in a separate shared library (.so on Linux, .dylib on macOS). The library is dynamically loaded at runtime using dlopen.
LOADING MECHANISM: The library must contain an initialization function with the signature:
where <label> is the material label provided to the constructor.
PROPERTY DEFINITION: Within the init function, users can define material properties using:
SUPPORTED PROPERTIES:
Example user library (mymat.cpp):
Compile as shared library. An installed BELFEM keeps the module layout under include/belfem, and the headers include each other by bare name, so three directories are needed:
The shipped share/belfem/templates/UserMaterialTemplate.cmake does this for both an installed prefix and a source tree.
Usage in BELFEM:
| belfem::material::UserDefinedMaterial::UserDefinedMaterial | ( | const string & | aLibraryPath, |
| const string & | aLabel ) |
Constructor - loads and initializes user-defined material.
Dynamically loads the shared library at aLibraryPath and calls the initialization function "\<aLabel\>_init" to configure material properties.
| aLibraryPath | Path to shared library (.so, .dylib, .dll) |
| aLabel | Material label (must match init function name) |
| Error | if library cannot be loaded or init function not found |
|
override |
Destructor - closes the dynamically loaded library.
|
inlineoverrideprotectedvirtual |
Custom thermal expansion coefficient evaluation - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom specific heat evaluation - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom Young's modulus evaluation - calls user function.
Reimplemented from belfem::Material.
|
inlineoverridevirtual |
Reimplemented from belfem::Material.
|
inlineoverridevirtual |
Evaluate a polynomial function for a given property and temperature.
Internal method used by polynomial-based property evaluations. Uses Horner's method for efficient polynomial evaluation.
| Property | The material property |
| T | Temperature [K] |
| Error | if polynomial for this property is not defined |
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom jc evaluation (temperature only) - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom thermal conductivity evaluation (temperature only) - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom thermal conductivity evaluation (with field) - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom magnetic permeability evaluation - dispatches to polynomial or user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom n evaluation (temperature only) - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom Poisson's ratio evaluation - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom electrical resistivity evaluation (temperature only) - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom electrical resistivity evaluation (with field) - calls user function.
Reimplemented from belfem::Material.
|
inlineoverrideprotectedvirtual |
Custom 0.2% proof stress evaluation - calls user function.
Reimplemented from belfem::Material.
|
overridevirtual |
Set a user-defined function with one dependency (typically temperature).
Assigns a custom function for evaluating a material property. The function receives the material pointer and one parameter (typically temperature).
Supported properties: E, nu, cp, lambda, rho, alpha, Rp02
| Property | The material property to define |
| Dependency | The dependency type (must be MaterialDependency::T) |
| Function | Pointer to user function: real(const Material*, real) |
| Error | if Dependency is not T, or if Property is jc or n (those take the field-dependent overloads below) |
Example:
Reimplemented from belfem::Material.
|
overridevirtual |
Set a user-defined function with three dependencies.
Assigns a custom function for evaluating a material property with three parameters. Currently supports:
Argument order differs by property: lambda/rho take (T, normB, angleBxJ); jc/n take (normB, angleNxB, T).
| Property | The material property to define |
| Dependency1 | First dependency (T for lambda/rho, normB for jc/n) |
| Dependency2 | Second dependency (normB for lambda/rho, angleNxB for jc/n) |
| Dependency3 | Third dependency (angleBxJ for lambda/rho, T for jc/n) |
| Function | Pointer to user function: real(const Material*, real, real, real) |
| Error | if property or dependency combination is not supported |
Example:
Reimplemented from belfem::Material.
|
overridevirtual |
Set a user-defined function with two dependencies.
Assigns a custom function for evaluating a material property with two parameters. Currently supports:
| Property | The material property to define (mu, jc, or n) |
| Dependency1 | First dependency (normH for mu, normB for jc/n) |
| Dependency2 | Second dependency (T for mu, angleNxB for jc/n) |
| Function | Pointer to user function: real(const Material*, real, real) |
| Error | if property or dependency combination is not supported |
Example:
Reimplemented from belfem::Material.
|
overridevirtual |
Set a polynomial function for a material property.
Defines a property as a polynomial in temperature: f(T) = c₀T^n + c₁T^(n-1) + ... + c_n This is a convenience function that internally creates a user function using polyval().
IMPORTANT: Coefficients are in DESCENDING order (MATLAB style), highest degree first.
Supported properties: E, nu, cp, lambda, mu, rho, alpha, Rp02
| Property | The material property to define |
| Coefficients | Polynomial coefficients [c₀, c₁, c₂, ...] in DESCENDING order (highest degree first) |
| Error | if property does not support polynomial definition |
Example:
Reimplemented from belfem::Material.
|
overridevirtual |
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.
| Property | The material property to define |
| Coefficients | Polynomial coefficients [c₀, c₁, c₂, ...] in DESCENDING order (highest degree first) |
Reimplemented from belfem::Material.