Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    postProcess 输出ddt(U)和div(phi,U)

    OpenFOAM
    2
    3
    571
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      veen last edited by

      想在计算完成之后输出ddt(U)和div(phi,U)
      直接运行postProcess -func 'ddt(U)', 提示ddt is not supported with the postProcess utility FOAM Warning : functionObjects::ddt ddt(U) failed to execute.
      运行pisoFoam -postProcess -func 'ddt(U)' 提示in command line pisoFoam -postProcess -func div(phi,U) Placeholder value is <fieldName>
      想用coded输出也一直没成功,因为已经有计算结果了,不想动求解器:

      libs    ("libutilityFunctionObjects.so");
      type    coded;
      name    ddt;
      codeWrite
      #{
      
      const volVectorField& U = mesh().lookupObject<volVectorField>("U");
      //const volScalarField& phi = mesh().lookupObject<volScalarField>("phi");
      
      // Write
      volVectorField ddt("ddt", fvc::ddt(U));
      ddt.write();
      
      #};
      
      X 1 Reply Last reply Reply Quote
      • X
        xpqiu 教授 @veen last edited by

        @veen
        pisoFoam -postProcess -func 'ddt(U)' 这个是可以用的,但是
        pisoFoam -postProcess -func 'div(phi,U)' 不行,因为 div 只能接受一个参数
        pisoFoam -postProcess -func 'div(U)' 这样是可以的。
        如果你需要算 'div(phi,U)' ,需要自己写一个 functionObject。可以参考这个来写:src/functionObjects/field/momentumError

        V 1 Reply Last reply Reply Quote
        • V
          veen @xpqiu last edited by

          @xpqiu u 好的,感谢!:146:

          1 Reply Last reply Reply Quote
          • First post
            Last post

          CFD中文网 | 东岳流体 | 京ICP备15017992号-2