BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_Material_Nickel.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California, through
4 * Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_MATERIAL_NICKEL_HPP
13#define BELFEM_CL_MATERIAL_NICKEL_HPP
14
15
17#include "cl_Bezier.hpp"
18
19namespace belfem
20{
21 namespace material
22 {
23 class Nickel : public Ferromagnetic
24 {
25 Bezier * mReducedMagnetization = nullptr ;
26 Bezier * mThermalExpansion = nullptr ;
27 Vector< real > mThermalExpansionCryo ;
28
29 // debye temperature
30 Vector< real > mDebyePoly ;
31
32 Vector< real > mBSKohlerSwitch ;
33 Bezier * mKohlerLongBezier = nullptr ;
34 Cell< Vector< real > > mKohlerLongPolys ;
35 Cell< Vector< real > > mKohlerTransPolys ;
36
37 Cell< Vector< real > > mYoungData ;
38 Bezier * mYoungBezier = nullptr ;
39
40 public:
41
43 const bool aBuildTables = true );
44
45 ~Nickel() override;
46
47 protected :
48
49 real
50 compute_mred( real T ) const override;
51
52 real
53 alpha_custom( const real T ) const override ;
54
55 real
56 debye_custom(const real T) const override ;
57
58 real
59 kohler( const real B, const real S, const real beta ) const override ;
60
61 real
62 E_custom( const real T ) const override;
63
64 real
65 dEdT_custom( const real T ) const override;
66 private:
67
68 void
69 create_magnetization_curve();
70
71 void
72 set_constants();
73
74 void
75 create_alpha();
76
77 void
78 create_cp();
79
80 void
81 create_debye_and_rho();
82
83 void
84 create_kohler();
85
86 void
87 create_young();
88
89 };
90
91 inline real Nickel::compute_mred( real T ) const
92 {
94 if ( T > Tc + BELFEM_EPSILON ) return 0.0 ;
95 return mReducedMagnetization->y( T / Tc );
96 }
97
98 inline real Nickel::debye_custom( const real T) const
99 {
100 return polyval( mDebyePoly, T );
101 }
102
103 inline real
104 Nickel::E_custom( const real T ) const
105 {
106 if ( T < BELFEM_EPSILON ) return mYoungData( 0 )( 0 );
107 if ( T < mYoungBezier->basis_x()( 0 ) )
108 {
109 const Vector< real > & p = mYoungData( 0 );
110 return p( 0 ) - p( 1 ) * T * std::exp( -p( 2 ) / T );
111 }
112 if ( T < mYoungBezier->basis_x()( 3 ) )
113 {
114 return mYoungBezier->y( T );
115 }
116 const Vector< real > & p = mYoungData( 1 );
117 return p( 0 ) - p( 1 ) * T * std::exp( -p( 2 ) / T );
118 }
119
120 inline real
121 Nickel::dEdT_custom( const real T ) const
122 {
123 if ( T < BELFEM_EPSILON ) return 0.0 ;
124 if ( T < mYoungBezier->basis_x()( 0 ) )
125 {
126 const Vector< real > & p = mYoungData( 0 );
127 return - p( 1 ) * std::exp( -p( 2 ) / T ) * ( T + p( 2 ) ) / T ;
128 }
129 if ( T < mYoungBezier->basis_x()( 3 ) )
130 {
131 return mYoungBezier->dydx( T );
132 }
133 const Vector< real > & p = mYoungData( 1 );
134 return - p( 1 ) * std::exp( -p( 2 ) / T ) * ( T + p( 2 ) ) / T ;
135 }
136
137 }
138}
139
140#endif //BELFEM_CL_MATERIAL_NICKEL_HPP
Definition cl_Bezier.hpp:30
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
real constant_property(const MaterialProperty aProperty) const
Get constant property value.
Definition cl_Material.hpp:1787
Ferromagnetic(const string &aLabel, const bool aBuildTables=true)
Definition cl_Material_Ferromagnetic.cpp:18
real E_custom(const real T) const override
Definition cl_Material_Nickel.hpp:104
real kohler(const real B, const real S, const real beta) const override
Kohler function for magnetoresistance.
Definition cl_Material_Nickel.cpp:262
real alpha_custom(const real T) const override
Definition cl_Material_Nickel.cpp:169
real compute_mred(real T) const override
Definition cl_Material_Nickel.hpp:91
Nickel(const real RRR=BELFEM_QUIET_NAN, const bool aBuildTables=true)
Definition cl_Material_Nickel.cpp:19
real debye_custom(const real T) const override
Definition cl_Material_Nickel.hpp:98
real dEdT_custom(const real T) const override
Definition cl_Material_Nickel.hpp:121
Definition cl_BhCurve.cpp:19
T polyval(const std::vector< T > &coeffs, const T x)
Definition cl_Material_UserDefined.hpp:28
USER GUIDES:
Definition cl_Capacitor.cpp:16
constexpr real BELFEM_EPSILON
Definition typedefs.hpp:90
@ Tcurie
Definition cl_Material.hpp:188
@ RRR
Definition cl_Material.hpp:182
double real
Definition typedefs.hpp:36
#define BELFEM_QUIET_NAN
Definition typedefs.hpp:87