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中文网

W

WYing

@WYing
关于
帖子
42
主题
18
群组
0
粉丝
2
关注
0

帖子

最新

  • 使用sixDoFMotionSolver计算多个patches
    W WYing

    各位老师好,

    我用openfoam4.x - pimpleDyMFoam - sixDoFMotionSolver计算刚体运动,我的几何由body1和body2两部分组成,两个body都是刚体,相连并同时运动,因此也可以看做一个刚体。我目前将其看做一个刚体,因此在dynmaicMeshDict文件中写作:

    dynamicFvMesh dynamicMotionSolverFvMesh;
    
    motionSolverLibs ( "libsixDoFRigidBodyMotion.so" );
    
    solver sixDoFRigidBodyMotion;
    
    sixDoFRigidBodyMotionCoeffs
    
    {
    
    ...
    
    patches (BODY);
    
    ...
    }
    

    计算后能得到刚体上的升阻力,但是我要如何根据现有结果分别得到两个body上的升阻力呢?(如果我理解正确的话,BODY1上的气动力 + BODY2上的气动力 = BODY上的气动力)

    还是说只能将其看做两个刚体并重新计算,即dynamicMeshDict中改为patches (BODY1 BODY2);

    谢谢!


  • fvSolution中PIMPLE算法的参数设置问题
    W WYing

    @李东岳 谢谢李老师的回复!抱歉我的上个残差图绘制有问题,正确的应该是这样

    Residuals_Ur5.png

    从上到下依次是速度残差,压力残差和湍流统计量残差。

    上面那个code是我随意找的,我目前使用的code是:

    PIMPLE
    {
        correctPhi          yes;
        nOuterCorrectors    2;
        nCorrectors         2;
        nNonOrthogonalCorrectors 1;
        turbOnFinalIterOnly  false;
    }
    
    relaxationFactors
    {
        fields
        {
            p                  0.3;
        }
        equations
        {
            "(U|k|omega)"      0.7;
            "(U|k|omega)Final" 1.0;
        }
    }
    

    我主要做了以下修改:
    (1)调整 nOuterCorrectors=2,结果几乎不变
    (2)turbOnFinalIterOnly=false,即每次PIMPLE loop都计算湍流,结果几乎不变
    (3)去掉全部的松弛因子,结果几乎不变。

    在模拟中,CFL保持在0.5-1.5之间,但是和实验结果对的不好。李老师觉得还有可能是哪里出了问题呢?


  • fvSolution中PIMPLE算法的参数设置问题
    W WYing

    各位老师好,我关于fvSolution中PIMPLE算法的参数设置有几点疑问。下面是我找到的一个例子,有以下问题:

    1. nOuterCorrector表示pimple loop的次数,并用residualControl来控制U和p的收敛,请问这里需不需要控制湍流统计量(k,epsilon,omega)的收敛?
    2. moveMeshOuterCorrectors 是weakly(默认)或者strongly coupled FSI,但是找不到更多详尽资料介绍这个参数的含义,请问这个参数对结果一般有什么影响?
    3. consistent 是采取SIMPLEC算法,一般什么情况下使用这个参数?
    PIMPLE
    {
        momentumPredictor        yes;
        correctPhi               yes;
        nOuterCorrectors         1000;
        nCorrectors              1;
        nNonOrthogonalCorrectors 1;
        pRefCell                 0;
        pRefValue                0;
        moveMeshOuterCorrectors  yes;
        consistent               yes;
        
        residualControl
        {
            U 1e-6;
            p  1e-6;
        }  
    }
    
    relaxationFactors
    {
        fields
        {
            p                  0.3;
        }
        equations
        {
            "(U|k|omega)"      0.7;
            "(U|k|omega)Final" 1.0;
        }
    }
    

    Residuals.png 另外,我有一个2D结果湍流统计量k的残差逐渐增大,不太清楚是什么原因造成的,能请各位老师帮忙看下吗?我猜测大概率是PIMPLE算法设置的问题。。。谢谢!


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @cresendo 在 计算钝体涡激振动时发散(pimpleDyMFoam) 中说:

    songtao.chen@sjtu.edu.cn

    谢谢!非常感谢您的建议!


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @cresendo 我重新查看了source code,aRel的松弛方式确实如您所说,感谢指出错误!我对比了不同aRel的结果,发现Rel = 0.4-0.8都可以正常运行且结果几乎相同,但是aRel >0.8之后会发散。我不确定为什么wikidict上说太小的aRel会造成不准确的响应,至少我的结果并不受aRel取值的影响。相反,恰当的aRel可以使本来发散的case收敛。我之前没有指定过aRel,也就是取默认值1.0,因此比较好奇为什么您会设定aRel=0.4而不是其他值,是根据模拟的经验吗?谢谢!


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @cresendo 我按照您的建议,调整了accelerationRelaxation 0.4,计算可以正常进行,CFL数小于1, 流场看上去也正常。

    但有一个小疑问,通过查询dynamicMeshDict文件的官方描述,得知accelerationRelaxation直接减小刚体的加速度,比如在某时间步solver求出的加速度为10m/s^2,如果设置accelerationRelaxation=0.4,那么实际应用的加速为4m/s^2,这是一个很大的松弛。而官方描述中建议的accelerationRelaxation范围是0.9-1,并且提到 “Be careful with this accelerationRelaxation. Too low of a value will mean that the Body does not respond to the fluid forces correctly”。因此我担心设置较小的加速度松弛会不会对结果产生太大影响?因为没有实验结果作为参照,所以无法判断结果的准确性。不知道您一般是如何处理这种误差的?谢谢!


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @cresendo 请问您说的dynamicMeshDict里的松弛因子是 accelerationRelaxation 0.9 和 accelerationDamping 0.95 吗?


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @cresendo 谢谢您的建议!去掉p松弛之后,算例确实可以计算下去,但是CFL保持在20左右,且速度场和压力场也明显有问题。所以还是不太对,不过还是感谢您的帮助!


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @李东岳 谢谢李老师的回复!我尝试使用高版本的OF计算,发现相同设置下算例可以正常计算,不确定这是不是低版本的OF涉及动网格时存在bug。不过有个case在所有版本OF下都发散。。。能麻烦李老师有空的话帮忙看一下吗?算例文件case.zip (大约在time=1.43发散)十分感谢!!


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @李东岳 感谢您的回复! crash.zip 这是我的case文件,由于大小限制,文件夹内没有包含最后一个时间步,但是大概在time=1.8所有停止计算。欢迎您提出的任何意见或建议!


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @李东岳 我也想过这个可能性。如果是因为网格变形增大导致的发散,那么至少在开始一段时间内变形较小的时候计算能正常进行。但是这些发散的case从一开始的流场就有问题,而不是说随着网格变形增大,逐渐发散。。


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @李东岳 感谢李老师的回复!我按照您的建议,先计算了钝体绕流(不加动网格)的情况,发现能够得到合理的流场和大致结果,这应该说明了边界条件设置没有问题。那么就是动网格的设置出错了?我计算的是圆柱+不同长度分流板的流致振动,奇怪的是,大部分算例可以正常计算,只有某些长度的分流板会导致结果发散。所有算例的网格划分方式和参数设置都一样的,真是百思不得其解。。。


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    @wying 没有人看嘛。。。救救孩子。。。


  • 计算钝体涡激振动时发散(pimpleDyMFoam)
    W WYing

    各位老师好,我使用pimpleDyMFoam计算钝体涡激振动时,算例的CFL越来越大并计算一段时间后发散。通过查看速度和压力场,发现一开始就不太正常,然后随着时间推移,误差逐渐积累最后发散。报错如下:

    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::sigFpe::sigHandler(int) at ??:?
    #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
    #3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
    #4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
    #5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
    #6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
    #7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/home/ying/OpenFOAM41/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/bin/pimpleDyMFoam"
    #8  ? in "/home/ying/OpenFOAM41/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/bin/pimpleDyMFoam"
    #9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #10  ? in "/home/ying/OpenFOAM41/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/bin/pimpleDyMFoam"
    Floating point exception (core dumped)
    

    我查了一下有人说很可能是网格或边界条件的问题。我的边界条件是比较基础的速度入口/压力出口,感觉应该没问题;我也使用了refine的网格重新计算,发现crash的时间延长了,但速度场和压力场还是一开始就不正确。两种网格质量都没问题。

    我附加了我的算例设置文件,和流场图以供参考。

    1. 粗网格及流场
      coarse.png
      coarse_U.png
      coarse_p.png

    2. 细网格及流场
      refine.png
      refine_U.png
      refine_p.png

    3. 边界条件(U/p/pointDisplacement)

    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volVectorField;
        location    "0";
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform (0 0 0);
    
    boundaryField
    {
        INLET
        {
            type            fixedValue;
            value           uniform (1 0 0);
        }
        OUTLET
        {
            type            zeroGradient;
        }
        TOP
        {
            type            symmetry;
        }
        BOTTOM
        {
            type            symmetry;
        }
        CYLINDER
        {
            type            movingWallVelocity;
            value           uniform (0 0 0);
        }
        frontAndBackPlanes
        {
            type            empty;
        }
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      p;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -2 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        INLET
        {
            type            zeroGradient;
        }
        OUTLET
        {
            type            fixedValue;
            value           uniform 0;
        }
        TOP
        {
            type            symmetry;
        }
        BOTTOM
        {
            type            symmetry;
        }
        CYLINDER
        {
            type            zeroGradient;
        }
        frontAndBackPlanes
        {
            type            empty;
        }
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       pointVectorField;
        location    "0";
        object      pointDisplacement;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 1 0 0 0 0 0];
    
    internalField   uniform (0 0 0);
    
    boundaryField
    {
        INLET
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        OUTLET
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        TOP
        {
            type            symmetry;
        }
        BOTTOM
        {
            type            symmetry;
        }
        CYLINDER
        {
            type            calculated;
        }
        frontAndBackPlanes
        {
            type            empty;
        }
    }
    
    1. fvScheme & fvSolution
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSchemes;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    ddtSchemes
    {
        default         backward;
    }
    
    gradSchemes
    {
        default         Gauss linear;
        grad(p)         Gauss linear;
        grad(U)         Gauss linear;
    }
    
    divSchemes
    {
        default         none;
        div(phi,U)      Gauss linearUpwind grad(U);
        div(div(phi,U)) Gauss linear;
        div(phi,k)      Gauss limitedLinear 1;
        div(phi,omega)  Gauss limitedLinear 1;
        div((nuEff*dev2(T(grad(U))))) Gauss linear;
    }
    
    laplacianSchemes
    {
        default         Gauss linear corrected;
    }
    
    interpolationSchemes
    {
        default         linear;
    }
    
    snGradSchemes
    {
        default         corrected;
    }
    
    wallDist
    {
        method meshWave;
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    solvers
    {
        "pcorr.*"
        {
            solver           GAMG;
            tolerance        0.02;
            relTol           0;
            smoother         GaussSeidel;
        }
    
        "(p|Phi)"
        {
            $pcorr;
            tolerance        1e-7;
            relTol           0.01;
        }
    
        pFinal
        {
            $p;
            tolerance        1e-7;
            relTol           0;
        }
    
        "(U|k|omega)"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-06;
            relTol          0.1;
        }
    
        "(U|k|omega)Final"
        {
            $U;
            tolerance       1e-06;
            relTol          0;
        }
    
        cellDisplacement
        {
            solver          GAMG;
            tolerance       1e-5;
            relTol          0;
            smoother        GaussSeidel;
        }
    }
    
    PIMPLE
    {
        correctPhi          yes;
        nOuterCorrectors    2;
        nCorrectors         2;
        nNonOrthogonalCorrectors 1;
    }
    
    relaxationFactors
    {
        fields
        {
            p                  0.3;
        }
        equations
        {
            "(U|k|omega)"      0.7;
            "(U|k|omega)Final" 1.0;
        }
    }
    
    potentialFlow
    {
        nNonOrthogonalCorrectors 15;
    }
    
    cache
    {
        grad(U);
    }
    
    1. dynamicMeshDict
    FoamFile
    {
        version         2;
        format          ascii;
        class           dictionary;
        object          dynamicMeshDict;
    }
    
    dynamicFvMesh   dynamicMotionSolverFvMesh;
    
    motionSolverLibs ( "libsixDoFRigidBodyMotion.so" );
    
    solver          sixDoFRigidBodyMotion;
    
    sixDoFRigidBodyMotionCoeffs
    {
        patches         ( CYLINDER );
        innerDistance   2.5;
        outerDistance   20;
        mass            11.4586;
        centreOfMass    ( 0.280485 0 0 );
        momentOfInertia ( 0.6414 0.6414 0.24 );
        g               ( 0 0 0 );
        rho             rhoInf;
        rhoInf          1.225;
        report          on;
        solver
        {
            type            Newmark;
            gamma           0.5;
            beta            0.25;
        }
        constraints
        {
            yLine
            {
                sixDoFRigidBodyMotionConstraint line;
                centreOfRotation ( 0.280485 0 0 );
                direction       ( 0 1 0 );
            }
            noRotation
            {
                sixDoFRigidBodyMotionConstraint orientation;
            }
        }
        restraints
        {
            verticalSpring
            {
                sixDoFRigidBodyMotionRestraint linearSpring;
                anchor          ( 0.280485 0 0 );
                refAttachmentPt ( 0.280485 0 0 );
                stiffness       10.70694631;
                damping         0;
                restLength      0;
            }
        }
    }
    

    请各位老师帮忙看看是什么问题,困扰好久了。。。谢谢!


  • openfoam流固耦合:pimpleDyMFoam+6DOF+Newmark,weakly-还是strongly-coupling
    W WYing

    @李东岳 谢谢东岳老师的回复。请问为什么是strongly-coupling呢?我能够理解Newmark-beta是隐式求解器,但是我并没有指定结构方程的求解次数(dynamicMeshDict/nItera),那么在实际计算中,结构方程和动网格也是多次求解的吗?


  • openfoam流固耦合:pimpleDyMFoam+6DOF+Newmark,weakly-还是strongly-coupling
    W WYing

    关于OpenFOAM实现流固耦合的方式有一些理解上的混淆,希望各位老师指点。

    据我了解,OpenFoam实现流固耦合的方式有:
    (1)Rigid body FSI,使用OpenFoam自带的求解器+动网格技术即可实现
    (2)fully FSI,需要将OpenFoam(流体求解器)与其他固体求解器结合

    我使用第一种,通过pimpleDyMFoam + sixDoFRigidBodyMotion + Newmark求解圆柱涡激振动,求解器的参数设置如下:

    PIMPLE
    {
        correctPhi          yes;
        nOuterCorrectors    2;
        nCorrectors         2;
        nNonOrthogonalCorrectors 1;
    }
    solver
    {
            type            Newmark;
            gamma       0.5;
            beta            0.25;
    }
    

    我的问题:

    1. 文献中说,FSI的求解方法一般有两种:顺序耦合(partitioned)和同步耦合(Monolithic),请问pimpleDyMFoam + sixDoFRigidBodyMotion + Newmark属于哪一种?(我个人理解应该属于顺序耦合,即流场和结构分开求解)

    2. 文献中还提到weakly-coupling(一个时间步长内,结构运动响应只计算一次,流体域求解多次)和strongly-coupling(一个时间步长内,结构运动响应和流体域都求解多次),请问pimpleDyMFoam + sixDoFRigidBodyMotion + Newmark属于哪一种?
      (1)有人说如果想采用strongly-coupling,必须在fvSolution/PIMPLE中指定“moveMeshOuterCorrectors yes”和“nOuterCorrectors>1”,在dynamicMeshDict中指定nItera为结构运动方程的求解次数。如果按照这个原则,我使用的似乎是weakly-coupling,因为没有指定moveMeshOuterCorrector和nOuterCorrectors。
      (2)还有人说,如果使用implicit流体求解器(pimpleDyMFoam)和implicit 固体求解器(Newmark-beta),那么就是strongly-coupling。这样看来好像我使用的又是strongly-coupling。

    找不到介绍openfoam流固耦合的官网文件,很费解。


  • 使用foamDictionary修改参数的问题
    W WYing

    @浪迹天大 这样嘛。。。好的,谢谢!


  • 使用foamDictionary修改参数的问题
    W WYing

    大家好,我在使用openfoam自带的foamDictionary工具修改dynamicMeshDict文件中的参数时,发现修改后的文件中所有注释都会被自动删除,举例如下:

    1. 修改前的文件:
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  5                                     |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      dynamicMeshDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    ...主要内容...
    
    // ************************************************************************* //
    
    1. 修改后的文件
    *--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  4.1                                   |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version         2;
        format          ascii;
        class           dictionary;
        object          dynamicMeshDict;
    }
    
    ...主要内容...(所有以“//”开头的注释和空格行都被删除)
    
    // ************************************************************************* //
    

    我使用的代码如下:

    foamDictionary ./constant/dynamicMeshDict -entry sixDoFRigidBodyMotionCoeffs.restraints.verticalSpring.stiffness -set "10"
    

    请各位老师帮忙看一下,谢谢!


  • OF计算动网格的问题
    W WYing

    @李东岳 东岳老师,我在dynamicMeshDict里设置了constrints和restraints两个条目,控制圆柱仅在y方向移动,不转动,如下:

    constraints
    {
        yLine
        {
            sixDoFRigidBodyMotionConstraint line;
            centreOfRotation    (0 0 0.5);     
            direction           (0 1 0);
        }
    
        noRotation
        {
            sixDoFRigidBodyMotionConstraint orientation;
        }
    }
    
    restraints
    {
        verticalSpring
        {
            sixDoFRigidBodyMotionRestraint linearSpring;
    
            anchor          (0 0 0.5);
            refAttachmentPt (0 0 0.5);
            stiffness       2.1055;
            damping         0;
            restLength      0;
        }
    }
    

    不知道您说的是不是这个意思?


  • OF计算动网格的问题
    W WYing

    各位老师好,我在OF7中使用 dynamicMotionSolverFvMesh 和 sixDoFRigidBodyMotion 计算三维圆柱的涡激振动问题。圆柱直径D=1m,预计振幅0.6D左右,遇到问题如下:

    1. 圆柱振动到0.2D左右时,算例会突然崩掉,报错:
      4649ed61-38ff-42bd-ae45-64418d0fd3d8-image.png 此时CFLmax=0.7,流场也比较正常,应该是还没来得及崩溃。

    2. 通过checkMesh发现计算域底面有几个网格(标红)的skewness非常大,这应该是导致失败的原因:
      8149e41d-595c-4f96-8763-742da975f9d5-image.png
      1313f674-74b7-4ae4-bd95-4ed745e61b30-image.png 此时圆柱是向+y轴运动,不太明白为什么靠近圆柱(-y轴方向)的这几层网格会凸起。因为这个范围属于设置的inner Distance之内,按理说网格是不变形的,而是直接随圆柱运动。(目前设置是 inner Distance = 1.5m, outer Distance = 2.5m)

    请问有人遇到过类似问题吗?第一次遇到这个情况。。。怎么调都没用

  • 登录

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