BELFEM 0.9.0
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 {
22 class Lead : public Metal
23 {
24 // debye temperature
25 Cell< Vector< real > > mDebyePolys ;
26 Vector< real > mTDebyeSwitch ;
27
28 Bezier * mThermalExpansion = nullptr ;
29 Vector< real > mThermalExpansionCryo ;
30 Bezier * mDebyeTemperature = nullptr ;
31
32 Cell< Vector< real > > mKohlerLongPolys ;
33 Cell< Vector< real > > mKohlerTransPolys ;
34 Vector< real > mBSKohlerLongSwitch ;
35 Vector< real > mBSKohlerTransSwitch ;
36 public:
38 const bool aBuildTables = true );
39
40 ~Lead() override;
41
42 protected:
43
44 real
45 alpha_custom( const real T ) const override ;
46
47 real
48 debye_custom(const real T) const override;
49
50 real
51 kohler( const real B, const real S, const real beta ) const override ;
52 private:
53
54 void
55 set_constants();
56
57 void
58 create_alpha();
59
60 void
61 create_cp();
62
63 void
64 create_debye();
65
66 void
67 create_kohler();
68 };
69
70 inline real
71 Lead::kohler( const real B, const real S, const real beta ) const
72 {
73 if ( B < BELFEM_EPSILON ) return 0.0 ;
74
75 real BS = B * S ;
76
77 real Along ;
78
79 if ( BS < mBSKohlerLongSwitch( 0 ) )
80 {
81 Along = polyval( mKohlerLongPolys(0), BS );
82 }
83 else if ( BS < mBSKohlerLongSwitch( 1 ) )
84 {
85 Along = std::exp( polyval( mKohlerLongPolys(1), std::log(BS) ) );
86 }
87 else
88 {
89 Along = polyval( mKohlerLongPolys(2), BS );
90 }
91
92 real Atrans ;
93 if ( BS < mBSKohlerTransSwitch( 0 ) )
94 {
95 Atrans = polyval( mKohlerTransPolys(0), BS );
96 }
97 else
98 {
99 Atrans = std::exp( polyval( mKohlerTransPolys(1), std::log(BS) ) );
100 }
101
102 real c = std::cos( beta );
103 real c2 = c*c ;
104 real s2 = 1.0 - c2 ;
105
106 // Pippard's angular interpolation formula
107 return Along * c2 + Atrans * s2 ;
108 }
109
110 }
111}
112#endif //BELFEM_CL_MATERIAL_LEAD_HPP
Definition cl_Bezier.hpp:30
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
real debye_custom(const real T) const override
Definition cl_Material_Lead.cpp:271
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:265
real kohler(const real B, const real S, const real beta) const override
Kohler function for magnetoresistance.
Definition cl_Material_Lead.hpp:71
Metal(const string &aLabel, const MaterialType aType, const bool aBuildTables=true)
Constructor.
Definition cl_Material_Metal.cpp:33
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:90
@ RRR
Definition cl_Material.hpp:182
double real
Definition typedefs.hpp:36
#define BELFEM_QUIET_NAN
Definition typedefs.hpp:87