1#ifndef MODEL_GAS_TRANSPORT_MIXTURE_AVERAGED_H_
2#define MODEL_GAS_TRANSPORT_MIXTURE_AVERAGED_H_
43 static constexpr const char*
name =
"mixture_averaged";
48 std::vector<double>
MW;
69 if (value.
type ==
"constant")
76 else if (value.
type ==
"LJ")
95 double S = 1.16145 * pow(Tstar, -0.14874)
96 + 0.52487 / exp(0.77320 * Tstar)
97 + 2.16178 / exp(2.43787 * Tstar);
105 double cp =
thermo.cp_mol(T,
X, i, j, k);
106 return mu_enskog(T, n) * (
X(i, j, k, n) * cp + 1.25 *
Rg) /
MW[n];
114 if (
type ==
"constant" )
117 for (
int a = 0; a <
nspecies; ++a) {
118 double mua =
val1[a];
121 for (
int b = 0; b <
nspecies; ++b) {
122 double mub =
val1[b];
124 double ratio = pow(MWb / MWa, 0.25);
125 double mu_ratio = sqrt(mua / mub);
126 double term = sqrt(1.0 + MWa / MWb);
127 phi +=
X(i,j,k,b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
129 mu_mix +=
X(i, j, k, a) * mua / phi;
132 else if (
type ==
"LJ" )
135 for (
int a = 0; a <
nspecies; ++a) {
139 for (
int b = 0; b <
nspecies; ++b) {
142 double ratio = pow(MWb / MWa, 0.25);
143 double mu_ratio = sqrt(mua / mub);
144 double term = sqrt(1.0 + MWa / MWb);
145 phi +=
X(i, j, k, b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
147 mu_mix +=
X(i, j, k, a) * mua / phi;
155 if (!(mu_mix == mu_mix) ) mu_mix = 0.0;
163 if (
type ==
"constant" )
166 for (
int a = 0; a <
nspecies; ++a) {
167 double mua =
val1[a];
170 for (
int b = 0; b <
nspecies; ++b) {
171 double mub =
val1[b];
173 double ratio = pow(MWb / MWa, 0.25);
174 double mu_ratio = sqrt(mua / mub);
175 double term = sqrt(1.0 + MWa / MWb);
176 phi +=
X(i, j, k, b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
178 k_mix +=
X(i, j, k, a) *
val2[a] / phi;
181 else if (
type ==
"LJ" )
184 for (
int a = 0; a <
nspecies; ++a) {
188 for (
int b = 0; b <
nspecies; ++b) {
191 double ratio = pow(MWb / MWa, 0.25);
192 double mu_ratio = sqrt(mua / mub);
193 double term = sqrt(1.0 + MWa / MWb);
194 phi +=
X(i, j, k, b) * pow(1.0 + mu_ratio * ratio, 2.0) / (sqrt(8.0) * term);
196 k_mix +=
X(i, j, k, a) *
k_eucken(T,
X, i, j, k, a) / phi;
212 for (
int a = 0; a <
nspecies; ++a) {
214 for (
int b = 0; b <
nspecies; ++b) {
215 if (a == b)
continue;
217 double sigmaAB = 0.5 * (
val1[a] +
val1[b]);
218 double epsAB = sqrt(
val2[a] *
val2[b]);
219 double Tstar = T / epsAB;
222 1.06036 / pow(Tstar, 0.15610) +
223 0.19300 / exp(0.47635 * Tstar) +
224 1.03587 / exp(1.52996 * Tstar) +
225 1.76474 / exp(3.89411 * Tstar);
228 0.0018583 * sqrt(T*T*T * (1.0 /
MW[a] + 1.0 /
MW[b])) /
229 ( (P / 101325.0) * sigmaAB*sigmaAB * omegaAB );
232 sumD +=
X(i, j, k, b) / DAB;
235 DKM(i, j, k, a) = (1.0 -
X(i, j, k ,a)) / sumD;
236 if (!(DKM(i, j, k, a) == DKM(i, j, k, a))) DKM(i, j, k, a) = 0.0;
int queryarr_required(std::string name, std::vector< T > &value)
int query_validate(std::string name, int &value, std::vector< int > possibleintvals)
double dynamic_viscosity(double T, Set::Patch< const Set::Scalar > &X, int i, int j, int k) const
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) const
double thermal_conductivity(double T, Set::Patch< const Set::Scalar > &X, int i, int j, int k) const
static void Parse(Mixture_Averaged &value, IO::ParmParse &pp, int a_nspecies, std::vector< double > &a_MW, Thermo::Thermo< Thermo::CpConstant > a_thermo)
double collision_integral(double Tstar) const
double mu_enskog(double T, int i) const
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
Thermo::Thermo< Thermo::CpConstant > thermo
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()