如何看流场中的加速度云图?
-
@史浩 好的,感谢史老师,还有一个问题想请教,就是前面跟您学习了在求解器里createFields.H额外定义了一个量(电场强度E)
Info<< "Reading field E\n" << endl; volVectorField E ( IOobject ( "E", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), -fvc::grad(Ue) );
,在求解器.c文件里补充了求解梯度的方程,
E = -fvc::grad(Ue);
这样在实例中0文件里添加了一个E的初始文件,
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5-dev | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object E; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 1 -3 0 0 -1 0]; //kg*m*s^(-3)*A^(-1) internalField uniform (0 0 0); boundaryField { upWall { type zeroGradient; } downWall { type zeroGradient; } rightWall { type zeroGradient; } leftWall { type symmetryPlane; } frontAndBack { type empty; } } // ************************************************************************* //
还要不要在system中的fvSchemes和fvSolution对E做一些补充设置?比如下面这个
div(rho*phi,U) Gauss upwind;
E { solver smoothSolver; smoother GaussSeidel; tolerance 1e-08; relTol 0; nSweeps 1; }