BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::material Namespace Reference

Classes

class  Abundance
 Natural isotope abundance database for alloy property calculations. More...
class  Alloy
class  Aluminum
 Aluminum ( Al ), face centered cubic. More...
class  BhCurve
 B-H curve for ferromagnetic materials. More...
class  BhSplineCurve
class  Chromium
 Chromium ( Cr ), body centered cubic, antiferromagnetic. More...
class  Copper
 Copper (Cu) material implementation. More...
class  Ferromagnetic
class  HastelloyC276
 Hastelloy C-276 nickel-based superalloy implementation. More...
class  Indium
class  Iron
class  JcFunction
 Base class for critical current density (Jc) and n-value functions. More...
class  JcFunctionDatabase
 Database-driven Jc function using lookup tables. More...
class  JcFunctionModifiedKim
 Modified Kim model for critical current density. More...
class  JcFunctionUserDefined
 User-defined critical current density (Jc) or power law exponent (n) function. More...
class  Lead
class  Magnesia
class  Metal
 Base class for metallic materials (pure metals and alloys). More...
class  Nickel
class  Silver
 Silver (Ag) material implementation. More...
class  SplineLookupTable
class  UserDefinedMaterial
 User-defined material loaded from external shared library. More...
class  WhiteTin
class  YBCO
 YBCO (YBa₂Cu₃O₇) high-temperature superconductor implementation. More...

Typedefs

typedef Bitset< static_cast< uint >(JcParameter::UNDEFINED) > JcDependency
 Bitset for tracking Jc function dependencies.
typedef std::pair< Vector< real >, Vector< real > > AbundanceEntry
 Database entry for an element's isotopes.

Enumerations

enum class  JcParameter { normB = 1 , angleNxB = 2 , T = 3 , UNDEFINED = 4 }
 Parameters that Jc (or n) can depend on. More...

Functions

template<typename T>
polyval (const std::vector< T > &coeffs, const T x)
template<typename T>
dpolyval (const std::vector< T > &coeffs, const T x)
bool embed_python_guide (HDF5 &aFile)
 Copy the python database reader into a generated table.
template<typename value>
value hust (const Vector< value > &P, const value T)
 This function is a semi-empirical model used to describe the intrinsic thermal resistivity or electrical resistivity of metals, particularly at cryogenic temperatures.
string data_path ()
 Return the directory holding the shared material databases, that is the material subdirectory of gBelfemDataPath.
string data_file (const string &aFile)
 Resolve a material data file named in an input file.
real polyval_E (const Material *Mat, const real T)
 Evaluate Young's modulus using polynomial.
real polyval_nu (const Material *Mat, const real T)
 Evaluate Poisson's ratio using polynomial.
real polyval_cp (const Material *Mat, const real T)
 Evaluate specific heat using polynomial.
real polyval_lambda (const Material *Mat, const real T)
 Evaluate thermal conductivity using polynomial.
real polyval_mu (const Material *Mat, const real H, const real T)
 Evaluate magnetic permeability using polynomial (temperature-dependent only).
real polyval_rho (const Material *Mat, const real T)
 Evaluate electrical resistivity using polynomial.
real polyval_alpha (const Material *Mat, const real T)
 Evaluate thermal expansion coefficient using polynomial.
real polyval_Rp02 (const Material *Mat, const real T)
 Evaluate 0.2% proof stress using polynomial.

Variables

constexpr char gPythonGuideSubpath [] = "/python/database/howtoread.py"
 location of the reference reader below the data directory
constexpr char gMaterialsSubdir [] = "material"

Typedef Documentation

◆ AbundanceEntry

Database entry for an element's isotopes.

Stores parallel arrays:

  • first: Isotope masses [atomic mass units]
  • second: Natural abundances [%]

◆ JcDependency

Bitset for tracking Jc function dependencies.

Enumeration Type Documentation

◆ JcParameter

enum class belfem::material::JcParameter
strong

Parameters that Jc (or n) can depend on.

  • normB: Magnitude of magnetic field [T]
  • angleNxB: Angle between surface normal and field [rad]
  • T: Temperature [K]
Enumerator
normB 
angleNxB 
UNDEFINED 

Function Documentation

◆ data_file()

string belfem::material::data_file ( const string & aFile)

Resolve a material data file named in an input file.

The run directory always wins, so a local copy overrides the shared database. If the file is not there, it is looked up below data_path(), first under the same relative path and then by name alone, so that "MatData/bhdata.hdf5" also resolves for a run that has no MatData directory of its own.

If nothing is found, aFile is returned unchanged, so that whoever opens it reports the name the user wrote. This also keeps the loader search intact for the plugin libraries, which need not exist as a file at all.

The search order itself lives in belfem::search_data_file() ( io/filetools.hpp ); this is a forwarder supplying the material subdirectory. It is shared with the source-function plugin loader in numerics/sources, which sits below physics and cannot include this.

◆ data_path()

string belfem::material::data_path ( )

Return the directory holding the shared material databases, that is the material subdirectory of gBelfemDataPath.

Returns an empty string when that global is empty.

Note that an unset $BELFEM_DATA does not imply an empty global: Communicator::set_globals() fills it from the environment, and on an installed tree falls back to the compiled-in install data directory when the environment is silent.

◆ dpolyval()

template<typename T>
T belfem::material::dpolyval ( const std::vector< T > & coeffs,
const T x )

◆ embed_python_guide()

bool belfem::material::embed_python_guide ( HDF5 & aFile)

Copy the python database reader into a generated table.

If $BELFEM_DATA/python/database/howtoread.py exists, its full text is stored in the open database file as group python, dataset howtoread.py. A table written by the material tool then ships its own reference reader: anyone holding the file can recover the properties without a BELFEM installation.

The feature is optional by design – when the guide is not found the function is a silent no-op, so table generation never depends on the data directory being complete.

Parameters
aFileopen HDF5 database, positioned at the file root
Returns
true if the guide was found and embedded

The caller is responsible for the rank guard: like the save routines that call it, this runs on rank 0 only.

◆ hust()

template<typename value>
value belfem::material::hust ( const Vector< value > & P,
const value T )

This function is a semi-empirical model used to describe the intrinsic thermal resistivity or electrical resistivity of metals, particularly at cryogenic temperatures.

The function is designed to bridge the gap between low-temperature power-law behavior (where resistivity often scales as $T^n$) and high-temperature limits.

Hust, J. G., & Lankford, A. B. (1984)

Update of thermal conductivity and electrical resistivity of electrolytic iron, tungsten, and stainless steel (NBS Special Publication 260-90). National Bureau of Standards.

Parameters
P
T
Returns

◆ polyval()

template<typename T>
T belfem::material::polyval ( const std::vector< T > & coeffs,
const T x )

◆ polyval_alpha()

real belfem::material::polyval_alpha ( const Material * Mat,
const real T )
inline

Evaluate thermal expansion coefficient using polynomial.

Parameters
MatMaterial pointer
TTemperature [K]
Returns
Linear thermal expansion coefficient [1/K]

◆ polyval_cp()

real belfem::material::polyval_cp ( const Material * Mat,
const real T )
inline

Evaluate specific heat using polynomial.

Parameters
MatMaterial pointer
TTemperature [K]
Returns
Specific heat capacity [J/(kg·K)]

◆ polyval_E()

real belfem::material::polyval_E ( const Material * Mat,
const real T )
inline

Evaluate Young's modulus using polynomial.

Parameters
MatMaterial pointer
TTemperature [K]
Returns
Young's modulus [Pa]

◆ polyval_lambda()

real belfem::material::polyval_lambda ( const Material * Mat,
const real T )
inline

Evaluate thermal conductivity using polynomial.

Parameters
MatMaterial pointer
TTemperature [K]
Returns
Thermal conductivity [W/(m·K)]

◆ polyval_mu()

real belfem::material::polyval_mu ( const Material * Mat,
const real H,
const real T )
inline

Evaluate magnetic permeability using polynomial (temperature-dependent only).

Note: The magnetic field parameter H is ignored. This function evaluates mu(T) only, suitable for non-ferromagnetic materials where mu does not depend on applied field.

Parameters
MatMaterial pointer
HMagnetic field strength [A/m] (ignored)
TTemperature [K]
Returns
Magnetic permeability μ = ∂B/∂H [H/m] (absolute, not relative)

◆ polyval_nu()

real belfem::material::polyval_nu ( const Material * Mat,
const real T )
inline

Evaluate Poisson's ratio using polynomial.

Parameters
MatMaterial pointer
TTemperature [K]
Returns
Poisson's ratio [dimensionless]

◆ polyval_rho()

real belfem::material::polyval_rho ( const Material * Mat,
const real T )
inline

Evaluate electrical resistivity using polynomial.

Parameters
MatMaterial pointer
TTemperature [K]
Returns
Electrical resistivity [Ω·m]

◆ polyval_Rp02()

real belfem::material::polyval_Rp02 ( const Material * Mat,
const real T )
inline

Evaluate 0.2% proof stress using polynomial.

Parameters
MatMaterial pointer
TTemperature [K]
Returns
0.2% proof stress [Pa]

Variable Documentation

◆ gMaterialsSubdir

char belfem::material::gMaterialsSubdir[] = "material"
constexpr

subdirectory of the data path that holds the material databases. Bare, without a separator: both readers below join explicitly

◆ gPythonGuideSubpath

char belfem::material::gPythonGuideSubpath[] = "/python/database/howtoread.py"
constexpr

location of the reference reader below the data directory