foamSearch查询命令

在openfoam中通过foamSearch命令可以查询用户案例中字典文件和字典文件中包含的子字典。

foamSearch $FOAM_TUTORIALS  fvSchemes interpolationSchemes

上述命令可以用来在tutorials中查找所有fvSchemes字典文件中含有interpolationSchemes字典的内容。

显示结果如下:

{
}
    default         cubic;
    default         linear;
    default         none;
    fi              upwind alphaRhoPhi.particles;
    interpolate(HbyA) linear;
    interpolate(U)  linear;
interpolationSchemes
    reconstruct(rho) vanAlbada;
    reconstruct(rho) vanLeer;
    reconstruct(T)  vanAlbada;
    reconstruct(T)  vanLeer;
    reconstruct(U)  vanAlbadaV;
    reconstruct(U)  vanLeerV;

同时也可以在foamSearch命令后添加关键词“-c",显示查询结果中各个关键词的使用次数,

foamSearch -c $FOAM_TUTORIALS  fvSchemes interpolationSchemes
247 {
    247 }
      2     default         cubic;
    223     default         linear;
     14     default         none;
      2     fi              upwind alphaRhoPhi.particles;
      1     interpolate(HbyA) linear;
      1     interpolate(U)  linear;
    247 interpolationSchemes
      1     reconstruct(rho) vanAlbada;
      6     reconstruct(rho) vanLeer;
      1     reconstruct(T)  vanAlbada;
      6     reconstruct(T)  vanLeer;
      1     reconstruct(U)  vanAlbadaV;
      6     reconstruct(U)  vanLeerV;

若是对字典文件下的子字典下的参数进行查找可以用如下的命令:

foamSearch $FOAM_TUTORIALS fvSchemes "divSchemes.div(phi,U)"
div(phi,U)      bounded Gauss limitedLinear 0.2;
div(phi,U)      bounded Gauss limitedLinearV 1;
div(phi,U)      bounded Gauss linear;
div(phi,U)      bounded Gauss linearUpwind grad;
div(phi,U)      bounded Gauss linearUpwind grad(U);
div(phi,U)      bounded Gauss linearUpwind limited;
div(phi,U)      bounded Gauss linearUpwind unlimited;
div(phi,U)      bounded Gauss linearUpwindV grad(U);
div(phi,U)      bounded Gauss upwind;
div(phi,U)      Gauss cubic;
div(phi,U)      Gauss limitedLinear 1;
"div\(phi.*,U.*\)" Gauss limitedLinearV 1;
div(phi,U)      Gauss limitedLinearV 1;
div(phi,U)      Gauss linear;
div(phi,U)      Gauss linearUpwind grad(U);
"div\(phi.*,U.*\)" Gauss linearUpwind limited;
div(phi,U)      Gauss linearUpwind limited;
div(phi,U)      Gauss linearUpwindV grad(U);
div(phi,U)      Gauss LUST grad(U);
div(phi,U)      Gauss LUST unlimitedGrad(U);
div(phi,U)      Gauss upwind;

 linearUpwind格式中需要指定速度梯度,因此会有:Gauss linearUpwind grad(U);

posted @ 2022-05-25 17:41  大嘴巴嘚吧嘚吧嘚  阅读(221)  评论(0)    收藏  举报