1#ifndef MODEL_GAS_TRANSPORT_MIXTURE_AVERAGED_H_
2#define MODEL_GAS_TRANSPORT_MIXTURE_AVERAGED_H_
41 static constexpr const char*
name =
"mixture_averaged";
46 std::vector<double> &
MW;
66 if (value.
type ==
"constant")
73 else if (value.
type ==
"LJ")
92 double S = 1.16145 * pow(Tstar, -0.14874)
93 + 0.52487 / exp(0.77320 * Tstar)
94 + 2.16178 / exp(2.43787 * Tstar);
112 if (
type ==
"constant" )
115 for (
int a = 0; a <
nspecies; ++a) {
116 double mua =
val1[a];
119 for (
int b = 0; b <
nspecies; ++b) {
120 double mub =
val1[b];
122 double ratio = pow(MWb / MWa, 0.25);
123 double mu_ratio = sqrt(mua / mub);
124 double term = sqrt(1.0 + MWa / MWb);
125 phi +=
X(i,j,k,b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
127 mu_mix +=
X(i, j, k, a) * mua / phi;
130 else if (
type ==
"LJ" )
133 for (
int a = 0; a <
nspecies; ++a) {
137 for (
int b = 0; b <
nspecies; ++b) {
140 double ratio = pow(MWb / MWa, 0.25);
141 double mu_ratio = sqrt(mua / mub);
142 double term = sqrt(1.0 + MWa / MWb);
143 phi +=
X(i, j, k, b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
145 mu_mix +=
X(i, j, k, a) * mua / phi;
153 if (!(mu_mix == mu_mix) ) mu_mix = 0.0;
161 if (
type ==
"constant" )
164 for (
int a = 0; a <
nspecies; ++a) {
165 double mua =
val1[a];
168 for (
int b = 0; b <
nspecies; ++b) {
169 double mub =
val1[b];
171 double ratio = pow(MWb / MWa, 0.25);
172 double mu_ratio = sqrt(mua / mub);
173 double term = sqrt(1.0 + MWa / MWb);
174 phi +=
X(i, j, k, b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
176 k_mix +=
X(i, j, k, a) *
val2[a] / phi;
179 else if (
type ==
"LJ" )
182 for (
int a = 0; a <
nspecies; ++a) {
186 for (
int b = 0; b <
nspecies; ++b) {
189 double ratio = pow(MWb / MWa, 0.25);
190 double mu_ratio = sqrt(mua / mub);
191 double term = sqrt(1.0 + MWa / MWb);
192 phi +=
X(i, j, k, b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
194 k_mix +=
X(i, j, k, a) *
k_eucken(T,
X, i, j, k, a) / phi;
210 for (
int a = 0; a <
nspecies; ++a) {
212 for (
int b = 0; b <
nspecies; ++b) {
213 if (a == b)
continue;
215 double sigmaAB = 0.5 * (
val1[a] +
val1[b]);
216 double epsAB = sqrt(
val2[a] *
val2[b]);
217 double Tstar = T / epsAB;
220 1.06036 / pow(Tstar, 0.15610) +
221 0.19300 / exp(0.47635 * Tstar) +
222 1.03587 / exp(1.52996 * Tstar) +
223 1.76474 / exp(3.89411 * Tstar);
226 0.0018583 * sqrt(T*T*T * (1.0 /
MW[a] + 1.0 /
MW[b])) /
227 ( (P / 101325.0) * sigmaAB*sigmaAB * omegaAB );
230 sumD +=
X(i, j, k, b) / DAB;
233 DKM(i, j, k, a) = (1.0 -
X(i, j, k ,a)) / sumD;
234 if (!(DKM(i, j, k, a) == DKM(i, j, k, a))) DKM(i, j, k, a) = 0.0;
void queryclass(std::string name, T *value)
int queryarr_required(std::string name, std::vector< T > &value)
int query_validate(std::string name, int &value, std::vector< int > possibleintvals)
virtual double cp_mol(double T, Set::Patch< const Set::Scalar > &X, int i, int j, int k) const =0
Mixture_Averaged(int a_nspecies, std::vector< double > &a_MW, Thermo::Thermo *a_thermo, IO::ParmParse &pp, std::string name)
static constexpr const char * name
void diffusion_coeffs(Set::Patch< Set::Scalar > &DKM, double T, double P, Set::Patch< const Set::Scalar > &X, int i, int j, int k) override
virtual const char * model_name() const override
Mixture_Averaged()=delete
Thermo::Thermo const *const thermo
double dynamic_viscosity(double T, Set::Patch< const Set::Scalar > &X, int i, int j, int k) const override
double collision_integral(double Tstar) const
static void Parse(Mixture_Averaged &value, IO::ParmParse &pp)
double mu_enskog(double T, int i) const
double thermal_conductivity(double T, Set::Patch< const Set::Scalar > &X, int i, int j, int k) const override
std::vector< double > val1
double k_eucken(double T, Set::Patch< const Set::Scalar > &X, int i, int j, int k, int n) const
std::vector< double > val2
std::vector< double > & MW
~Mixture_Averaged() override=default
Eigen::Matrix< amrex::Real, AMREX_SPACEDIM, 1 > Vector
void Abort(const char *msg)
AMREX_FORCE_INLINE void Assert(std::string file, std::string func, int line, std::string smt, bool pass, Args const &... args)
static Unit Temperature()