BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_Material_Metal.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,
4 * through 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_METAL_HPP
13#define BELFEM_CL_MATERIAL_METAL_HPP
14
15
17#include "cl_Database.hpp"
18#include "cl_BhCurve.hpp"
19#include "cl_Bezier.hpp"
20#include "fn_polyval.hpp"
21#include "fn_dpolyval.hpp"
22#include "fn_ddpolyval.hpp"
23
24namespace belfem
25{
26 namespace material
27 {
28//------------------------------------------------------------------------------
29
46 class Metal : public SplineLookupTable
47 {
48 // Maximum values and integration limits for Debye integrals
49 real mZ3Max = 0. ;
50 real mZ4Max = 0. ;
51 real mZ5Max = 0. ;
52 real mZ6Max = 0. ;
53 real mZ7Max = 0. ;
54 real mZnMax = 0. ;
55
56 real mJ3Max = 0. ;
57 real mJ4Max = 0. ;
58 real mJ5Max = 0. ;
59 real mJ6Max = 0. ;
60 real mJ7Max = 0. ;
61 real mJnMax = 0. ;
62
63 // we need to store this to avoid log(0)
64 real mInvLog10 = 1.0/std::log( 10. ) ;
65 real mDatabaseTmin = BELFEM_QUIET_NAN ;
66 real mDatabaseTmax = BELFEM_QUIET_NAN ;
67 real mDatabaseBmin = BELFEM_QUIET_NAN ;
68 real mDatabaseBmax = BELFEM_QUIET_NAN ;
69 Database * mRhoData = nullptr ;
70 const BhCurve * mBhCurve = nullptr ;
71
72 // Coefficients for thermal conductivity model
73 Vector< real > mLambdaCoefficients ;
74
75 bool mComputeTables = true ;
76
77 real ( Metal::*mFunJ )( const real Z ) const ;
78
79 protected:
80
81 // Splines for Debye integrals J_n(θ/T)
82 Spline * mSplineJ3 = nullptr ; // ∫₀^Z x³eˣ/(eˣ-1)² dx
83 Spline * mSplineJ4 = nullptr ; // ∫₀^Z x⁴eˣ/(eˣ-1)² dx
84 Spline * mSplineJ5 = nullptr ; // ∫₀^Z x⁵eˣ/(eˣ-1)² dx
85 Spline * mSplineJn = nullptr ;
86
89 Bezier * mCpBezierLow = nullptr ;
90 Bezier * mCpBezierMedium = nullptr ;
91 Bezier * mCpBezierHigh = nullptr ;
92
94
95//------------------------------------------------------------------------------
96 public:
97//------------------------------------------------------------------------------
98
105 Metal( const string & aLabel,
106 const MaterialType aType,
107 const bool aBuildTables = true );
108
112 ~Metal() override;
113
122 void
123 set_RRR( const real RRR ) override ;
124
135 virtual real
136 compute_debye_from_rho( const real T, const real rho, const real theta_guess=BELFEM_QUIET_NAN );
137
148 real
149 compute_debye_from_cp( const real T, const real cp=BELFEM_QUIET_NAN, const real theta_guess=BELFEM_QUIET_NAN );
150
162 real
163 compute_debye_from_cv( const real T, const real cv=BELFEM_QUIET_NAN, const real theta_guess=BELFEM_QUIET_NAN );
164
165 // Bring base class single-parameter versions into scope
166 // (needed because C++ name hiding hides Material::rho(T) when we override rho(T,B,beta))
167 using Material::rho;
168 using Material::lambda;
169 using Material::drhodT;
171
182 real
183 rho( const real T, const real B, const real beta ) const override ;
184
185 real
186 drhodT( const real T, const real B, const real beta ) const override ;
187
188 real
189 drhodB( const real T, const real B, const real beta ) const override ;
190
191 real
192 drhodbeta( const real T, const real B, const real beta ) const override ;
193
203 real
204 lambda( const real T, const real B, const real beta ) const override ;
205
206 real
207 dlambdadT( const real T, const real B, const real beta ) const override ;
208
209 real
210 dlambdadB( const real T, const real B, const real beta ) const override ;
211
212 real
213 dlambdadbeta( const real T, const real B, const real beta ) const override ;
214
215//------------------------------------------------------------------------------
216
222 real
223 l( real T ) const override ;
224
225//------------------------------------------------------------------------------
226
227 void
228 set_bh_curve( const BhCurve * aCurve ) override ;
229
230//------------------------------------------------------------------------------
231 /*
232 * @brief Evaluate property using spline interpolation
233 */
234 real
235 spline_property( const MaterialProperty aProperty, const real aX ) const override ;
236
237//------------------------------------------------------------------------------
238
247 void
248 set_rho_i_ref( const real T_ref, const real rho_i_ref, const real theta=BELFEM_QUIET_NAN );
249
257 real
258 J( const real Z ) const ;
259
260
266 real
267 J3( const real Z ) const ;
268
274 real
275 J4( const real Z ) const ;
276
282 real
283 J5( const real Z ) const ;
284
290 real
291 Jn( const real Z ) const ;
292
293
301 real
302 rho_custom(const real T) const override;
303
311 real
312 rho_i_custom( const real T ) const override ;
313
321 real
322 lambda_custom( const real T ) const override ;
323
329 void
330 create_rho();
331
339 void
340 set_lambda_coefficients( const Vector< real > & aCoeffs );
341
347 real
348 group_velocity( const real T ) const;
349
355 real
356 grueneisen( const real T ) const ;
357
364 void
365 grueneisen( const real T, real & gamma, real & c ) const;
366
373 real
374 cp_from_debye( const real T, const real theta ) const ;
375
380 real
381 cv_from_debye( const real T, const real theta ) const ;
382
393 virtual real
394 kohler( const real B, const real S, const real beta ) const ;
395
401 real
402 kohler_find_bs_crit( const real delta_rho_res );
403
404 void
406
407//------------------------------------------------------------------------------
408
409 real
410 H_bhcurve( const real B ) const override ;
411
412 real
413 mu_bhcurve( real H, const real T ) const override ;
414
415 void
416 dmudH_bhcurve( const real H, real & mu, real & dmudH ) const override ;
417
418 const Vector< real > &
419 lambda_coefficients() const ;
420
421 void
422 set_table_flags( const bool aFlag ) override ;
423
424//------------------------------------------------------------------------------
425 protected:
426//------------------------------------------------------------------------------
427
433 Spline *
434 create_J_spline( const real aExponent );
435
436 real
437 rho_table( const real T, const real B, const real beta ) const override ;
438
439 real
440 drhodT_table( const real T, const real B, const real beta ) const override ;
441
442 real
443 drhodB_table( const real T, const real B, const real beta ) const override ;
444
445 real
446 drhodbeta_table( const real T, const real B, const real beta ) const override ;
447
448 real
449 rho_kohler( const real T, const real B, const real beta ) const override ;
450
451 real
452 drhodT_kohler( const real T, const real B, const real beta ) const override ;
453
454 real
455 drhodB_kohler( const real T, const real B, const real beta ) const override ;
456
457 real
458 drhodbeta_kohler( const real T, const real B, const real beta ) const override ;
459
460 real
461 cp_custom( const real T) const override;
462
463 real
464 dcpdT_custom( const real T) const override;
465
466 real
467 d2cpdT2_custom( const real T) const override;
468
469
470 void
472
473 void
475
476 void
477 create_cp(
478 const Vector< real > & Px,
479 const Vector< real > & Py,
480 const Vector< real > & Qx,
481 const Vector< real > & Qy,
482 const Vector< real > & Rx = {},
483 const Vector< real > & Ry = {} );
484
485 real
486 E_custom(const real T) const override;
487
488 real
489 dEdT_custom(const real T) const override;
490
491 void
492 create_mech( const real E0, const real b, const real T1, const real T2, const real nu2 );
493
494//------------------------------------------------------------------------------
495 private:
496//------------------------------------------------------------------------------
497
502 real
503 invert_debye( const real T, const real y, const real theta_guess,
504 real ( Metal::*aFunction )( const real, const real ) const );
505
506 void
507 save_rho_database( const std::string & aPath );
508
509 void
510 load_rho_database( const std::string & aPath );
511
519 real
520 fun_debye_from_rho( const real T, const real rho, const real theta );
521
522 void
523 populate_rho_database_serial();
524
525 void
526 populate_rho_database( Mesh * aMesh, Vector< real > & aRho );
527
528
529 };
530
531 inline real Metal::J3( const real Z ) const
532 {
533 BELFEM_ASSERT( mSplineJ3 != nullptr, "lookup table for J3 is not initialized" ) ;
534
535 if ( Z > mZ3Max ) return mJ3Max ;
536 return mSplineJ3->eval( Z ) ;
537 }
538
539 inline real Metal::J4( const real Z ) const
540 {
541 BELFEM_ASSERT( mSplineJ4 != nullptr, "lookup table for J4 is not initialized" ) ;
542
543 if ( Z > mZ4Max ) return mJ4Max ;
544 return mSplineJ4->eval( Z ) ;
545 }
546
547 inline real Metal::J5( const real Z ) const
548 {
549 BELFEM_ASSERT( mSplineJ5 != nullptr, "lookup table for J5 is not initialized" ) ;
550
551 if ( Z > mZ5Max ) return mJ5Max ;
552 return mSplineJ5->eval( Z ) ;
553 }
554
555
556 inline real Metal::Jn( const real Z ) const
557 {
558 BELFEM_ASSERT( mSplineJn != nullptr, "lookup table for Jn is not initialized" ) ;
559
560 if ( Z > mZnMax ) return mJnMax ;
561 return mSplineJn->eval( Z ) ;
562 }
563
564
565 inline real
566 Metal::J( const real Z ) const
567 {
568 return ( this->*mFunJ )( Z );
569 }
570
571 inline real
572 Metal::rho_custom(const real T) const
573 {
574 return this->rho_i( T ) + this->constant_property( MaterialProperty::rho_0 );
575 }
576
577 inline real
578 Metal::rho( const real T, const real B, const real beta ) const
579 {
580 return (this->*mFunctionRhoKohler)( T, B, beta );
581 }
582
583 inline real
584 Metal::rho_table( const real T, const real B, const real beta ) const
585 {
586 BELFEM_ASSERT( mRhoData != nullptr, "lookup table for rho is not initialized" ) ;
587
588 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
589 real log10B = std::log(std::clamp( B, mDatabaseBmin, mDatabaseBmax ) )*mInvLog10 ;
590 real angle = beta < 0 ? beta + constant::pi : beta > constant::pi ? beta - constant::pi : beta;
591
592 return std::exp(mRhoData->evaluate( theta, log10B, angle )) ;
593 }
594
595 inline real
596 Metal::drhodT( const real T, const real B, const real beta ) const
597 {
598 return (this->*mFunctiondRhoKohlerdT)( T, B, beta );
599 }
600
601 inline real
602 Metal::drhodB( const real T, const real B, const real beta ) const
603 {
604 return (this->*mFunctiondRhoKohlerdB)( T, B, beta );
605 }
606
607 inline real
608 Metal::drhodbeta( const real T, const real B, const real beta ) const
609 {
610 return (this->*mFunctiondRhoKohlerdbeta)( T, B, beta );
611 }
612
613 inline real
614 Metal::drhodT_table( const real T, const real B, const real beta ) const
615 {
616 BELFEM_ASSERT( mRhoData != nullptr, "lookup table for rho is not initialized" ) ;
617
618 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
619 real log10B = std::log(std::clamp( B, mDatabaseBmin, mDatabaseBmax ) )*mInvLog10 ;
620 real angle = beta < 0 ? beta + constant::pi : beta > constant::pi ? beta - constant::pi : beta;
621
622 real y = mRhoData->evaluate( theta, log10B, angle ) ;
623 real dydT = mRhoData->evaluate_derivx( theta, log10B, angle ) ;
624 return std::exp( y ) * dydT ;
625 }
626
627 inline real
628 Metal::drhodB_table( const real T, const real B, const real beta ) const
629 {
630 BELFEM_ASSERT( mRhoData != nullptr, "lookup table for rho is not initialized" ) ;
631
632 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
633 real Bc = std::clamp( B, mDatabaseBmin, mDatabaseBmax ) ;
634
635 real log10B = std::log( Bc )*mInvLog10 ;
636 real angle = beta < 0 ? beta + constant::pi : beta > constant::pi ? beta - constant::pi : beta;
637
638 real y = mRhoData->evaluate( theta, log10B, angle ) ;
639 real dydlogB = mRhoData->evaluate_derivy( theta, log10B, angle ) ;
640
641 return std::exp( y ) * dydlogB *mInvLog10 / Bc ;
642
643 }
644
645 inline real
646 Metal::drhodbeta_table( const real T, const real B, const real beta ) const
647 {
648 BELFEM_ASSERT( mRhoData != nullptr, "lookup table for rho is not initialized" ) ;
649
650 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
651 real Bc = std::clamp( B, mDatabaseBmin, mDatabaseBmax ) ;
652
653 real log10B = std::log( Bc )*mInvLog10 ;
654 real angle = beta < 0 ? beta + constant::pi : beta > constant::pi ? beta - constant::pi : beta;
655
656 real y = mRhoData->evaluate( theta, log10B, angle ) ;
657 real dydbeta = mRhoData->evaluate_derivz( theta, log10B, angle ) ;
658
659 return std::exp( y ) * dydbeta ;
660
661 }
662
663 inline real
664 Metal::lambda( real T, const real B, const real beta ) const
665 {
666 return this->lambda( T ) * this->rho( T ) / this->rho( T, B, beta );
667 }
668
669 inline real
670 Metal::dlambdadT( real T, const real B, const real beta ) const
671 {
672 real a = this->lambda( T ) ;
673 real b = this->rho( T ) ;
674 real c = this->rho( T, B, beta );
675
676 real da = this->dlambdadT( T );
677 real db = this->drhodT( T );
678 real dc = this->drhodT( T, B, beta );
679
680 return ( c * ( da*b + a * db ) - a * b * dc ) /( c * c );
681 }
682
683 // lambda( T, B, beta ) = lambda(T) * rho(T) / rho(T,B,beta):
684 // only the denominator depends on B and beta
685 inline real
686 Metal::dlambdadB( const real T, const real B, const real beta ) const
687 {
688 real a = this->lambda( T ) ;
689 real b = this->rho( T ) ;
690 real c = this->rho( T, B, beta );
691
692 return - a * b * this->drhodB( T, B, beta ) / ( c * c );
693 }
694
695 inline real
696 Metal::dlambdadbeta( const real T, const real B, const real beta ) const
697 {
698 real a = this->lambda( T ) ;
699 real b = this->rho( T ) ;
700 real c = this->rho( T, B, beta );
701
702 return - a * b * this->drhodbeta( T, B, beta ) / ( c * c );
703 }
704
705 inline real
706 Metal::H_bhcurve( const real B ) const
707 {
708 return mBhCurve->H( B );
709 }
710
711
712 inline real
713 Metal::mu_bhcurve( real H, const real T ) const
714 {
715 return mBhCurve->mu( H );
716 }
717
718
719 inline void
721 {
722 mBhCurve->dmudH( H, mu, dmudH );
723 }
724
725 inline
727 {
728 return mLambdaCoefficients;
729 }
730
731 inline real
732 Metal::cp_custom( const real T ) const
733 {
734 if ( T < mTCpSwitch( 0 ) )
735 {
736 return polyval( mCpPolys( 0 ), T );
737 }
738 if ( T < mTCpSwitch( 1 ) )
739 {
740 return std::exp( polyval( mCpPolys( 1 ), std::log( T ) ) );
741 }
742 if ( T < mTCpSwitch( 2 ) )
743 {
744 return std::exp( mCpBezierLow->y( std::log( T ) ) );
745 }
746 if ( T < mTCpSwitch( 3 ) )
747 {
748 return std::exp( mCpBezierMedium->y( std::log( T ) ) );
749 }
750 if ( mCpBezierHigh != nullptr && T < mTCpSwitch( mTCpSwitch.length() - 1 ) )
751 {
752 return std::exp( mCpBezierHigh->y( std::log( T ) ) );
753 }
754 return polyval( mCpPolys( 2 ), T );
755 }
756
757 inline real
758 Metal::dcpdT_custom( const real T) const
759 {
760 // Subclasses that manage cp themselves ( YBCO, HastelloyC276 )
761 // override cp_custom but inherit this function; without the
762 // Bezier machinery, fall back to the finite difference the
763 // base class provides
764 if ( mCpBezierLow == nullptr )
765 {
766 return Material::dcpdT_custom( T );
767 }
768
769 if ( T < mTCpSwitch( 0 ) )
770 {
771 return dpolyval( mCpPolys( 0 ), T );
772 }
773 real x = std::log( T );
774 if ( T < mTCpSwitch( 1 ) )
775 {
776 return std::exp( polyval( mCpPolys( 1 ), x ) ) * dpolyval( mCpPolys( 1 ), x ) / T;
777 }
778 if ( T < mTCpSwitch( 2 ) )
779 {
780 return std::exp( mCpBezierLow->y( x ) ) * mCpBezierLow->dydx( x ) / T ;
781 }
782 if ( T < mTCpSwitch( 3 ) )
783 {
784
785 return std::exp( mCpBezierMedium->y( x ) ) * mCpBezierMedium->dydx( x ) / T ;
786 }
787 if ( mCpBezierHigh != nullptr && T < mTCpSwitch( mTCpSwitch.length() - 1 ) )
788 {
789 return std::exp( mCpBezierHigh->y( x ) ) * mCpBezierHigh->dydx( x ) / T ;
790 }
791
792 // the extrapolation above T3 is linear in T, not in log-log space
793 return dpolyval( mCpPolys( 2 ), T );
794 }
795
796 inline real
798 {
799 if ( mCpBezierLow == nullptr )
800 {
801 return Material::d2cpdT2_custom( T );
802 }
803 if ( T < mTCpSwitch( 0 ) )
804 {
805 return ddpolyval( mCpPolys( 0 ), T );
806 }
807 real x = std::log( T );
808 // with y = ln( cp ) over x = ln( T ):
809 // d2cp/dT2 = cp * ( y'' + y'^2 - y' ) / T^2
810 if ( T < mTCpSwitch( 1 ) )
811 {
812 real y = polyval( mCpPolys( 1 ), x );
813 real dy = dpolyval( mCpPolys( 1 ), x );
814 return std::exp( y ) * ( ddpolyval( mCpPolys( 1 ), x ) + dy*dy - dy ) / ( T * T );
815 }
816 if ( T < mTCpSwitch( 2 ) )
817 {
818 real dy = mCpBezierLow->dydx( x );
819 return std::exp( mCpBezierLow->y( x ) )
820 * ( mCpBezierLow->d2ydx2( x ) + dy*dy - dy ) / ( T * T );
821 }
822 if ( T < mTCpSwitch( 3 ) )
823 {
824 real dy = mCpBezierMedium->dydx( x );
825 return std::exp( mCpBezierMedium->y( x ) )
826 * ( mCpBezierMedium->d2ydx2( x ) + dy*dy - dy ) / ( T * T );
827 }
828 if ( mCpBezierHigh != nullptr && T < mTCpSwitch( mTCpSwitch.length() - 1 ) )
829 {
830 real dy = mCpBezierHigh->dydx( x );
831 return std::exp( mCpBezierHigh->y( x ) )
832 * ( mCpBezierHigh->d2ydx2( x ) + dy*dy - dy ) / ( T * T );
833 }
834
835 return ddpolyval( mCpPolys( 2 ), T );
836 }
837
838 inline real
839 Metal::E_custom( const real T ) const
840 {
842 "Wachtman coefficients not assigned for %s",
843 this->label().c_str() );
844
845 if ( T < BELFEM_EPSILON ) return mWachtmanYoung( 0 );
846
847 real E0 = mWachtmanYoung( 0 );
848 real b = mWachtmanYoung( 1 );
849 real T0 = mWachtmanYoung( 2 );
850 return E0 - b * T * std::exp( - T0/T );
851 }
852
853 inline real
854 Metal::dEdT_custom( const real T ) const
855 {
857 "Wachtman coefficients not assigned for %s",
858 this->label().c_str() );
859
860 if ( T < BELFEM_EPSILON ) return 0 ;
861
862 real b = mWachtmanYoung( 1 );
863 real T0 = mWachtmanYoung( 2 );
864 return - b * std::exp( - T0/T ) * ( T + T0 ) / T ;
865 }
866
867 }
868}
869
870#endif // BELFEM_CL_MATERIAL_METAL_HPP
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
Definition cl_Bezier.hpp:30
real dydx(const real aX) const
derivative of Y with respect to X
Definition cl_Bezier.cpp:245
real d2ydx2(const real aX) const
second derivative of Y with respect to X
Definition cl_Bezier.cpp:268
real y(const real aX) const
y-coordinate as funciton of the x-coordinate
Definition cl_Bezier.cpp:191
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
Precomputed lookup table on a tensor grid; evaluation, derivatives and HDF5 persistence.
Definition cl_Database.hpp:30
virtual real H(const real B) const
Magnetic field strength from flux density.
Definition cl_Material.hpp:2137
virtual real rho(const real T) const
Electrical resistivity (isotropic).
Definition cl_Material.hpp:2038
real n(const real normB, const real angleNxB, const real T) const
Direct evaluation of the n-value as a function of , and .
Definition powerlaws.hpp:976
virtual void dmudH(const real H, real &mu, real &dmudH) const
Magnetic permeability and its derivative.
Definition cl_Material.hpp:2165
virtual real lambda(const real T=gTroom) const
Thermal conductivity (isotropic).
Definition cl_Material.hpp:1912
virtual real cp(const real T=gTroom) const
Specific heat capacity.
Definition cl_Material.hpp:1842
virtual real drhodT(const real T) const
Definition cl_Material.hpp:2049
real(Material::*) mFunctiondRhoKohlerdB(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:405
real(Material::*) mFunctiondRhoKohlerdT(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:404
virtual real rho_i(const real T) const
Intrinsic (phonon) electrical resistivity of a metal, ρ = ρ_i(T) + ρ_0.
Definition cl_Material.hpp:2318
real constant_property(const MaterialProperty aProperty) const
Get constant property value.
Definition cl_Material.hpp:1787
real(Material::*) mFunctionRhoKohler(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:403
virtual real dcpdT_custom(const real T) const
Definition cl_Material.cpp:492
real(Material::*) mFunctiondRhoKohlerdbeta(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:406
virtual real d2cpdT2_custom(const real T) const
Definition cl_Material.cpp:499
virtual real dlambdadT(const real T=gTroom) const
Definition cl_Material.hpp:1927
virtual real mu(const real H, const real T=BELFEM_QUIET_NAN) const
Magnetic permeability.
Definition cl_Material.hpp:2151
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
Cubic spline on a uniform grid, C2, with natural, parabolic or clamped boundary conditions.
Definition cl_Spline.hpp:45
real eval(const real aX) const
interpolate the function
Definition cl_Spline.hpp:458
size_t length() const
get the length of the vector
Definition cl_AR_Vector.hpp:257
B-H curve for ferromagnetic materials.
Definition cl_BhCurve.hpp:61
real drhodB_kohler(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.cpp:788
Vector< real > mWachtmanYoung
Definition cl_Material_Metal.hpp:93
Vector< real > mTCpSwitch
Definition cl_Material_Metal.hpp:88
real drhodbeta_kohler(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.cpp:811
Spline * mSplineJ3
Definition cl_Material_Metal.hpp:82
real drhodB(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:602
real dlambdadT(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:670
real cp_custom(const real T) const override
Definition cl_Material_Metal.hpp:732
real dlambdadbeta(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:696
real J5(const real Z) const
Debye integral J₅(Z) = ∫₀^Z x⁵eˣ/(eˣ-1)² dx.
Definition cl_Material_Metal.hpp:547
real rho_custom(const real T) const override
Total resistivity at zero field (overrides base class).
Definition cl_Material_Metal.hpp:572
void create_mech(const real E0, const real b, const real T1, const real T2, const real nu2)
Definition cl_Material_Metal.cpp:1122
virtual real compute_debye_from_rho(const real T, const real rho, const real theta_guess=BELFEM_QUIET_NAN)
Compute Debye temperature from measured resistivity.
Definition cl_Material_Metal.cpp:561
void set_rho_i_ref(const real T_ref, const real rho_i_ref, const real theta=BELFEM_QUIET_NAN)
Set reference intrinsic resistivity for Bloch-Grüneisen model.
Definition cl_Material_Metal.cpp:388
real drhodT(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:596
real lambda(const real T, const real B, const real beta) const override
Thermal conductivity with magnetoresistance.
Definition cl_Material_Metal.hpp:664
real drhodbeta_table(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:646
real J4(const real Z) const
Debye integral J₄(Z) = ∫₀^Z x⁴eˣ/(eˣ-1)² dx.
Definition cl_Material_Metal.hpp:539
real rho_kohler(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.cpp:741
real compute_debye_from_cp(const real T, const real cp=BELFEM_QUIET_NAN, const real theta_guess=BELFEM_QUIET_NAN)
Compute Debye temperature from specific heat capacity.
Definition cl_Material_Metal.cpp:526
Spline * mSplineJn
Definition cl_Material_Metal.hpp:85
void set_RRR(const real RRR) override
Set residual resistivity ratio.
Definition cl_Material_Metal.cpp:221
real J3(const real Z) const
Debye integral J₃(Z) = ∫₀^Z x³eˣ/(eˣ-1)² dx.
Definition cl_Material_Metal.hpp:531
real lambda_custom(const real T) const override
Thermal conductivity at zero field.
Definition cl_Material_Metal.cpp:647
Cell< Vector< real > > mCpPolys
Definition cl_Material_Metal.hpp:87
real kohler_find_bs_crit(const real delta_rho_res)
Find critical B·S for given relative resistivity increase.
Definition cl_Material_Metal.cpp:845
real drhodB_table(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:628
real J(const real Z) const
Debye integral Jₙ(Z) = ∫₀^Z xⁿeˣ/(eˣ-1)² dx with n the Bloch–Grüneisen exponent ( 5 by default,...
Definition cl_Material_Metal.hpp:566
real drhodT_table(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:614
real compute_debye_from_cv(const real T, const real cv=BELFEM_QUIET_NAN, const real theta_guess=BELFEM_QUIET_NAN)
Compute Debye temperature from the specific heat at constant volume.
Definition cl_Material_Metal.cpp:541
void set_lambda_coefficients(const Vector< real > &aCoeffs)
Set thermal conductivity model coefficients.
Definition cl_Material_Metal.cpp:638
void dmudH_bhcurve(const real H, real &mu, real &dmudH) const override
Definition cl_Material_Metal.hpp:720
real cv_from_debye(const real T, const real theta) const
Specific heat at constant volume from Debye temperature ( Sommerfeld + Debye, no dilation term ).
Definition cl_Material_Metal.cpp:599
void create_cp(const Vector< real > &Px, const Vector< real > &Py, const Vector< real > &Qx, const Vector< real > &Qy, const Vector< real > &Rx={}, const Vector< real > &Ry={})
Definition cl_Material_Metal.cpp:81
const Vector< real > & lambda_coefficients() const
Definition cl_Material_Metal.hpp:726
real spline_property(const MaterialProperty aProperty, const real aX) const override
Evaluate property using spline interpolation.
Definition cl_Material_Metal.cpp:380
void populate_rho_database()
Definition cl_Material_Metal.cpp:885
real dcpdT_custom(const real T) const override
Definition cl_Material_Metal.hpp:758
real l(real T) const override
Relative length after thermal expansion.
Definition cl_Material_Metal.cpp:368
void set_bloch_gruen_parameter(const real n)
Definition cl_Material_Metal.cpp:70
real dlambdadB(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:686
real E_custom(const real T) const override
Definition cl_Material_Metal.hpp:839
virtual real kohler(const real B, const real S, const real beta) const
Kohler function for magnetoresistance.
Definition cl_Material_Metal.cpp:733
real rho(const real T, const real B, const real beta) const override
Electrical resistivity with magnetoresistance (Kohler's rule).
Definition cl_Material_Metal.hpp:578
real drhodbeta(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:608
real rho_i_custom(const real T) const override
Intrinsic resistivity (Bloch-Grüneisen model).
Definition cl_Material_Metal.cpp:426
real dEdT_custom(const real T) const override
Definition cl_Material_Metal.hpp:854
Spline * create_J_spline(const real aExponent)
Create spline for Debye integral J_n(Z).
Definition cl_Material_Metal.cpp:306
void set_kohler_dependencies()
Definition cl_Material_Metal.cpp:833
real group_velocity(const real T) const
Phonon group velocity.
Definition cl_Material_Metal.cpp:669
real mu_bhcurve(real H, const real T) const override
Definition cl_Material_Metal.hpp:713
Spline * mSplineJ5
Definition cl_Material_Metal.hpp:84
real rho_table(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.hpp:584
real d2cpdT2_custom(const real T) const override
Definition cl_Material_Metal.hpp:797
Metal(const string &aLabel, const MaterialType aType, const bool aBuildTables=true)
Constructor.
Definition cl_Material_Metal.cpp:33
Bezier * mCpBezierHigh
Definition cl_Material_Metal.hpp:91
void create_rho()
Initialize resistivity properties.
Definition cl_Material_Metal.cpp:413
Bezier * mCpBezierMedium
Definition cl_Material_Metal.hpp:90
Spline * mSplineJ4
Definition cl_Material_Metal.hpp:83
real H_bhcurve(const real B) const override
Definition cl_Material_Metal.hpp:706
real Jn(const real Z) const
Debye integral for arbitrary n.
Definition cl_Material_Metal.hpp:556
Bezier * mCpBezierLow
Definition cl_Material_Metal.hpp:89
real drhodT_kohler(const real T, const real B, const real beta) const override
Definition cl_Material_Metal.cpp:757
real cp_from_debye(const real T, const real theta) const
Specific heat from Debye temperature.
Definition cl_Material_Metal.cpp:612
real grueneisen(const real T) const
Grüneisen parameter.
Definition cl_Material_Metal.cpp:684
void set_table_flags(const bool aFlag) override
Definition cl_Material_Metal.cpp:1116
void set_bh_curve(const BhCurve *aCurve) override
Assign a B-H curve to this material.
Definition cl_Material_Metal.cpp:1108
SplineLookupTable(const MaterialType aType, const bool aIsIsotropic=true)
Definition cl_Material_SplineLookupTable.cpp:17
Evaluates the second derivative of a polynomial.
Evaluates the first derivative of a polynomial.
Evaluates a polynomial.
T ddpolyval(const Vector< T > &aCoeffs, const T aX)
Evaluates the second derivative of a polynomial at one point.
Definition fn_ddpolyval.hpp:46
const real pi
circle number
Definition constants.hpp:41
Definition cl_BhCurve.cpp:19
T dpolyval(const std::vector< T > &coeffs, const T x)
Definition cl_Material_UserDefined.hpp:46
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
MaterialProperty
All material properties that can be defined.
Definition cl_Material.hpp:153
@ rho_0
Definition cl_Material.hpp:183
double real
Definition typedefs.hpp:36
MaterialType
Material classification based on physical behavior.
Definition cl_Material.hpp:107
#define BELFEM_QUIET_NAN
Definition typedefs.hpp:87