alpha 和 alphat 的计算

alpha 和 alphat 的计算

背景知识

  • ν\nu 运动粘度 kinematic viscosity 单位是 [m^2/s]
  • μ\mu 动力粘度 dynamic viscosity 单位是 [kg/(m*s)]
  • α\alpha 焓的扩散系数 Thermal diffusivity of enthalpy 单位同μ\mu,即 [kg/(m*s)] ,α=λCp\alpha=\frac{\lambda}{C_p}
  • κ\kappa(OF 中用这个) 即λ\lambda(某些文献用这个) 导热系数(温度的扩散系数) Thermal conductivity [W/(m*K)]
  • Pr=νDtP_r=\frac{\nu}{D_t} 动量扩散系数ν\nu 和 热扩散系数DtD_t 之比Dt=λρCpD_t=\frac{\lambda}{\rho C_p},这里是指焓的扩散系数。因此Pr=νDt=νλ/(ρCp)=μλ/Cp=μαP_r=\frac{\nu}{D_t}=\frac{\nu}{\lambda/(\rho C_p)}=\frac{\mu}{\lambda /C_p}=\frac{\mu}{\alpha}
  • Le=DtDkL_e=\frac{D_t}{D_k} 热扩散速度DtD_t 和 质量扩散系数 之比
  • Sc=νDkS_c=\frac{\nu}{D_k} 动量扩散系数ν\nu 和 质量扩散系数 之比
    假设Pr=1P_r=1,可以得到λ=μCp\lambda=\mu C_p,又有α=μ\alpha=\mu
    假设Le=1L_e=1,可以得到Dk=λρCpD_k=\frac{\lambda}{\rho C_p}
    假设Sc=1S_c=1,可以得到Dk=νD_k=\nu

OF 定义

moleWeight_ 可以由函数 W() 获取,单位是 [kg/kmol]
cp 单位是 [J/(kmolK)]
Cp=cvWC_p=\frac{cv}{W} 单位是 [J/(kg
K)],这是教材上的一般用法。
hsh_s 单位是 [J/kmol]
HsH_s 单位是 [J/kg]

alpha 和 alphat 的计算

本文代码几乎全部在 /src/thermophysicalModels 文件夹下。

代码在 /basic/psiThermo/hePsiThermo.C 中:

const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();

scalarField& TCells = this->T_.internalField();
scalarField& psiCells = this->psi_.internalField();
scalarField& muCells = this->mu_.internalField();
scalarField& alphaCells = this->alpha_.internalField();

forAll(TCells, celli)
{
const typename MixtureType::thermoType& mixture_ =
this->cellMixture(celli);
TCells[celli] = mixture_.THE
(
hCells[celli],
pCells[celli],
TCells[celli]
);
psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]);
muCells[celli] = mixture_.mu(pCells[celli], TCells[celli]);
alphaCells[celli] = mixture_.alphah(pCells[celli], TCells[celli]);
}

/specie/transport/sutherland/sutherlandTransportI.H

template<class Thermo>
inline Foam::scalar Foam::sutherlandTransport<Thermo>::kappa
(
const scalar p, const scalar T
) const
{
scalar Cv_ = this->Cv(p, T);
return mu(p, T)*Cv_*(1.32 + 1.77*this->R()/Cv_);
}

template<class Thermo>
inline Foam::scalar Foam::sutherlandTransport<Thermo>::alphah
(
const scalar p,
const scalar T
) const
{
return kappa(p, T)/this->Cp(p, T);
}

RASModel.H

virtual tmp<volScalarField> alphaEff() const
{
return thermo().alphaEff(alphat());
}

heThermo.C

template<class BasicThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heThermo<BasicThermo, MixtureType>::alphaEff
(
const volScalarField& alphat
) const
{
tmp<Foam::volScalarField> alphaEff(this->CpByCpv()*(this->alpha_ + alphat));
alphaEff.ref().rename("alphaEff");
return alphaEff;
}
// 其中h为焓时 CpByCpv 等于 1; h为内能时,CpByCpv 等于 gamma

这里的 alpha_ 是层流的,它定义在 basicThermo 中。
alpha() 函数会返回 alpha_,通过修改 alpha() 函数也能更新 alpha_

alphat() 在哪里计算?

EddyDiffusivity.C

template<class BasicTurbulenceModel>
void Foam::EddyDiffusivity<BasicTurbulenceModel>::correctNut()
{
// Read Prt if provided
Prt_ = dimensioned<scalar>::lookupOrDefault
(
"Prt",
this->coeffDict(),
1.0
);

alphat_ = this->rho_*this->nut()/Prt_;
alphat_.correctBoundaryConditions();
}

mu mut 的计算

sutherlandTransportI.H

template<class Thermo>
inline Foam::scalar Foam::sutherlandTransport<Thermo>::mu
(
const scalar p,
const scalar T
) const
{
return As_*::sqrt(T)/(1.0 + Ts_/T);
}

CompressibleTurbulenceModel.H

//- Return the effective dynamic viscosity
virtual tmp<volScalarField> muEff() const
{
return mut() + mu();
}

//- Return the turbulence dynamic viscosity
virtual tmp<volScalarField> mut() const
{
return this->rho_*this->nut();
}

eddyViscosity.H

//- Return the turbulence viscosity
virtual tmp<volScalarField> nut() const
{
return nut_;
}

kEpsilon.C

template<class BasicTurbulenceModel>
void kEpsilon<BasicTurbulenceModel>::correctNut()
{
this->nut_ = Cmu_*sqr(k_)/epsilon_;
this->nut_.correctBoundaryConditions();
fv::options::New(this->mesh_).correct(this->nut_);

BasicTurbulenceModel::correctNut();
}
文章作者: Yan Zhang
文章链接: https://openfoam.top/alpha/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 OpenFOAM 成长之路
您的肯定会给我更大动力~