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 ;
110 Metal(
const string & aLabel,
112 const bool aBuildTables =
true );
226 l(
real T )
const override ;
261 J(
const real Z )
const ;
269 J3(
const real Z )
const ;
277 J4(
const real Z )
const ;
285 J5(
const real Z )
const ;
293 Jn(
const real Z )
const ;
540 invert_debye(
const real T,
const real y,
const real theta_guess,
544 save_rho_database(
const std::string & aPath );
547 load_rho_database(
const std::string & aPath );
560 populate_rho_database_serial();
571 if ( Z > mZ3Max )
return mJ3Max ;
579 if ( Z > mZ4Max )
return mJ4Max ;
587 if ( Z > mZ5Max )
return mJ5Max ;
595 if ( Z > mZnMax )
return mJnMax ;
602 return ( this->*mFunJ )( Z );
620 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
622 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
623 real log10B = std::log(std::clamp( B, mDatabaseBmin, mDatabaseBmax ) )*mInvLog10 ;
626 return std::exp(mRhoData->evaluate( theta, log10B, angle )) ;
650 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
652 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
653 real log10B = std::log(std::clamp( B, mDatabaseBmin, mDatabaseBmax ) )*mInvLog10 ;
656 real y = mRhoData->evaluate( theta, log10B, angle ) ;
657 real dydT = mRhoData->evaluate_derivx( theta, log10B, angle ) ;
658 return std::exp( y ) * dydT ;
664 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
666 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
667 real Bc = std::clamp( B, mDatabaseBmin, mDatabaseBmax ) ;
669 real log10B = std::log( Bc )*mInvLog10 ;
672 real y = mRhoData->evaluate( theta, log10B, angle ) ;
673 real dydlogB = mRhoData->evaluate_derivy( theta, log10B, angle ) ;
675 return std::exp( y ) * dydlogB *mInvLog10 / Bc ;
682 BELFEM_ASSERT( mRhoData !=
nullptr,
"lookup table for rho is not initialized" ) ;
684 real theta = std::clamp( T, mDatabaseTmin, mDatabaseTmax );
685 real Bc = std::clamp( B, mDatabaseBmin, mDatabaseBmax ) ;
687 real log10B = std::log( Bc )*mInvLog10 ;
690 real y = mRhoData->evaluate( theta, log10B, angle ) ;
691 real dydbeta = mRhoData->evaluate_derivz( theta, log10B, angle ) ;
693 return std::exp( y ) * dydbeta ;
700 return this->
lambda( T ) * this->
rho( T ) / this->
rho( T, B, beta );
708 real c = this->
rho( T, B, beta );
714 return ( c * ( da*b + a * db ) - a * b * dc ) /( c * c );
724 real c = this->
rho( T, B, beta );
726 return - a * b * this->
drhodB( T, B, beta ) / ( c * c );
734 real c = this->
rho( T, B, beta );
736 return - a * b * this->
drhodbeta( T, B, beta ) / ( c * c );
742 return mBhCurve->H( B );
748 return mBhCurve->mu(
H );
760 return mLambdaCoefficients;
805 real x = std::log( T );
839 real x = std::log( T );
846 return std::exp( y ) * (
ddpolyval(
mCpPolys( 1 ), x ) + dy*dy - dy ) / ( T * T );
874 "elastic constants not assigned for %s - call create_mech() first",
875 this->
label().c_str() );
877 return 3.0 * std::log( this->
l( T ) /
mL0 );
886 return 9.0 *
K *
G / ( 3.0 *
K +
G );
895 return ( 3.0 *
K - 2.0 *
G ) / ( 6.0 *
K + 2.0 *
G );
#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:241
real d2ydx2(const real aX) const
second derivative of Y with respect to X
Definition cl_Bezier.cpp:264
real y(const real aX) const
y-coordinate as funciton of the x-coordinate
Definition cl_Bezier.cpp:187
A bounds-checked wrapper around std::vector.
Definition cl_Cell.hpp:45
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:2029
virtual real K(real T=gTroom) const
Bulk modulus.
Definition cl_Material.hpp:2128
virtual real rho(const real T) const
Electrical resistivity (isotropic).
Definition cl_Material.hpp:1931
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:992
virtual void dmudH(const real H, real &mu, real &dmudH) const
Magnetic permeability and its derivative.
Definition cl_Material.hpp:2057
virtual real lambda(const real T=gTroom) const
Thermal conductivity (isotropic).
Definition cl_Material.hpp:1806
virtual real cp(const real T=gTroom) const
Specific heat capacity.
Definition cl_Material.hpp:1738
virtual real drhodT(const real T) const
Definition cl_Material.hpp:1941
real(Material::*) mFunctiondRhoKohlerdB(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:395
real(Material::*) mFunctiondRhoKohlerdT(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:394
virtual real rho_i(const real T) const
Intrinsic (phonon) electrical resistivity of a metal, ρ = ρ_i(T) + ρ_0.
Definition cl_Material.hpp:2208
const string & label() const
Definition cl_Material.hpp:1581
virtual real G(real T=gTroom) const
Shear modulus.
Definition cl_Material.hpp:2120
real constant_property(const MaterialProperty aProperty) const
Definition cl_Material.hpp:1683
real(Material::*) mFunctionRhoKohler(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:393
virtual real dcpdT_custom(const real T) const
Definition cl_Material.cpp:499
real(Material::*) mFunctiondRhoKohlerdbeta(const real T, const real normB, const real angle) const
Definition cl_Material.hpp:396
virtual real d2cpdT2_custom(const real T) const
Definition cl_Material.cpp:506
virtual real dlambdadT(const real T=gTroom) const
Definition cl_Material.hpp:1821
virtual real mu(const real H, const real T=BELFEM_QUIET_NAN) const
Magnetic permeability.
Definition cl_Material.hpp:2043
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:461
size_t length() const
get the length of the vector
Definition cl_AR_Vector.hpp:235
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
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:113
#define BELFEM_QUIET_NAN
Definition typedefs.hpp:86