User-defined critical current density (Jc) or power law exponent (n) function.
More...
|
| | JcFunctionUserDefined (Material *Mat) |
| | Constructor.
|
| | JcFunctionUserDefined (const JcFunctionUserDefined &)=delete |
| JcFunctionUserDefined & | operator= (const JcFunctionUserDefined &)=delete |
| | ~JcFunctionUserDefined () override=default |
| real | eval (const real normB, const real angle) const override |
| | Evaluate the function (2-parameter version).
|
| real | eval (const real normB, const real angle, const real T) const override |
| | Evaluate the function (3-parameter version).
|
| void | set_jc_function (MatFunc2 *Function) |
| | Set the user-defined function pointer (2-parameter version).
|
| void | set_jc_function (MatFunc3 *Function) |
| | Set the user-defined function pointer (3-parameter version).
|
| | JcFunction ()=default |
| virtual | ~JcFunction ()=default |
| bool | depends_on (const JcParameter aParameter) const |
| virtual real | min_value () const |
| | Smallest value this function can return, when known.
|
| bool | is_constant () const |
| 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.
|
User-defined critical current density (Jc) or power law exponent (n) function.
This class provides a wrapper for user-defined functions that compute Jc or n for superconducting materials. It supports both 2-parameter and 3-parameter function signatures:
- MatFunc2: f(Material*, normB, angle) - Field and angle dependent
- MatFunc3: f(Material*, normB, angle, T) - Field, angle, and temperature dependent
ANGLE CONTRACT: The angle is the unfolded field-to-tape-normal angle θ ∈ [0, π], not a folded angle in [0, π/2]. A function even in θ (cos² and sin² only) is unchanged. A function that uses cos(θ) linearly or assumes θ ≤ π/2 must fold the angle internally.
The user provides a function pointer that will be called to evaluate the property. This allows complete customization while maintaining compatibility with the material framework.
IMPORTANT: This class is typically created and managed by UserDefinedMaterial. The material owns the JcFunctionUserDefined instance and will delete it.
Example usage (within a user-defined material library):
return 1e9 / (1.0 + B/5.0) * exp(-T/90.0);
}
extern "C" void MyMaterial_init(
Material* mat) {
&my_jc_function
);
}
Base class for all materials in BELFEM.
Definition cl_Material.hpp:270
virtual void set_user_defined_function(const MaterialProperty Property, const MaterialDependency Dependency, MatFunc1 *Function)
Set a user-defined function with one dependency (for UserDefinedMaterial).
Definition cl_Material.cpp:755
@ angleNxB
Definition cl_Material.hpp:128
@ normB
Definition cl_Material.hpp:126
@ T
Definition cl_Material.hpp:125
@ jc
Definition cl_Material.hpp:186
double real
Definition typedefs.hpp:36