1 #ifndef VERTEXCFD_FULLINDUCTIONMHDPROPERTIES_HPP
2 #define VERTEXCFD_FULLINDUCTIONMHDPROPERTIES_HPP
4 #include <Teuchos_ParameterList.hpp>
6 #include <Kokkos_Core.hpp>
10 namespace MHDProperties
21 : _build_magn_corr(
false)
22 , _build_resistive_flux(
false)
23 , _variable_resistivity(
false)
25 , _eta(std::numeric_limits<double>::quiet_NaN())
28 if (mhd_params.isType<
bool>(
"Build Magnetic Correction "
29 "Potential Equation"))
31 _build_magn_corr = mhd_params.get<
bool>(
33 "Correction Potential "
38 if (mhd_params.isType<
double>(
"Vacuum Magnetic Permeability"))
40 _mu_0 = mhd_params.get<
double>(
"Vacuum Magnetic Permeability");
44 if (mhd_params.isType<
bool>(
"Build Resistive Flux"))
47 = mhd_params.get<
bool>(
"Build Resistive Flux");
50 if (_build_resistive_flux)
52 if (mhd_params.isType<
bool>(
"Variable Resistivity"))
55 = mhd_params.get<
bool>(
"Variable Resistivity");
57 if (_variable_resistivity)
59 throw std::runtime_error(
60 "No closure models currently exist to evaluate variable "
61 "resistivity. Use a constant resistivity only.");
65 _eta = mhd_params.get<
double>(
"Resistivity");
73 _c_h = mhd_params.get<
double>(
74 "Hyperbolic Divergence Cleaning Speed");
77 if (mhd_params.isType<
double>(
"Magnetic Correction Damping Factor"))
80 = mhd_params.get<
double>(
"Magnetic Correction Damping Factor");
89 KOKKOS_INLINE_FUNCTION
bool buildMagnCorr()
const
91 return _build_magn_corr;
95 KOKKOS_INLINE_FUNCTION
bool buildResistiveFlux()
const
97 return _build_resistive_flux;
101 KOKKOS_INLINE_FUNCTION
bool variableResistivity()
const
103 return _variable_resistivity;
107 KOKKOS_INLINE_FUNCTION
double vacuumMagneticPermeability()
const
113 KOKKOS_INLINE_FUNCTION
double resistivity()
const {
return _eta; }
116 KOKKOS_INLINE_FUNCTION
double hyperbolicDivergenceCleaningSpeed()
const
122 KOKKOS_INLINE_FUNCTION
double magneticCorrectionDampingFactor()
const
128 bool _build_magn_corr;
129 bool _build_resistive_flux;
130 bool _variable_resistivity;
140 #endif // VERTEXCFD_FULLINDUCTIONMHDPROPERTIES_HPP