7#ifndef MAIA_MATERIALSTATE_H
8#define MAIA_MATERIALSTATE_H
17 friend class LPT<nDim>;
38 std::array<MFloat, 4>
m_cp = {0.0, 0.0, 0.0, 0.0};
39 std::array<MFloat, 4>
m_my = {0.0, 0.0, 0.0, 0.0};
40 std::array<MFloat, 4>
m_thCond = {0.0, 0.0, 0.0, 0.0};
41 std::array<MFloat, 4>
m_diffC = {0.0, 0.0, 0.0, 0.0};
42 std::array<MFloat, 4>
m_lH_ev = {0.0, 0.0, 0.0, 0.0};
47 std::array<MFloat, 4>
m_fluidThCond = {3.227E-3, 8.3894E-5, -1.9858E-8, 0.0};
48 std::array<MFloat, 4>
m_Pr = {0.815, -0.0004958, 0.0000004514, 0.0};
191 void readProperties() {
192 MBool heatCoupling =
false;
193 heatCoupling = Context::getSolverProperty<MBool>(
"particleHeatCoupling",
solverId, AT_, &heatCoupling);
195 MBool evaporation =
false;
196 evaporation = Context::getSolverProperty<MBool>(
"particleEvaporation",
solverId, AT_, &evaporation);
198 MBool nonDimensional =
false;
199 nonDimensional = Context::getSolverProperty<MBool>(
"nonDimensionaliseLPT",
solverId, AT_, &nonDimensional);
201 const std::array<MString, 4> suffix = {
"_a",
"_b",
"_c",
"_d"};
252 static constexpr MFloat defaultAirCP = 1005;
255 m_cp[0] = Context::getSolverProperty<MFloat>(
"particleCP",
solverId, AT_, &defaultAirCP);
257 m_cp[0] = Context::getSolverProperty<MFloat>(
"particleCP_a",
solverId, AT_, &defaultAirCP);
275 if(heatCoupling || evaporation) {
299 static constexpr MFloat defaultAirTB = 58;
300 m_boilingPoint = Context::getSolverProperty<MFloat>(
"particleBoilingPoint",
solverId, AT_, &defaultAirTB);
309 for(
MInt i = 0; i < 4; ++i) {
321 for(
MInt i = 0; i < 4; ++i) {
322 m_cp[i] = Context::getSolverProperty<MFloat>(
"particleCP" + suffix[i],
solverId, AT_, &
m_cp[i]);
333 mTerm(1, AT_,
"Property particleMy_a not found, but is required for the Simulation!");
335 for(
MInt i = 0; i < 4; ++i) {
336 m_my[i] = Context::getSolverProperty<MFloat>(
"particleMy" + suffix[i],
solverId, AT_, &
m_my[i]);
347 mTerm(1, AT_,
"Property particleThCond_a not found, but is required for the Simulation!");
349 for(
MInt i = 0; i < 4; ++i) {
361 mTerm(1, AT_,
"Property particleDiffC_a not found, but is required for the Simulation!");
363 for(
MInt i = 0; i < 4; ++i) {
375 mTerm(1, AT_,
"Property particleLH_ev_a not found, but is required for the Simulation!");
377 for(
MInt i = 0; i < 4; ++i) {
388 for(
MInt i = 0; i < 4; ++i) {
405 for(
MInt i = 0; i < 4; ++i) {
421 for(
MInt i = 0; i < 4; ++i) {
434 for(
MInt i = 0; i < 4; ++i) {
447 for(
MInt i = 0; i < 4; ++i) {
448 m_Pr[i] = Context::getSolverProperty<MFloat>(
"fluidPr" + suffix[i],
solverId, AT_, &
m_Pr[i]);
474 MString viscosityLaw =
"SUTHERLAND";
475 viscosityLaw = Context::getSolverProperty<MString>(
"viscosityLaw",
solverId, AT_, &viscosityLaw);
489 MFloat referenceTemperature = 273.15;
490 referenceTemperature =
491 Context::getSolverProperty<MFloat>(
"referenceTemperature",
solverId, AT_, &referenceTemperature);
519 m_nu = Context::getSolverProperty<MFloat>(
"ambientViscosity",
solverId, AT_);
522 if(!nonDimensional) {
548 disperse = Context::getSolverProperty<MFloat>(
"particleDensity",
solverId, AT_, &disperse);
550 continous = Context::getSolverProperty<MFloat>(
"ambientDensity",
solverId, AT_, &continous);
560 continous = Context::getSolverProperty<MFloat>(
"ambientDensity",
solverId, AT_, &continous);
561 if(continous > 0.0) {
568 mTerm(1, AT_,
"Particle-density not set!");
594 mTerm(1, AT_,
"Invalid viscosity law");
603 mTerm(1, AT_,
"Set particle density instead!");
608 mTerm(1, AT_,
"Set particle density!");
619 mTerm(1, AT_,
"Invalid viscosity law");
static MBool propertyExists(const MString &name, MInt solver=m_noSolvers)
This function checks if a property exists in general.
std::array< MFloat, 4 > m_liquidThCond
MFloat m_sutherlandConstant
std::array< MFloat, 4 > m_Pr
MFloat checkWithTemperatureRange(const MFloat temperature_)
MFloat m_temperatureLower
MFloat m_sutherlandPlusOne
MFloat airPrandtl(const MFloat temperature_)
std::array< MFloat, 4 > m_thCond
MFloat dynamicViscosity(const MFloat temperature_)
std::array< MFloat, 4 > m_cp
MFloat density(const MFloat temperature_=1)
std::array< MFloat, 4 > m_particleDensity
MFloat diffusionCoefficient(const MFloat temperature_)
MFloat m_particleTemperature
MFloat dynViscosityFun(const MFloat temperature_)
MFloat airThermalConductivity(const MFloat temperature_)
std::array< MFloat, 4 > m_diffC
std::array< MFloat, 4 > m_my
MFloat liquidDynamicViscosity(const MFloat temperature_)
MFloat liquidThermalConductivity(const MFloat temperature_)
MaterialState(const MInt solverId_)
MFloat latentHeatEvap(const MFloat temperature_)
MFloat thermalConductivity(const MFloat temperature_)
MFloat m_molarWeightRatio
std::array< MFloat, 4 > m_surfaceTension
MFloat m_temperatureUpper
std::array< MFloat, 4 > m_lH_ev
std::array< MFloat, 4 > m_fluidThCond
std::function< MFloat(const MFloat T)> m_viscosityFunction
MFloat cp(const MFloat temperature_=1)
std::array< MFloat, 4 > m_liquidMy
MFloat m_temperatureFactor
MFloat spraySurfaceTension(const MFloat temperature_=1)
MFloat ambientDensityRatio()
MInt string2enum(MString theString)
This global function translates strings in their corresponding enum values (integer values)....
void mTerm(const MInt errorCode, const MString &location, const MString &message)
constexpr Real POW3(const Real x)
constexpr Real POW2(const Real x)
std::basic_string< char > MString