postProcess 输出ddt(U)和div(phi,U)
-
想在计算完成之后输出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(); #};
-
@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
-
@xpqiu 在 postProcess 输出ddt(U)和div(phi,U) 中说:
pisoFoam -postProcess -func 'ddt(U)' 这个是可以用的,
但是关于这个,我输入还是会报错 ddt is not supported with the postProcess utility FOAM Warning : functionObjects::ddt ddt(U) failed to execute.
所以请问一下这个是什么问题呢?
1/4