alpha 和 alphat 的计算
背景知识
- ν 运动粘度 kinematic viscosity 单位是 [m^2/s]
- μ 动力粘度 dynamic viscosity 单位是 [kg/(m*s)]
- α 焓的扩散系数 Thermal diffusivity of enthalpy 单位同μ,即 [kg/(m*s)] ,α=Cpλ
- κ(OF 中用这个) 即λ(某些文献用这个) 导热系数(温度的扩散系数) Thermal conductivity [W/(m*K)]
- Pr=Dtν 动量扩散系数ν 和 热扩散系数Dt 之比Dt=ρCpλ,这里是指焓的扩散系数。因此Pr=Dtν=λ/(ρCp)ν=λ/Cpμ=αμ
- Le=DkDt 热扩散速度Dt 和 质量扩散系数 之比
- Sc=Dkν 动量扩散系数ν 和 质量扩散系数 之比
假设Pr=1,可以得到λ=μCp,又有α=μ
假设Le=1,可以得到Dk=ρCpλ
假设Sc=1,可以得到Dk=ν
OF 定义
moleWeight_
可以由函数 W()
获取,单位是 [kg/kmol]
cp
单位是 [J/(kmolK)]
Cp=Wcv 单位是 [J/(kgK)],这是教材上的一般用法。
hs 单位是 [J/kmol]
Hs 单位是 [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; }
|
这里的 alpha_
是层流的,它定义在 basicThermo
中。
alpha()
函数会返回 alpha_
,通过修改 alpha()
函数也能更新 alpha_
。
alphat()
在哪里计算?
EddyDiffusivity.C
template<class BasicTurbulenceModel> void Foam::EddyDiffusivity<BasicTurbulenceModel>::correctNut() { 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
virtual tmp<volScalarField> muEff() const { return mut() + mu(); }
virtual tmp<volScalarField> mut() const { return this->rho_*this->nut(); }
|
eddyViscosity.H
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(); }
|