Base class for critical current density (Jc) and n-value functions. More...
#include <cl_JcFunction.hpp>
Public Member Functions | |
| JcFunction ()=default | |
| Default constructor. | |
| virtual | ~JcFunction ()=default |
| Virtual destructor. | |
| bool | depends_on (const JcParameter aParameter) const |
| Check if function depends on a parameter. | |
| virtual real | min_value () const |
| Smallest value this function can return, when known. | |
| bool | is_constant () const |
| Check if function is constant (no dependencies). | |
| virtual real | eval (const real normB, const real angle) const |
| Evaluate with field and angle dependence. | |
| virtual real | eval (const real normB, const real angle, const real T) const |
| Evaluate with full temperature, field, and angle dependence. | |
| virtual real | deval_dB (const real normB, const real angle, const real T) const |
| Derivative of eval with respect to the field magnitude. | |
| virtual real | deval_dbeta (const real normB, const real angle, const real T) const |
| Derivative of eval with respect to the field angle. | |
| virtual real | deval_dT (const real normB, const real angle, const real T) const |
| Derivative of eval with respect to temperature. | |
Protected Member Functions | |
| void | set_dependency (const JcParameter aParameter) |
| Mark function as depending on a parameter. | |
Protected Attributes | |
| JcDependency | mDependency |
Base class for critical current density (Jc) and n-value functions.
This abstract base class provides the interface for computing:
The same class is used for both properties since they have identical functional dependencies and evaluation signatures.
Both eval() methods have default implementations that throw errors. Derived classes override the appropriate method(s) based on their dependency set:
The Material class calls the appropriate eval() based on the dependency flags queried via depends_on().
Material takes ownership of assigned JcFunction objects:
|
default |
Default constructor.
|
virtualdefault |
Virtual destructor.
|
inline |
Check if function depends on a parameter.
| aParameter | Parameter to check (normB, angleNxB, or T) |
|
virtual |
Derivative of eval with respect to the field magnitude.
| normB | Magnetic field magnitude [T] |
| angle | Angle between surface normal and field [rad] |
| T | Temperature [K] |
The base implementation returns 0, which is EXACT for constant functions and the conservative fallback for derived classes that have not implemented an analytic form ( ModifiedKim, UserDefined ): a zero here reproduces the pre-lookup-derivative tangent for that function rather than inventing a wrong one. Unlike eval(), it does not abort — the Newton consumer ( add_rho_field_tangent ) treats 0 as "no field channel" and early-outs.
Reimplemented in belfem::material::JcFunctionDatabase.
|
virtual |
Derivative of eval with respect to the field angle.
Same zero-default contract as deval_dB. NOTE: for HTS the angle is bn_angle ( field to tape normal, UNFOLDED [ 0, pi ] since 2026-08-16 ), and the existing Newton kernel differentiates bj_angle ( field to current, the metal Kohler variable ) — so this hook must NOT be wired into add_rho_field_tangent's beta channel until a signed bn_angle d(theta)/dq chain exists there ( 2026-08-13 audit, both voices; known residual ).
Reimplemented in belfem::material::JcFunctionDatabase.
|
virtual |
Derivative of eval with respect to temperature.
Same zero-default contract as deval_dB.
Reimplemented in belfem::material::JcFunctionDatabase.
Evaluate with field and angle dependence.
| normB | Magnetic field magnitude [T] |
| angle | Angle between surface normal and field [rad] |
Reimplemented in belfem::material::JcFunctionModifiedKim, and belfem::material::JcFunctionUserDefined.
|
virtual |
Evaluate with full temperature, field, and angle dependence.
| normB | Magnetic field magnitude [T] |
| angle | Angle between surface normal and field [rad] |
| T | Temperature [K] |
Reimplemented in belfem::material::JcFunctionDatabase, and belfem::material::JcFunctionUserDefined.
|
inline |
Check if function is constant (no dependencies).
|
inlinevirtual |
Smallest value this function can return, when known.
Used by Material::set_n_function for a load-time sanity warning on measured n tables that soften toward n = 1.
Reimplemented in belfem::material::JcFunctionDatabase.
|
protected |
Mark function as depending on a parameter.
| aParameter | Parameter to add to dependency set |
Used by derived class constructors to declare which parameters their implementation depends on.
|
protected |