CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

parallel issue with solid particle

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2015, 17:04
Post parallel issue with solid particle
  #1
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 13
sophie_l is on a distinguished road
Hello,

I'm working on the coupling of interFoam and solidParticle. The solver works well in serial. It runs in parallel as well, and the fluid phase behaves, however, the results of the solid phase are not reasonable, let alone resemble those produced in serial run. So there must be something wrong with the parallelisation of solidParticle, it runs without error message though. I checked the output, origId of the particles are all -1 at every time step. I suspect this might be the reason, however I didn't manage to get origId right, let alone to know whether this is the reason to the problem. Could anybody shed some light on this please? Any thoughts would be much appreciated!

Thanks in advance.
Sophie
sophie_l is offline   Reply With Quote

Old   January 11, 2015, 17:43
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Sophie,

That sounds to me like a bug that has already been fixed.
  1. Can you provide more details regarding the version of OpenFOAM you're using?
  2. And an example of the piece of code you're referring to? Preferably something that can be used to reproduce the same error.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 11, 2015, 18:02
Default
  #3
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 13
sophie_l is on a distinguished road
Hi Bruno,

Thanks a lot for your prompt help. Sorry I should have included these details in my post. I'm using OF 2.3.0. The code is in particleIO.C,

Code:
// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //

Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields)
:
    mesh_(mesh),
    position_(),
    cellI_(-1),
    faceI_(-1),
    stepFraction_(0.0),
    tetFaceI_(-1),
    tetPtI_(-1),
    origProc_(Pstream::myProcNo()),
    origId_(-1)
{
    // readFields : read additional data. Should be consistent with writeFields.

    if (is.format() == IOstream::ASCII)
    {
        is  >> position_ >> cellI_;

        if (readFields)
        {
            is  >> tetFaceI_ >> tetPtI_ >> origProc_ >> origId_;
        }
    }
    else
    {
        // In binary read all particle data - needed for parallel transfer
        if (readFields)
        {
            is.read
            (
                reinterpret_cast<char*>(&position_),
                sizeof(position_)
              + sizeof(cellI_)
              + sizeof(faceI_)
              + sizeof(stepFraction_)
              + sizeof(tetFaceI_)
              + sizeof(tetPtI_)
              + sizeof(origProc_)
              + sizeof(origId_)
            );
        }
        else
        {
            is.read
            (
                reinterpret_cast<char*>(&position_),
                sizeof(position_)
              + sizeof(cellI_)
              + sizeof(faceI_)
              + sizeof(stepFraction_)
            );
        }
    }

    // Check state of Istream
    is.check("particle::particle(Istream&, bool)");
}
Do you think the incorrect value of 'origId' is the reason why the parallel output is wrong? If not, what else would you suggest me looking into?

Thanks!
Sophie

Last edited by wyldckat; January 18, 2015 at 14:57. Reason: [QUOTE] -> [CODE]
sophie_l is offline   Reply With Quote

Old   January 11, 2015, 18:12
Default
  #4
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 13
sophie_l is on a distinguished road
Besides, parallel run using MPPICFoam produces correct origId. However, both MPPICFoam and the solver I use with solidParticle are using the same 'lagrangian' library where origId is dealt with. Of course MPPICFoam employs the 'intermediate' library on top of that, but I didn't find any manipulation of origId in 'intermediate'. So it looks strange to me why MPPICFoam produces correct origId?

Thanks in advance!
Sophie
sophie_l is offline   Reply With Quote

Old   January 12, 2015, 04:08
Default
  #5
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
Quote:
Originally Posted by sophie_l View Post
Besides, parallel run using MPPICFoam produces correct origId. However, both MPPICFoam and the solver I use with solidParticle are using the same 'lagrangian' library where origId is dealt with. Of course MPPICFoam employs the 'intermediate' library on top of that, but I didn't find any manipulation of origId in 'intermediate'. So it looks strange to me why MPPICFoam produces correct origId?
The difference between your implementation and MPPICFoam is that MPPICFoam does not use the solidParticle class. In fact, when I sought 3 months ago, I couldn't find anything in OpenFOAM that uses the solidParticle class (using the OF23x source code). Rather, it uses KinematicParcel<particle> which extends the particle class.

With that being said, I'd recommend using the KinematicParcel class instead, since it seems like solidParticle is deprecated (correct me if I'm wrong).

Better yet, the third party tool 'swak4Foam' is able to introduce lagrangian particles to any solver (including interFoam) using a dictionary format (only ~10 lines) to interact with the user (i.e., we). I've used it with one-way coupled particles 3 months ago (interFoam). I recommend checking if it satisfies your needs. See: http://openfoamwiki.net/images/6/6d/...ng_OFW8.pdf#81
floquation is offline   Reply With Quote

Old   January 12, 2015, 05:36
Default
  #6
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 13
sophie_l is on a distinguished road
Hello,

Thanks for your reply. I'm developing my own code on the platform of OF 2.3.0. It's true MPPICFoam doesn't use solidParticle class, yet the variable 'origId' is only specified in the basic 'lagrangian' library, which is employed by both. I didn't find further manipulation of 'origId' in 'intermediate' library, so it's confusing to me.
sophie_l is offline   Reply With Quote

Old   January 18, 2015, 15:05
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Sophie: I took a quick look at the first answer you posted and I went searching for changes in OpenFOAM's source code... and I found this commit: https://github.com/OpenFOAM/OpenFOAM...1cfd1c99f4953a
It refers to this bug report: http://www.openfoam.org/mantisbt/view.php?id=1304 - Looks familiar?!

Either way, I very strongly suggest that you upgrade to OpenFOAM 2.3.1, before continuing. There have been a ton of bug fixes made between 2.3.0 and 2.3.1, and if you don't upgrade, you risk going around and round and round...

If you continue to reproduce the same error, please create a small test case with which the error can be reproduced. Preferably something based on one of OpenFOAM's own tutorials.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
lagrangian solid particle tracking - OFv2.1 PelusDadidus OpenFOAM Programming & Development 7 August 21, 2015 09:05
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
solid particle molecular viscosity setting Tim Guo CFX 3 June 29, 2005 09:26
Solid particles in a rotating vessel with 5.7.1 Sandeep CFX 0 May 17, 2005 10:54
solid particle + water Neser CFX 0 March 4, 2005 23:00


All times are GMT -4. The time now is 06:15.