各位大佬,
标准k-epsilon模型中的epsEqn:
// Dissipation equation
tmp<fvScalarMatrix> epsEqn
(
fvm::ddt(alpha, rho, epsilon_)
+ fvm::div(alphaRhoPhi, epsilon_)
- fvm::laplacian(alpha*rho*DepsilonEff(), epsilon_)
==
C1_*alpha()*rho()*G*epsilon_()/k_()
- fvm::SuSp(((2.0/3.0)*C1_ - C3_)*alpha()*rho()*divU, epsilon_)
- fvm::Sp(C2_*alpha()*rho()*epsilon_()/k_(), epsilon_)
+ epsilonSource()
+ fvModels.source(alpha, rho, epsilon_)
);
请问epsilon_()与k_()中的操作符()返回的是上一个迭代步/时间步的值吗?
另外,我想像LaunderSharmaKE一样改变这一项的系数
- fvm::Sp(C2_*alpha()*rho()*epsilon_()/k_(), epsilon_)
参考LaunderSharmaKE中定义系数的代码:
//LaunderSharmaKE.H声明
tmp<volScalarField> f2() const;
//LaunderSharmaKE.C定义
template<class BasicMomentumTransportModel>
tmp<volScalarField> LaunderSharmaKE<BasicMomentumTransportModel>::f2() const
{
return
scalar(1)
- 0.3*exp(-min(sqr(sqr(k_)/(this->nu()*epsilon_)), scalar(50.0)));
}
参考LaunderSharmaKE定义的epsilonEqn:
tmp<fvScalarMatrix> epsEqn
(
fvm::ddt(alpha, rho, epsilon_)
+ fvm::div(alphaRhoPhi, epsilon_)
- fvm::laplacian(alpha*rho*DepsilonEff(), epsilon_)
==
C1_*alpha*rho*G*epsilon_/k_
- fvm::SuSp(((2.0/3.0)*C1_ - C3_)*alpha*rho*divU, epsilon_)
- fvm::Sp(C2_*f2()*alpha*rho*epsilon_/k_, epsilon_)
+ alpha*rho*E
+ epsilonSource()
+ fvModels.source(alpha, rho, epsilon_)
);
LaunderSharmaKE中直接使用的是epsilon_,k_,不加括号表示的是下一个迭代步的待求值吗?
如果在标准k-epsilon中定义一模一样的函数f2()
,并加到eqsEqn
中,只有将标准k-epsilon中的epsilon_(), k_()
改为epsilon_, k_
,编译才能通过,否则会因为无法匹配Sp函数报错:
error: no matching function for call to ‘Sp(Foam::tmp<Foam::Field<double> >, Foam::volScalarField&)’
418 | - fvm::Sp(C2_*f2()*alpha()*rho()*epsilon_()/k_(), epsilon_)
那么我将epsilon_()/k_()
直接改为epsilon_/k_
会影响结果吗?
或者有没有其他解决方法
谢谢各位大佬!!