Skip to content
  • 有关压力速度耦合算法的文章

    Algorithm
    2
    0 赞同
    2 帖子
    5k 浏览
    W

    @李东岳 coupled solver比segregated solver能更快收敛,但在处理复杂几何形状物体时不太容易收敛[1]。

    [1] http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2012/KlasJareteg/KlasJareteg-OF2012-Project-3-Version-2.0.pdf

  • 三重压力:我为什么要离开北京

    CFD彩虹条
    2
    0 赞同
    2 帖子
    4k 浏览
    李东岳

    这个人2018年发的贴,2020年更新了一下,转给大家看看

    到南京高校不到两年,接连评上了副教授、博导、教授~原本在北京评个副研究员都费劲。大学老师比科研院所,舒服太多了!
    过去一年半,是我过得最幸福的一段时光。
    对应三重压力都没了。具体来看:
    收入原来的累死累活拿到30个,现在轻松30个。原来各种单位和领导的任务,现在没有领导了,只有自己的想干的任务。成果质量数量都有明显提高。
    当然也有不爽的地方,比如不如北京有契约精神、红眼病严重、管理水平差的一比等。估计和我到学校不是太好有关系。
    但总体来看,还是比北京爽太多,才是我想要的有钱而自由的生活。不过,下次可以考虑去个更好点的高校。

  • icoFoam运算出错

    OpenFOAM
    8
    0 赞同
    8 帖子
    7k 浏览
    Z

    @李东岳 好的,谢谢李老师

  • particle erosion函数

    OpenFOAM
    3
    0 赞同
    3 帖子
    4k 浏览
    杨英狄

    @星星星星晴 非常感谢!

  • 0 赞同
    6 帖子
    6k 浏览
    A

    @tens 感谢您的回复,我试着把这个头文件加入到.C文件中,但是对编译结果貌似并没有作用,报错是一样的。已经把我觉得可能能用到的头文件都放进去了:135:

    #include "mylinearSpring.H" #include "addToRunTimeSelectionTable.H" #include "sixDoFRigidBodyMotion.H" // Foam classes #include "OFstream.H" #include "IFstream.H" #include "Vector.H" // std classes #include <stdio.h> #include <fstream> #include <iostream> #include <string.h> #include <stdlib.h> #include "pointPatchFields.H" #include "addToRunTimeSelectionTable.H" #include "Time.H" #include "polyMesh.H" #include "fixedValuePointPatchField.H" #include "fvCFD.H" #include "fvMesh.H" #include "volFields.H"
  • snappy加边界层

    Meshy
    4
    0 赞同
    4 帖子
    4k 浏览
    李东岳

    这个基本没有一针见血的办法,shm生成边界层已经是老大难了

  • 关于谱元法和有限体积需求网格的区别

    Meshy
    4
    0 赞同
    4 帖子
    6k 浏览
    S

    @XieXiaoyang 好文章,我去研究研究

  • LES-WALE中Ksgs如何求解

    OpenFOAM
    3
    0 赞同
    3 帖子
    6k 浏览
    香柏树

    谢谢李老师,我参考您链接里的方法改了WALE.C和.H文件,编译过程都很顺利,但是还是没有输出的Ksgs。想请您帮我看一下,我改动的在图片中,也附上了全部的WALE.C和.H文件。fb6aa985-d914-4113-a866-b6466dea71ce-图片.png 0a7c6741-e37a-475f-99f8-4bef8b726e18-图片.png 4112bd23-202d-439a-8cc4-daf15f9d19af-图片.png ```
    WALE.C

    ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "WALE.H" #include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { namespace LESModels { // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template<class BasicTurbulenceModel> tmp<volSymmTensorField> WALE<BasicTurbulenceModel>::Sd ( const volTensorField& gradU ) const { return dev(symm(gradU & gradU)); } template<class BasicTurbulenceModel> tmp<volScalarField> WALE<BasicTurbulenceModel>::k ( const volTensorField& gradU ) const { volScalarField magSqrSd(magSqr(Sd(gradU))); return tmp<volScalarField> ( new volScalarField ( IOobject ( IOobject::groupName("k", this->alphaRhoPhi_.group()), this->runTime_.timeName(), this->mesh_ ), sqr(sqr(Cw_)*this->delta()/Ck_)* ( pow3(magSqrSd) /( sqr ( pow(magSqr(symm(gradU)), 5.0/2.0) + pow(magSqrSd, 5.0/4.0) ) + dimensionedScalar ( "small", dimensionSet(0, 0, -10, 0, 0), small ) ) ) ) ); } template<class BasicTurbulenceModel> void WALE<BasicTurbulenceModel>::correctNut() { k_ = (this->k(fvc::grad(this->U_))); this->nut_ = Ck_*this->delta()*sqrt(k_); this->nut_.correctBoundaryConditions(); fv::options::New(this->mesh_).correct(this->nut_); BasicTurbulenceModel::correctNut(); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class BasicTurbulenceModel> WALE<BasicTurbulenceModel>::WALE ( const alphaField& alpha, const rhoField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, const word& type ) : LESeddyViscosity<BasicTurbulenceModel> ( type, alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName ), Ck_ ( dimensioned<scalar>::lookupOrAddToDict ( "Ck", this->coeffDict_, 0.094 ) ), k_ ( IOobject ( IOobject::groupName("k", this->alphaRhoPhi_.group()), this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), this->mesh_ ), Sd_ ( IOobject ( Cw_ ( dimensioned<scalar>::lookupOrAddToDict ( "Cw", this->coeffDict_, 0.325 ) ) { if (type == typeName) { this->printCoeffs(type); } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class BasicTurbulenceModel> bool WALE<BasicTurbulenceModel>::read() { if (LESeddyViscosity<BasicTurbulenceModel>::read()) { Ck_.readIfPresent(this->coeffDict()); Cw_.readIfPresent(this->coeffDict()); return true; } else { return false; } } template<class BasicTurbulenceModel> tmp<volScalarField> WALE<BasicTurbulenceModel>::epsilon() const { volScalarField k(this->k(fvc::grad(this->U_))); return tmp<volScalarField> ( new volScalarField ( IOobject ( IOobject::groupName("epsilon", this->alphaRhoPhi_.group()), this->runTime_.timeName(), this->mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), this->Ce_*k*sqrt(k)/this->delta() ) ); } template<class BasicTurbulenceModel> void WALE<BasicTurbulenceModel>::correct() { LESeddyViscosity<BasicTurbulenceModel>::correct(); correctNut(); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace LESModels } // End namespace Foam // ************************************************************************* //

    WALE.H
    /---------------------------------------------------------------------------\

    \ / F ield OpenFOAM: The Open Source CFD Toolbox \ / O peration Website: https://openfoam.org \ / A nd Copyright (C) 2015-2018 OpenFOAM Foundation \/ M anipulation

    License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.

    Class
    Foam::LESModels::WALE

    Description
    The Wall-adapting local eddy-viscosity (WALE) SGS model.

    Reference: \verbatim Nicoud, F., & Ducros, F. (1999). Subgrid-scale stress modelling based on the square of the velocity gradient tensor. Flow, Turbulence and Combustion, 62(3), 183-200. \endverbatim The default model coefficients are \verbatim WALECoeffs { Ck 0.094; Ce 1.048;e Cw 0.325; } \endverbatim

    See also
    Foam::LESModels::Smagorinsky

    SourceFiles
    WALE.C

    *---------------------------------------------------------------------------*/

    #ifndef WALE_H
    #define WALE_H

    #include "LESModel.H"
    #include "LESeddyViscosity.H"

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    namespace Foam
    {
    namespace LESModels
    {

    /---------------------------------------------------------------------------
    Class WALE Declaration
    *---------------------------------------------------------------------------*/

    template<class BasicTurbulenceModel>
    class WALE
    :
    public LESeddyViscosity<BasicTurbulenceModel>
    {
    // Private Member Functions

    // Disallow default bitwise copy construct and assignment WALE(const WALE&); void operator=(const WALE&);

    protected:

    // Protected data dimensionedScalar Ck_; dimensionedScalar Cw_; volScalarField k_; // Protected Member Functions //- Return the deviatoric symmetric part of the square of the given // velocity gradient field tmp<volSymmTensorField> Sd(const volTensorField& gradU) const; //- Return SGS kinetic energy // calculated from the given velocity gradient tmp<volScalarField> k(const volTensorField& gradU) const; //- Update the SGS eddy-viscosity virtual void correctNut();

    public:

    typedef typename BasicTurbulenceModel::alphaField alphaField; typedef typename BasicTurbulenceModel::rhoField rhoField; typedef typename BasicTurbulenceModel::transportModel transportModel; //- Runtime type information TypeName("WALE"); // Constructors //- Construct from components WALE ( const alphaField& alpha, const rhoField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, const word& type = typeName ); //- Destructor virtual ~WALE() {} // Member Functions //- Read model coefficients if they have changed virtual bool read(); //- Return SGS kinetic energy virtual tmp<volScalarField> k() const { return k(fvc::grad(this->U_)); } //- Return sub-grid disipation rate virtual tmp<volScalarField> epsilon() const; //- Correct Eddy-Viscosity and related properties virtual void correct();

    };

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    } // End namespace LESModels
    } // End namespace Foam

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    #ifdef NoRepository
    #include "WALE.C"
    #endif

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    #endif

    // ************************************************************************* //

  • 亚临界流体的物性分段设置后发散

    Fluent
    1
    0 赞同
    1 帖子
    2k 浏览
    F

    计算亚临界水在圆管中的流动和传热,压力为20MPa,流体入口温度300k,管壁623k,想计算二维稳态下的管内的温度分布,用水的常物性参数很快就收敛了,但是分段插值改成变物性后就收敛不了,请教下是什么原因?
    1.jpg

  • 0 赞同
    5 帖子
    11k 浏览
    李东岳

    epsi=0.09* k*omega
    可以

  • 0 赞同
    15 帖子
    18k 浏览
    J

    @thegame 我看之前老师回答我的是要用splitMeshRegions命令将网格分开,请问你知道toposet命令的具体操作吗?我才接触这个openfoam,不是很熟练。

  • 0 赞同
    5 帖子
    9k 浏览
    李东岳

    @TStones 我们也发现过ansys fluent2022版本的一些小问题。但是因为是黑箱,目前也不知道咋回事。我联系过美国ansys公司,他们跟进了一次后来没有回复了。不知道2023版本会不会有改进。

  • 0 赞同
    5 帖子
    10k 浏览
    J

    @李东岳 好的,谢谢!

  • 关于相邻cell

    OpenFOAM
    8
    0 赞同
    8 帖子
    11k 浏览

    @星星星星晴 本来没想到这么慢,结果发现假如我有1M parcel,1M cell 就要搞1M x 1M次, 实在有点笨。然后现在改为之前那个方法了。。 可能是当时不知道怎么回事有点脑残吧,搞错了,相邻cell一层一层搞出来快很多。。 下面是code, 编程能力有限,想搞成个function,总觉得麻烦。。不过改成function的话应该可以弄n层了吧。。

    还是python好写。。。

    if (neighbor_) { //Info << "cellI = " <<cellI<<nl; //- first layer List<int> first = this->owner().mesh().cellCells()[cellI]; first.append(cellI); sort(first); all_neighbor.append(first); int first_size = first.size(); //Info << "cellI = " << first <<nl; //- second layer List<int> second_all; for (int i1 = 0; i1<first_size; i1++){ List<int> second = this->owner().mesh().cellCells()[first[i1]]; //Info << "cellI second = " << second <<nl; second_all.append(second); } List<int> order,second_unique; uniqueOrder(second_all, order); forAll(order,kk) { second_unique.append(second_all[order[kk]]); } sort(second_unique); all_neighbor.append(second_unique); //- third layer List<int> third_all; for (int i1 = 0; i1<second_unique.size(); i1++){ List<int> third = this->owner().mesh().cellCells()[second_unique[i1]]; //Info << "cellI third = " << third <<nl; third_all.append(third); } List<int> order3,third_unique; uniqueOrder(third_all, order3); forAll(order3,kk) { third_unique.append(third_all[order3[kk]]); } sort(third_unique); all_neighbor.append(third_unique); //- Fourth layer List<int> fourth_all; for (int i1 = 0; i1<third_unique.size(); i1++){ List<int> fourth = this->owner().mesh().cellCells()[third_unique[i1]]; fourth_all.append(fourth); } List<int> order4,fourth_unique; uniqueOrder(fourth_all, order4); forAll(order4,kk) { fourth_unique.append(fourth_all[order4[kk]]); } sort(fourth_unique); all_neighbor.append(fourth_unique); //- collect all List<int> order_all; uniqueOrder(all_neighbor, order_all); forAll(order_all,kk) { all_neighbor_unique.append(all_neighbor[order_all[kk]]); } sort(all_neighbor_unique);
  • 0 赞同
    7 帖子
    10k 浏览
    Y

    @冠竹 您好,老师。我最近弄的和你是类似的,我是准备弄这个湿蒸汽的凝结模型,在动量方程和能量方程中添加质量传输的原项,以及添加2个用户自定义的标量函数UDS。我比较疑惑这个UDS的书写格式,因为我看书上写的是直接在user-define面板上定义两个UDS就可以,并没有写啥非稳态项和对流项的udf。但运算的时候显示我定义的UDS有问题,所以请教您有啥UDS指导的资料吗或网址吗?

  • 关于fluent 的interpolate的一个问题

    Fluent
    1
    0 赞同
    1 帖子
    2k 浏览

    在进行网格无关性验证时,通过在不同网格尺度间的插值操作,可以显著的节约计算时间。问题是,在fluent的框架下,插值操作应该是从粗网格到细网格, 还是细网格到粗网格?
    (i) 貌似, 好像, 似乎粗网格到细网格的效果好像更好。
    (2) fluent在help里面也只提到了interpolate 是zeroth-order。有没有人能具体的解释一下interpolate的原理。

  • 0 赞同
    4 帖子
    6k 浏览
    李东岳

    你的理解是正确的

  • pointwise输出二维网格到openfoam无法计算

    Meshy
    4
    0 赞同
    4 帖子
    8k 浏览
    A

    @zzcfd 改fvSolution,把p改成这个solver PCG; preconditioner DIC;试试

  • 翻译入门教程

    CFD彩虹条
    2
    0 赞同
    2 帖子
    4k 浏览
    bestucanB

    weblate ,或者 github。
    debian中文手册翻译
    但学习成本都挺高。

    但是特性好,版本控制啥的,weblate 就是个轻量的版本控制系统。po 文件可以统一术语。后台就是这个软件 gettex

    曾经想参与 debian 手册的翻译,没时间入门这些东西。:xinlei:

    也有会用软件一个人带着其他人翻,用邮件列表报翻好的片段,然后统一上传。

    对这种不是那么重的翻译,用专业的方法成本太大。那种翻译框架搭好了是照着往多种语言翻译的。用土法对个人压力过大,这种压力不只是时间紧迫性和工作量上的。没有好的工具,hold 不住相当碎片化的翻译数据,邮件勉强可以,版本控制器最适合(全历史记录)

    可以扣搜扣搜有没有日文版和日文翻译者,取取经:chitang: 一般好多技术文档有国际翻译,八成就有日语翻译。
    日本 OpenFOAM 大本营:googlegroups
    组织上决定派你去踩点,加油:chigua2:

  • fluent欧拉多相流壁面润滑力选取

    Fluent
    3
    0 赞同
    3 帖子
    3k 浏览
    C

    @李东岳 好的,谢谢东岳老师