Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. OpenFOAM中cyclicAMI周期边界在有边界层时出现问题

OpenFOAM中cyclicAMI周期边界在有边界层时出现问题

已定时 已固定 已锁定 已移动 OpenFOAM
openfoam
5 帖子 3 发布者 5.8k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • F 离线
    F 离线
    Foamer24
    写于 最后由 编辑
    #1

    各位专家好,小弟最近用OpenFOAM计算三维圆柱绕流,提供了两个算例,一个可算的例子适合新手入门;一个出错的例子,出错原因仅仅因为将最小网格高度从第一个例子的0.001m变为0.00001m。这种对靠近壁面的边界层网格加密操作,在工程中经常需要,难以避免,烦请各位大神指教。:zoule: :zoule:

    第一个例子的第一层网格高度(即最小网格高度)为0.001m,可以正常计算,该算例地址为 https://www.jianguoyun.com/p/DQL0lW8QgOLABxjSjroB

    详细参数如下:

    • 边界条件:圆柱wall,圆柱两端cyclicAMI周期边界,两周期边界间距为1,其余为远场边界patch;
    • 求解器:可压缩流求解器HISA(使用git clone https://gitlab.com/hisa/hisa.git 下载,用./Allwmake安装);
    • 网格绘制:Pointwise(能算的网格,最小网格高度0.001m;不能算的网格,最小高度0.00001m)。

    具体操作如下:

    //注意边界条件已设好,若未设好需额外用createPatch运行system/createPatchDict
    //网格尺寸缩放,这里已经缩放完了,所以都是1
    transformPoints -scalle '(1 1 1)'
    //网格重新排序
    renumberMesh -overwrite
    //添加周期边界
    setSet
    faceSet  AMI  new  patchToFace  wall1
    faceSet  AMI  add  patchToFace  wall2
    quit
    setsToZones –noFlipMap
    //开始单核串行计算
    hisa
    //开始多核并行计算
    mpirun -np 4 hisa -parallel
    

    第二个不能正常计算的算例,仅在同一套网格中加密第一层网格高度到0.00001m,算例设置同上,地址为 https://www.jianguoyun.com/p/DYRDSoMQgOLABxjxjroB 。在不使用renumberMesh -overwrite操作时,可以单核串行计算,但是并行时会出现下面的错误:

    /*---------------------------------------------------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    Build  : 6-76a8284120c3
    Exec   : hisa -parallel
    Date   : May 02 2019
    Time   : 08:38:04
    Host   : "localhost.localdomain"
    PID    : 37453
    I/O    : uncollated
    Case   : /home/xters/Desktop/cylinder_bl
    nProcs : 4
    Slaves : 
    3
    (
    "localhost.localdomain.37454"
    "localhost.localdomain.37455"
    "localhost.localdomain.37456"
    )
    
    Pstream initialized with:
        floatTransfer      : 0
        nProcsSimpleSum    : 0
        commsType          : nonBlocking
        polling iterations : 0
    sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
    allowSystemOperations : Allowing user-supplied system call operations
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Overriding DebugSwitches according to controlDict
        cyclicAMI       ;
    
    Create mesh for time = 0, region region0
    Creating static mesh
    
    [1] cyclicAMIPolyPatch::calcTransforms : patch:wall1 Specified translation : (0 0 -1)
    [1] patch: wall1
    [1]     forwardT = 0()
    [1]     reverseT = 0()
    [1]     separation = 1((0 0 -1))
    [1]     collocated = 1(0)
    [1] 
    [1] cyclicAMIPolyPatch::calcTransforms : patch:wall2 Specified translation : (0 0 1)
    [1] patch: wall2
    [1]     forwardT = 0()
    [1]     reverseT = 0()
    [1]     separation = 1((0 0 1))
    [1]     collocated = 1(0)
    [1] 
    [2] cyclicAMIPolyPatch::calcTransforms : patch:wall1 Specified translation : (0 0 -1)
    [2] patch: wall1
    [2]     forwardT = 0()
    [2]     reverseT = 0()
    [2]     separation = 1((0 0 -1))
    [2]     collocated = 1(0)
    [2] 
    [2] cyclicAMIPolyPatch::calcTransforms : patch:wall2 Specified translation : (0 0 1)
    [2] patch: wall2
    [2]     forwardT = 0()
    [2]     reverseT = 0()
    [2]     separation = 1((0 0 1))
    [2]     collocated = 1(0)
    [2] 
    [3] cyclicAMIPolyPatch::calcTransforms : patch:wall1 Specified translation : (0 0 -1)
    [3] patch: wall1
    [3]     forwardT = 0()
    [3]     reverseT = 0()
    [3]     separation = 1((0 0 -1))
    [3]     collocated = 1(0)
    [3] 
    [3] cyclicAMIPolyPatch::calcTransforms : patch:wall2 Specified translation : (0 0 1)
    [3] patch: wall2
    [3]     forwardT = 0()
    [3]     reverseT = 0()
    [3]     separation = 1((0 0 1))
    [3]     collocated = 1(0)
    [3] 
    [0] cyclicAMIPolyPatch::calcTransforms : patch:wall1 Specified translation : (0 0 -1)
    [0] patch: wall1
    [0]     forwardT = 0()
    [0]     reverseT = 0()
    [0]     separation = 1((0 0 -1))
    [0]     collocated = 1(0)
    [0] 
    [0] cyclicAMIPolyPatch::calcTransforms : patch:wall2 Specified translation : (0 0 1)
    [0] patch: wall2
    [0]     forwardT = 0()
    [0]     reverseT = 0()
    [0]     separation = 1((0 0 1))
    [0]     collocated = 1(0)
    [0] 
    Steady-state analysis detected
    
    pseudoTime: tolerance = 1e-06 (1e-06 1e-06 1e-06) 1e-06 , relTol = 0 (0 0 0) 0 
    
    Local timestepping selected
    
    Reading thermophysical properties
    
    Selecting thermodynamics package 
    {
        type            hePsiThermo;
        mixture         pureMixture;
        transport       sutherland;
        thermo          hConst;
        equationOfState perfectGas;
        specie          specie;
        energy          sensibleInternalEnergy;
    }
    
    AMI: Creating addressing and weights between 39880 source faces and 39880 target faces
    [3] cyclicAMIPolyPatch : wall1 constructed AMI with 
    [3]     srcAddress:9980
    [3]     tgAddress :9960
    [3] 
    [1] cyclicAMIPolyPatch : wall1 constructed AMI with 
    [1]     srcAddress:9980
    [1]     tgAddress :9960
    [1] 
    [2] cyclicAMIPolyPatch : wall1 constructed AMI with 
    [2]     srcAddress:9960
    [2]     tgAddress :9980
    [2] 
    AMI: Patch source sum(weights) min/max/average = 1, 1, 1
    AMI: Patch target sum(weights) min/max/average = 1, 1, 1
    [0] cyclicAMIPolyPatch : wall1 constructed AMI with 
    [0]     srcAddress:9960
    [0]     tgAddress :9980
    [0] 
    
    Viscous analysis detected
    
    Reading field U
    
    Creating turbulence model
    
    Selecting turbulence model type RAS
    Selecting RAS turbulence model SpalartAllmaras
    Selecting patchDistMethod meshWave
    RAS
    {
        RASModel        SpalartAllmaras;
        turbulence      on;
        printCoeffs     on;
        sigmaNut        0.66666;
        kappa           0.41;
        Cb1             0.1355;
        Cb2             0.622;
        Cw2             0.3;
        Cw3             2;
        Cv1             7.1;
        Cs              0.3;
    }
    
    
    Creating flux scheme
    
    Selecting flux scheme AUSMPlusUp
    
    Initial pseudo Courant No: Min: 0.001 Mean: 0.001 Max: 0.001
    
    
    Starting pseudotime iteration loop
    
    Time = 1
    
    pseudoTime: iteration 1
    Pseudo Courant No: Min: 0.001 Mean: 0.001 Max: 0.001
    Pseudo deltaT: Min: 1.31771e-11 Mean: 4.2537e-08 Max: 4.91626e-08
    Solving for (rho rhoU rhoE)
    [localhost:37456] *** An error occurred in MPI_Waitall
    [localhost:37456] *** reported by process [1120337921,3]
    [localhost:37456] *** on communicator MPI COMMUNICATOR 3 SPLIT FROM 0
    [localhost:37456] *** MPI_ERR_TRUNCATE: message truncated
    [localhost:37456] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
    [localhost:37456] ***    and potentially your MPI job)
    [localhost.localdomain:37448] 3 more processes have sent help message help-mpi-errors.txt / mpi_errors_are_fatal
    [localhost.localdomain:37448] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
    

    使用renumberMesh -overwrite操作后,单核也会出错了,错误信息为:

    /*---------------------------------------------------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    Build  : 6-76a8284120c3
    Exec   : hisa
    Date   : May 02 2019
    Time   : 08:40:54
    Host   : "localhost.localdomain"
    PID    : 37564
    I/O    : uncollated
    Case   : /home/xters/Desktop/cylinder_bl
    nProcs : 1
    sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
    allowSystemOperations : Allowing user-supplied system call operations
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Overriding DebugSwitches according to controlDict
        cyclicAMI       ;
    
    Create mesh for time = 0, region region0
    Creating static mesh
    
    cyclicAMIPolyPatch::calcTransforms : patch:wall1 Specified translation : (0 0 -1)
    patch: wall1
        forwardT = 0()
        reverseT = 0()
        separation = 1((0 0 -1))
        collocated = 1(0)
    
    cyclicAMIPolyPatch::calcTransforms : patch:wall2 Specified translation : (0 0 1)
    patch: wall2
        forwardT = 0()
        reverseT = 0()
        separation = 1((0 0 1))
        collocated = 1(0)
    
    Steady-state analysis detected
    
    pseudoTime: tolerance = 1e-06 (1e-06 1e-06 1e-06) 1e-06 , relTol = 0 (0 0 0) 0 
    
    Local timestepping selected
    
    Reading thermophysical properties
    
    Selecting thermodynamics package 
    {
        type            hePsiThermo;
        mixture         pureMixture;
        transport       sutherland;
        thermo          hConst;
        equationOfState perfectGas;
        specie          specie;
        energy          sensibleInternalEnergy;
    }
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::sigFpe::sigHandler(int) at ??:?
    #2  ? in "/lib64/libc.so.6"
    #3  Foam::surfaceInterpolation::makeWeights() const at ??:?
    #4  Foam::surfaceInterpolation::weights() const at ??:?
    #5  Foam::surfaceInterpolation::makeDeltaCoeffs() const at ??:?
    #6  Foam::surfaceInterpolation::deltaCoeffs() const at ??:?
    #7  Foam::fvPatch::deltaCoeffs() const at ??:?
    #8  Foam::fvPatchField<double>::snGrad() const at ??:?
    #9  Foam::heThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::heBoundaryCorrection(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) at ??:?
    #10  Foam::heThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::heThermo(Foam::fvMesh const&, Foam::word const&) at ??:?
    #11  Foam::psiThermo::addfvMeshConstructorToTable<Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > > >::New(Foam::fvMesh const&, Foam::word const&) at ??:?
    #12  Foam::autoPtr<Foam::psiThermo> Foam::basicThermo::New<Foam::psiThermo>(Foam::fvMesh const&, Foam::word const&) at ??:?
    #13  Foam::psiThermo::New(Foam::fvMesh const&, Foam::word const&) at ??:?
    #14  Foam::hisaModule::initialise() at ~/Desktop/hisa/src/modules/hisa/createFields.H:29 (discriminator 1)
    #15  ? at ??:?
    #16  __libc_start_main in "/lib64/libc.so.6"
    #17  ? at ??:?
    Floating point exception (core dumped)
    
    1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    写于 最后由 编辑
    #2

    因为你用的别的求解器,不确定是不是求解器的问题,你用出问题的网格,换个求解释发散么?你的第二个例子串行计算

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    F 1 条回复 最后回复
  • 宝 离线
    宝 离线
    宝丁
    写于 最后由 编辑
    #3

    是不是你的几何精度问题,壁面网格这么密,画网格的时候如果几何精度太差可能画出来的网格可能会有问题。这里的几何精度既包括建模软件里面的精度,也包括画网格软件转换的精度。如果直接在画网格的软件里面画几何精度应该会好一些,ICEM里面会有调精度的选项,Pointwise不清楚

    F 1 条回复 最后回复
  • F 离线
    F 离线
    Foamer24
    在 中回复了 宝丁 最后由 编辑
    #4

    @宝丁 您好!根据您的指导,我查看了Pointwise里面的设置,在Edit—Join Tolerance中有一个设置几何精度的参数,默认值是0.001,我很难确定这个有没有影响,因为以前用fluent计算的时候,这个参数一直是默认的。
    database_join_tolerance.jpg

    1 条回复 最后回复
  • F 离线
    F 离线
    Foamer24
    在 中回复了 李东岳 最后由 编辑
    #5

    @东岳 您好!cyclicAMI和renumberMesh之间还存在一些bug,我将cyclicAMI改为cyclic,还是类似的操作,就可以了。:ok: 需要注意的是:Pointwise导出含周期性边界的网格时,需要先将周期边界设置为patch,然后在openfoam中用createPatchDict将其设为cyclic,就能renumberMesh了。当遇到下面的错误时,提高boundary文件的matchTolerance的值就可以了,不过网格也不能太差。

    --> FOAM FATAL ERROR : face 0 and 65 areas do not match by 0.000222148% -- possible face ordering problem 
    From function cyclicFvPatch::makeWeights(scalarField& w) const 
    in file meshes/fvMesh/fvPatches/derivedFvPatches/cyclicFvPatch/cyclicFvPatch.C at line 62.
    
    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]