BELFEM 0.9.3
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_Material_Lead.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_LEAD_HPP
13#define BELFEM_CL_MATERIAL_LEAD_HPP
14
15#include "cl_Material_Metal.hpp"
16#include "cl_Bezier.hpp"
17#include "fn_polyval.hpp"
18namespace belfem
19{
20 namespace material
21 {
43 class Lead : public Metal
44 {
45 // debye temperature
46 Cell< Vector< real > > mDebyePolys ;
47 Vector< real > mTDebyeSwitch ;
48
49 Bezier * mThermalExpansion = nullptr ;
50 Vector< real > mThermalExpansionCryo ;
51 Bezier * mDebyeTemperature = nullptr ;
52
53 Cell< Vector< real > > mKohlerLongPolys ;
54 Cell< Vector< real > > mKohlerTransPolys ;
55 Vector< real > mBSKohlerLongSwitch ;
56 Vector< real > mBSKohlerTransSwitch ;
57 public:
59 const bool aBuildTables = true );
60
61 ~Lead() override;
62
63 protected:
64
65 real
66 alpha_custom( const real T ) const override ;
67
68 real
69 debye_custom(const real T) const override;
70
71 real
72 kohler( const real B, const real S, const real beta ) const override ;
73 private:
74
75 void
76 set_constants();
77
78 void
79 create_alpha();
80
81 void
82 create_cp();
83
84 void
85 create_debye();
86
87 void
88 create_kohler();
89 };
90
91 inline real
92 Lead::kohler( const real B, const real S, const real beta ) const
93 {
94 if ( B < BELFEM_EPSILON ) return 0.0 ;
95
96 real BS = B * S ;
97
98 real Along ;
99
100 if ( BS < mBSKohlerLongSwitch( 0 ) )
101 {
102 Along = polyval( mKohlerLongPolys(0), BS );
103 }
104 else if ( BS < mBSKohlerLongSwitch( 1 ) )
105 {
106 Along = std::exp( polyval( mKohlerLongPolys(1), std::log(BS) ) );
107 }
108 else
109 {
110 Along = polyval( mKohlerLongPolys(2), BS );
111 }
112
113 real Atrans ;
114 if ( BS < mBSKohlerTransSwitch( 0 ) )
115 {
116 Atrans = polyval( mKohlerTransPolys(0), BS );
117 }
118 else
119 {
120 Atrans = std::exp( polyval( mKohlerTransPolys(1), std::log(BS) ) );
121 }
122
123 real c = std::cos( beta );
124 real c2 = c*c ;
125 real s2 = 1.0 - c2 ;
126
127 // Pippard's angular interpolation formula
128 return Along * c2 + Atrans * s2 ;
129 }
130
131 }
132}
133#endif //BELFEM_CL_MATERIAL_LEAD_HPP
Definition cl_Bezier.hpp:30
A bounds-checked wrapper around std::vector.
Definition cl_Cell.hpp:45
real debye_custom(const real T) const override
Definition cl_Material_Lead.cpp:279
Lead(const real RRR=BELFEM_QUIET_NAN, const bool aBuildTables=true)
Definition cl_Material_Lead.cpp:25
real alpha_custom(const real T) const override
Definition cl_Material_Lead.cpp:273
real kohler(const real B, const real S, const real beta) const override
Kohler function for magnetoresistance.
Definition cl_Material_Lead.hpp:92
Metal(const string &aLabel, const MaterialType aType, const bool aBuildTables=true)
Constructor.
Definition cl_Material_Metal.cpp:34
Evaluates a polynomial.
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:89
@ RRR
Definition cl_Material.hpp:182
double real
Definition typedefs.hpp:36
#define BELFEM_QUIET_NAN
Definition typedefs.hpp:86