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. 新手求问冲击波管喷出的低马赫数supersonic的 边界条件问题

新手求问冲击波管喷出的低马赫数supersonic的 边界条件问题

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

    在网上找了很久没有发现有关的解决方法。所以才来请大家能给点指点意见。
    现在想用openFOAM模拟冲击波管喷出的低马赫数冲击波的密度计测。
    边界条件和其他的文件基本copy的tutorial里的nacaAirfoil,关于U文件夹里的internalfield的值是什么意思?然后如果用supersonicfreestream该怎么设定
    p的inlet和outlet该怎么设定(如果用waveTransmissive)
    这几项需要注意什么请指教下,万分感谢!

    1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    写于 最后由 编辑
    #2

    现在为了简化 想用无粘度而且取消紊流来算。 fvscheme 和fvsolutions用的tutorials 里面的sonic foam里shocktube的例子 但是算出来速度变化不随着时间推进而往前推进 不知道是不是时间步写错了(圆管直径3mm 网格用Gmesh 细化到0.1mm 速度600 时间步按公式算的1e-7)。
    或者是离散设置或者求解器里设置错了。 希望能得到指导下。 真的不知道怎么办了。。万分感谢🙏

    liujunCFDL 1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #3

    压力设定请参考:

    outflow
       {
           type            waveTransmissive;
           value           uniform 80000;    //important for correct I/O
           field           p;                //the name of the field that we are working on
           gamma           1.4;              //the ratio of specific heats
           phi             phiv;             //the name of the volumetric flux field ( or if you use the mass flux phi, it will be divided by rho)
           rho             rho;              //the name of the density field
           psi             psi;              //the name of the field that is the deriv. of density with respect to pressure
           lInf            0.05;             //a measure of how far away the far-field condition should be
           fieldInf        80000;            //the far-field value to be applied to p
       }
    

    这是网上找到的,我没有用过。https://openfoamwiki.net/index.php/HowTo_Using_the_WaveTransmissive_Boundary_condition

    U文件夹里的internalfield的值

    表示内部场的速度

    fvscheme 和fvsolutions用的tutorials 里面的sonic foam里shocktube的例子 但是算出来速度变化不随着时间推进而往前推进 不知道是不是时间步写错了(圆管直径3mm 网格用Gmesh 细化到0.1mm 速度600 时间步按公式算的1e-7)。

    类似这种算的不对的问题,很难判断问题在哪 :expressionless:

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

    1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    写于 最后由 李东岳 编辑
    #4

    谢谢李老师回复🙏

    把p换成waveTransmissive的形式结果paraview还是空气不往前流动(只有inlet附近有速度tube其他地方没有速度变化)。
    可能是fvscheme或者fvsolution里面设置出错。自己试了不下于100遍了。还是不行,可以帮忙检查下吗。。🙏

    fvscheme如下

    ddtSchemes
    {
        default         Euler;
    }
    
    gradSchemes
    {
        default         Gauss linear;
    }
    
    divSchemes
    {
        default         none;
        div(phi,U)      Gauss limitedLinear 1;
        div(phi,e)      Gauss limitedLinear 1;
        div(phi,K)      Gauss limitedLinear 1;
        div(phiv,p)     Gauss limitedLinear 1;
        div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    }
    
    laplacianSchemes
    {
        default         Gauss linear corrected;
    }
    
    interpolationSchemes
    {
        default         linear;
    }
    
    snGradSchemes
    {
        default         corrected;
    }
    
    

    fvsolution 如下

    
    solvers
    {
        "(p|rho)"
        {
            solver          PCG;
            preconditioner  DIC;
            tolerance       1e-6;
            relTol          0.01;
        }
    
        "(p|rho)Final"
        {
            $p;
            relTol          0;
        }
    
        "(U|e|k|nuTilda)"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-6;
            relTol          0.01;
        }
    
        "(U|e|k|nuTilda)Final"
        {
            $U;
            relTol          0;
        }
    }
    
    PIMPLE
    {
        momentumPredictor yes;
        nOuterCorrectors 3;
        nCorrectors     1;
        nNonOrthogonalCorrectors 0;
    
        pMinFactor      0.5;
        pMaxFactor      2.0;
    }
    
    }
    
    

    comtroldic如下

    
    application     rhoPimpleFoam;
    
    startFrom       latestTime;
    
    startTime       0;
    
    stopAt          endTime;
    
    endTime         5e-6;
    
    deltaT          1e-7;
    
    writeControl    timeStep;
    
    writeInterval   1;
    
    purgeWrite      0;
    
    writeFormat     binary;
    
    writePrecision  6; //was 6
    
    writeCompression off;
    
    timeFormat      general;
    
    timePrecision   6;
    
    runTimeModifiable yes;
    
    
    }
    
    1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    写于 最后由 编辑
    #5

    键盘按键不一样按错了 没有高亮代码。抱歉。

    1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    写于 最后由 编辑
    #6

    用paraview显示的速度只在inlet附近变化 其他部分不变化。求指点下🙏

    /Users/Air/Desktop/屏幕快照 2017-10-17 上午11.52.10.png

    1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    写于 最后由 编辑
    #7

    0_1508212700850_屏幕快照 2017-10-17 上午11.52.10.png

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #8

    网格多少?小的话我给你试试。

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

    R 1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    在 中回复了 李东岳 最后由 编辑
    #9

    @李东岳 直径3mm长30mm的tube 用Gmesh 细化到0.1mm的网格 谢谢李老师!

    0_1508231331950_屏幕快照 2017-10-17 下午6.08.23.png 图片地址)

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #10

    9000个网格?你上传上来我下载试试

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

    R 1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    在 中回复了 李东岳 最后由 编辑
    #11

    @李东岳 感谢回复🙏 这个是tube的mesh https://pan.baidu.com/s/1miBVoeO
    这个tube只是为了简便练习下用的 实际想做有个小的3mm长的inlet然后测冲击波从tube里刚喷出那段时间的密度计测,这个是模型的mesh https://pan.baidu.com/s/1cLIYzO

    谢谢李老师

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #12

    最好把整个算例传上来我直接运行。

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

    R 1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    在 中回复了 李东岳 最后由 编辑
    #13

    @李东岳 https://pan.baidu.com/s/1kVd1wl5
    Thanks!

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #14

    国外打国内的网站特别慢。百度盘打不开。你把网格发送到沃邮箱li.dy@dyfluid.com

    0_1508933206325_捕获.JPG

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

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #15

    你提供的算例无法运行,报错文件缺失:

    
    dyfluid@dyfluid:~/桌面/tubecase/10$ ./Allrun 
    Cloning resolved case from .
    Running blockMesh on /home/dyfluid/桌面/tubecase/10/resolved
    Running decomposePar on /home/dyfluid/桌面/tubecase/10/resolved
    
    
    --> FOAM FATAL ERROR: 
    Cannot open file "system/decomposeParDict"
    
        From function int main(int, char**)
        in file foamDictionary.C at line 427.
    
    FOAM exiting
    
    Running sonicFoam in parallel on /home/dyfluid/桌面/tubecase/10/resolved using  processes
    Cloning modelled case from .
    Running blockMesh on /home/dyfluid/桌面/tubecase/10/modelled
    Running decomposePar on /home/dyfluid/桌面/tubecase/10/modelled
    
    
    --> FOAM FATAL ERROR: 
    Cannot open file "system/decomposeParDict"
    
        From function int main(int, char**)
        in file foamDictionary.C at line 427.
    
    FOAM exiting
    
    Running sonicFoam in parallel on /home/dyfluid/桌面/tubecase/10/modelled using  processes
             line 0: warning: Cannot find or open file "resolved/postProcessing/probes/0/p"
             line 0: warning: Cannot find or open file "modelled/postProcessing/probes/0/p"
             line 0: No data in plot
    
    dyfluid@dyfluid:~/桌面/tubecase/10$
    

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

    R 1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    在 中回复了 李东岳 最后由 编辑
    #16

    @李东岳 在 新手求问冲击波管喷出的低马赫数supersonic的 边界条件问题 中说:

    Allrun

    李老师,

    感谢回复🙏

    发的文件夹里面的Allrun,Allclean文件是之前tutorial里复制粘贴过来的,忘了给删掉所以不能用,我用的是Gmesh进行网格划分已经划分过了不需要再用blockMesh了,

    另外算这个例子的时候感觉运算量没那么大就没有分cpu去算,所以没有设置decomposeParDict。我现在已经给您加上decomposerParDict文件了如果您想用的话改一下里面的cpu个数就行了,如果不用的话直接在终端输入sonicFoam应该就ok。

    另外,我用的版本是openFoam Plus的mac版的,如果用什么格式不对的话,按照tutorial里的复制一下报错的地方应该就行。

    下面是case的dropbox链接,
    这个是sonicFoam https://www.dropbox.com/s/2t2rc8k3vnl9fqp/sonicFoam.zip?dl=0

    这个是rhoCentralFoam
    https://www.dropbox.com/s/vzgr1r84fvxk1ts/rhoCentralFoam.zip?dl=0

    这两个例子离散格式和用的求解器不一样,这些求解器和离散格式 的意思还没有完全搞懂。。不知道是不是这里出的问题。求老师给看一下,什么样的离散格式和求解器才适合这个例子。

    Ryo

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #17

    我现在下载看看。

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

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #18

    把你的矩阵求解器这样改一下试试:

    "(p|U|e).*"
        {
            solver          PBiCGStab;
    	preconditioner	DILU;
            smoother        symGaussSeidel;
            tolerance       1e-15;
            relTol          0;
        }
    

    后续还运行不成功的话,我可以帮你继续再看看,不过麻烦把网格做成六面体网格并适当减少网格数量(5万以下) :cheeky:

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

    R 1 条回复 最后回复
  • R 离线
    R 离线
    Ryo
    在 中回复了 李东岳 最后由 编辑
    #19

    @李东岳
    谢谢李老师。

    还是跟之前一样的错误。。tube里面的气体不往前面流动。
    这个是把网格换成六面体的case
    sonicFoam
    https://www.dropbox.com/s/bb0a0lmzb67h8o1/sonicFoam 3.zip?dl=0

    rhoCentralFoam
    https://www.dropbox.com/s/m5ayc8xkdd9ffi4/rhoCentralFoam.zip?dl=0

    Ryo

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #20

    0_1509368932976_fca96a4a-0978-40c4-a7c1-7fb1f52a6be3-image.png

    你的压力是19600?是低压么。还是196000?

    非常抱歉,你这个网格太多了我笔记本跑不动。为了去掉网格因素,最好使用全六面体网格,你的这个网格还是四面体的。

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

    R 1 条回复 最后回复

  • 登录

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