关于壁面函数有些不懂
-
@lsprxd 在 关于壁面函数有些不懂 中说:
无网格伽辽金法
很抱歉对伽辽金不是很熟悉。
你图片中的是求解NS方程和湍流模型的整体策略。壁面函数是在2.2和2.1之间内部调用的。OpenFOAM中的做法是:- 首先通过方程28求解网格面第一层网格体心得
epsilon
; - 通过方程35求解G;
- 求解
epsilon
方程,其中epsilon
的边界条件极为第一层网格体心得epsilon
,也就是你之前发的中文部分的内容; - 然后求解
k
- 然后通过
k
和epsilon
更新wall粘度
- 首先通过方程28求解网格面第一层网格体心得
-
-
@random_ran
好多文献就是这样的,给定初值,求解N-S,得到速度带入k-e,更新湍流粘度。就是第二张图片那个连接里面的,而且他直接在wall上设置k和e为0
-
-
在网上看的有人这样说的“最简单的办法是用对第一个节点的K,E直接赋值,由U+,Y+计算ut(摩擦速度),K=ut*ut/sqrt(0.09),E=ut**3/y/0.42”,这个赋值是赋在壁面上?这个p点是距壁面y处的值,那这些赋值的位置应该是距壁面y处的所有值吗?
-
当求解湍流粘度的时候需要调用y+(看方程31),其可以采用不同的方法,最简单的方法就是我网页那种方法,然而另一种方法就是上文中提出的牛顿迭代法。俩种方法最后都需要使用方程31更新粘度。
下面是OpenFOAM中采用我网页中方法的步骤:
tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const { const label patchi = patch().index(); const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> ( IOobject::groupName ( turbulenceModel::propertiesName, internalField().group() ) ); const scalarField& y = turbModel.y()[patchi]; const tmp<volScalarField> tk = turbModel.k(); const volScalarField& k = tk(); const tmp<scalarField> tnuw = turbModel.nu(patchi); const scalarField& nuw = tnuw(); const scalar Cmu25 = pow025(Cmu_); tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw.ref(); forAll(nutw, facei) { label faceCelli = patch().faceCells()[facei]; scalar yPlus = Cmu25*y[facei]*sqrt(k[faceCelli])/nuw[facei];//简单计算y+ if (yPlus > yPlusLam_) { nutw[facei] = nuw[facei]*(yPlus*kappa_/log(E_*yPlus) - 1.0);//方程31 } } return tnutw; } 下面是OpenFOAM中采用你截图的迭代法求解的步骤:
tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcNut() const { const label patchi = patch().index(); const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> ( IOobject::groupName ( turbulenceModel::propertiesName, internalField().group() ) ); const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magUp(mag(Uw.patchInternalField() - Uw)); const tmp<scalarField> tnuw = turbModel.nu(patchi); const scalarField& nuw = tnuw(); tmp<scalarField> tyPlus = calcYPlus(magUp);//通过速度迭代计算y+ scalarField& yPlus = tyPlus.ref(); tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw.ref(); forAll(yPlus, facei) { if (yPlus[facei] > yPlusLam_) { nutw[facei] = nuw[facei]*(yPlus[facei]*kappa_/log(E_*yPlus[facei]) - 1.0);//方程31 } } return tnutw; } 一直时间很紧没有时间细看这个帖子,不过看起来非常有意思,近期我更新一下你贴图那种方法的思路。
-
@lsprxd 在 关于壁面函数有些不懂 中说:
但距离壁面y处的点应该有好多啊
只是距离壁面网格点的那个点,只有一个。
抱歉最近事情比较多,不过你这个我会找时间把另一种更新y+的方法更新在我的网页。可能一个月之内吧....
-
@lsprxd
壁面函数部分更做了一小部分,但没更新完,看这:OpenFOAM中的壁面函数
你可以看看公式6和公式4,应该是岳哥说的那种不同计算y+的方式。
2017年4月25日 06:36
18/26
2018年1月17日 09:29