functionObject里面可以加自定义的程序吗
-
@Samuel-Tu 感谢
-
@Samuel-Tu 您好,您例子中输出的是一个场量,如果我只是想把一个数值输出到postProcessing中,应该定义一个什么样的类型(类似IOField)。
const volScalarField& b = mesh().lookupObject<volScalarField>("alpha.liquid"); scalar c= b.weightedAverage(mesh().V()).value();
-
@Samuel-Tu 您好,将您的语句添加在我的case中,其中只修改了patch的名字,结果出现下面的错误,请问应该怎么修改。
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in /lib/x86_64-linux-gnu/libpthread.so.0 #3 Foam::fvPatch::Cf() const at ??:? #4 Foam::writeCentersFunctionObject::write() at system/controlDict.functions.writeCenters:74 #5 Foam::functionObjectList::execute() at ??:? #6 Foam::Time::run() const at ??:? #7 ? in ~/OpenFOAM/dyfluid-v2006/platforms/linux64GccDPInt32Opt/bin/hybridPorousInterFoam #8 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 #9 ? in ~/OpenFOAM/dyfluid-v2006/platforms/linux64GccDPInt32Opt/bin/hybridPorousInterFoam Segmentation fault (core dumped)```