如何由UPrime2Mean获得RMS速度?
-
在OF2.4中,以前是通过编译以下代码 ,获得RMS速度,然而在OF6.0中wmake编译时提示没有找到calc.H文件,后来grep一下,发现OF6.0竟然没有calc.H了,对比了OF2.4和OF6.0发现,OF6.0没有了$(WM_PROJECT_DIR)/src/postProcessing/整个文件夹,请问怎么破?你们又是怎么获得RMS速度的,paraview通过定义变量也可以解决,但是感觉有点麻烦。菜鸟一枚,求赐教!
\*---------------------------------------------------------------------------*/ #include "calc.H" #include "fvc.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { IOobject UPrime2Meanheader ( "UPrime2Mean", runTime.timeName(), mesh, IOobject::MUST_READ ); if (UPrime2Meanheader.headerOk()) { Info<< " Reading UPrime2Mean" << endl; volSymmTensorField UPrime2Mean(UPrime2Meanheader, mesh); volScalarField UPrime2x ( IOobject ( "UPrime2x", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), pow((UPrime2Mean.component(0)*UPrime2Mean.component(0)),0.25) ); Info << " Writing UPrime2x" << endl; UPrime2x.write(); volScalarField UPrime2y ( IOobject ( "UPrime2y", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), pow((UPrime2Mean.component(3)*UPrime2Mean.component(3)),0.25) ); Info << " Writing UPrime2y" << endl; UPrime2y.write(); volScalarField UPrime2z ( IOobject ( "UPrime2z", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), pow(sqrt(UPrime2Mean.component(5)*UPrime2Mean.component(5)),0.25) ); Info << " Writing UPrime2z" << endl; UPrime2z.write(); } else { Info<< " No UPrime2Mean" << endl; } Info<< "\nEnd\n" << endl; } // ************************************************************************* //