12#ifndef BELFEM_CL_MATERIAL_METAL_HPP
13#define BELFEM_CL_MATERIAL_METAL_HPP
64 real mInvLog10 = 1.0/std::log( 10. ) ;
70 const BhCurve * mBhCurve = nullptr ;
75 bool mComputeTables = true ;
105 Metal(
const string & aLabel,
107 const bool aBuildTables =
true );
223 l(
real T )
const override ;
258 J(
const real Z )
const ;
267 J3(
const real Z )
const ;
275 J4(
const real Z )
const ;
283 J5(
const real Z )
const ;
291 Jn(
const real Z )
const ;
503 invert_debye(
const real T,
const real y,
const real theta_guess,
507 save_rho_database(
const std::string & aPath );
510 load_rho_database(
const std::string & aPath );
523 populate_rho_database_serial();
535 if ( Z > mZ3Max )
return mJ3Max ;
543 if ( Z > mZ4Max )
return mJ4Max ;
551 if ( Z > mZ5Max )
return mJ5Max ;
560 if ( Z > mZnMax )
return mJnMax ;
568 return ( this->*mFunJ )( Z );
586 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
588 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
589 real log10B = std::log(std::clamp( B, mDatabaseBmin, mDatabaseBmax ) )*mInvLog10 ;
592 return std::exp(mRhoData->evaluate( theta, log10B, angle )) ;
616 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
618 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
619 real log10B = std::log(std::clamp( B, mDatabaseBmin, mDatabaseBmax ) )*mInvLog10 ;
622 real y = mRhoData->evaluate( theta, log10B, angle ) ;
623 real dydT = mRhoData->evaluate_derivx( theta, log10B, angle ) ;
624 return std::exp( y ) * dydT ;
630 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
632 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
633 real Bc = std::clamp( B, mDatabaseBmin, mDatabaseBmax ) ;
635 real log10B = std::log( Bc )*mInvLog10 ;
638 real y = mRhoData->evaluate( theta, log10B, angle ) ;
639 real dydlogB = mRhoData->evaluate_derivy( theta, log10B, angle ) ;
641 return std::exp( y ) * dydlogB *mInvLog10 / Bc ;
648 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
650 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
651 real Bc = std::clamp( B, mDatabaseBmin, mDatabaseBmax ) ;
653 real log10B = std::log( Bc )*mInvLog10 ;
656 real y = mRhoData->evaluate( theta, log10B, angle ) ;
657 real dydbeta = mRhoData->evaluate_derivz( theta, log10B, angle ) ;
659 return std::exp( y ) * dydbeta ;
666 return this->
lambda( T ) * this->
rho( T ) / this->
rho( T, B, beta );
674 real c = this->
rho( T, B, beta );
680 return ( c * ( da*b + a * db ) - a * b * dc ) /( c * c );
690 real c = this->
rho( T, B, beta );
692 return - a * b * this->
drhodB( T, B, beta ) / ( c * c );
700 real c = this->
rho( T, B, beta );
702 return - a * b * this->
drhodbeta( T, B, beta ) / ( c * c );
708 return mBhCurve->H( B );
715 return mBhCurve->mu(
H );
728 return mLambdaCoefficients;
773 real x = std::log( T );
807 real x = std::log( T );
814 return std::exp( y ) * (
ddpolyval(
mCpPolys( 1 ), x ) + dy*dy - dy ) / ( T * T );
842 "Wachtman coefficients not assigned for %s",
843 this->label().c_str() );
850 return E0 - b * T * std::exp( - T0/T );
857 "Wachtman coefficients not assigned for %s",
858 this->label().c_str() );
864 return - b * std::exp( - T0/T ) * ( T + T0 ) / T ;
#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
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.
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