Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. LPT-VOF coupling in OF 7

LPT-VOF coupling in OF 7

已定时 已固定 已锁定 已移动 OpenFOAM
3 帖子 2 发布者 2.8k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • Q 离线
    Q 离线
    qingdong_wang
    写于2020年4月4日 15:12 最后由 编辑
    #1

    大家好, 现在在做LPT和VOF耦合, 既把solidParticle植入到interFoam中。 我现在有的参考还是chamlers根据openFoam 3.0 做的, 但是他在OF7 中并不匹配

    void Foam::solidParticleCloud::inject(solidParticle::trackingData &td)
    {
    label cellI=1;
    label tetFaceI=1;
    label tetPtI=1;
    mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI);
    solidParticle* ptr1 = new solidParticle(mesh_, td.cloud().posP1_, cellI,
    tetFaceI, tetPtI,td.cloud().dP1_, td.cloud().UP1_);
    Cloud<solidParticle>::addParticle(ptr1);
    mesh_.findCellFacePt(td.cloud().posP2_, cellI, tetFaceI, tetPtI);
    solidParticle* ptr2 = new solidParticle(mesh_, td.cloud().posP2_, cellI,
    tetFaceI, tetPtI, td.cloud().dP2_, td.cloud().UP2_);
    Cloud<solidParticle>::addParticle(ptr2);
    }
    

    这个是加入到solidParticleCloud.H 的代码, 然后显示member function cloud 不存在,然后我去看了particle.H 中的代码,

    class particle
    :
    public IDLList<particle>::link
    {
    // Private member data
    //- Size in bytes of the position data
    static const std::size_t sizeofPosition_;
    //- Size in bytes of the fields
    static const std::size_t sizeofFields_;
    //- The factor by which the displacement is increased when passing
    // through negative space. This should be slightly bigger than one.
    // This is needed as a straight trajectory can form a closed loop
    // through regions of overlapping positive and negative space, leading
    // to a track which never ends. By increasing the rate of displacement
    // through negative regions, the change in track fraction over this
    // part of the loop no longer exactly cancels the change over the
    // positive part, and the track therefore terminates.
    static const scalar negativeSpaceDisplacementFactor;
    public:
    class trackingData
    {
    public:
    // Public data
    //- Flag to switch processor
    bool switchProcessor;
    //- Flag to indicate whether to keep particle (false = delete)
    bool keepParticle;
    // Constructor
    template <class TrackCloudType>
    trackingData(const TrackCloudType& cloud)
    {}
    };

    发现trackingData已经没有private成员和member function了,OF5中还是有的, 如下

    class particle
    :
    public IDLList<particle>::link
    {
    // Private member data
    //- Size in bytes of the position data
    static const std::size_t sizeofPosition_;
    //- Size in bytes of the fields
    static const std::size_t sizeofFields_;
    //- The factor by which the displacement is increased when passing
    // through negative space. This should be slightly bigger than one.
    // This is needed as a straight trajectory can form a closed loop
    // through regions of overlapping positive and negative space, leading
    // to a track which never ends. By increasing the rate of displacement
    // through negative regions, the change in track fraction over this
    // part of the loop no longer exactly cancels the change over the
    // positive part, and the track therefore terminates.
    static const scalar negativeSpaceDisplacementFactor;
    public:
    template<class CloudType>
    class TrackingData
    {
    // Private data
    //- Reference to the cloud containing (this) particle
    CloudType& cloud_;
    public:
    // Public data
    typedef CloudType cloudType;
    //- Flag to switch processor
    bool switchProcessor;
    //- Flag to indicate whether to keep particle (false = delete)
    bool keepParticle;
    // Constructor
    TrackingData(CloudType& cloud)
    :
    cloud_(cloud)
    {}
    // Member functions
    //- Return a reference to the cloud
    CloudType& cloud()
    {
    return cloud_;
    }
    };

    我看官方貌似对particle和injection做了挺多改变的。请问一下有大神对这个有所涉及或者可以给个hint吗?

    1 条回复 最后回复
  • 李 在线
    李 在线
    李东岳 管理员
    写于2020年4月4日 22:59 最后由 编辑
    #2

    你可以直接用MPPICInterFoam试试

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    Q 1 条回复 最后回复 2020年4月5日 08:20
  • Q 离线
    Q 离线
    qingdong_wang
    在 2020年4月5日 08:20 中回复了 李东岳 最后由 编辑
    #3

    @东岳 但是那个貌似是在v1906这种版本,我现在用的是OpenFoam 7, 貌似没有MPPICInterFoam

    1 条回复 最后回复
2020年4月4日 15:12

2/3

2020年4月4日 22:59

2020年4月5日 08:20
  • 登录

  • 登录或注册以进行搜索。
2 / 3
  • 第一个帖子
    2/3
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]