在pimpleFoam中加入solidparticle,编译错误,请问如何处理?
-
根据chalmers教程在interFoam的基础上添加solidparticle可以编译通过,但是换成pimpleFoam之后就会报错:
pimpleFoam.C:99:24: error: 'g' was not declared in this scope particles.move(g);
以下个人理解,这里particles是solidParticleCloud类的实例化对象,但是看了solidParticleCloud.H源码,g好像已经声明过了,不知道对不对,请大佬指点一下,谢谢!!!
public: // Constructors //- Construct given mesh solidParticleCloud ( const fvMesh&, const word& cloudName = "defaultCloud", bool readFields = true ); // Member Functions // Access bool hasWallImpactDistance() const; inline const fvMesh& mesh() const; inline scalar rhop() const; inline scalar e() const; inline scalar mu() const; // Edit //- Move the particles under the influence of the given // gravitational acceleration void move(const dimensionedVector& g);
-
interFoam 源码中
#include "readGravitationalAcceleration.H"
pimpleFoam源码中并没有包含gravitationalAcceleration,也没有这个field
你是想做VOF+颗粒么?为啥要研究pimpleFoam,pimpleFoam又不是做VOF的。。
如果做pimpleLPTFoam的话
https://www.foamacademy.com/wp-content/uploads/2018/03/particles_slides.pdf
这个教程比较好用