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

Issues with particle class

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By HPE
  • 1 Post By anthonygay1812

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2020, 17:35
Default Issues with particle class
  #1
New Member
 
Anthony Gay
Join Date: Oct 2019
Posts: 12
Rep Power: 2
anthonygay1812 is on a distinguished road
Currently getting the error

Code:
--> FOAM FATAL ERROR: 
The search for an edge-connected face and tet-point failed.

    From function void Foam::particle::changeFace(Foam::label)
    in file particle/particle.C at line 320.

FOAM exiting
I'm trying to make a 1D sod shock simulation and solve it with a modified DSMC solver. I'm pretty new to OpenFoam and CFD as a whole and dont have much of an understanding about whats happening in the particle class to cause this.

Currently I'm running a modified DSMC Initialise function from the DSMCCloud class along with a modified dsmcInitialiseDict and blockMeshDict. All the other dictionaries are from the DSMC: freeSPacePeriodic tutorial.

DSMC Initialise class:https://github.com/Anthony-Gay/HPC_w...DSMCCloudMod.C
blockMeshDict: https://github.com/Anthony-Gay/HPC_w.../blockMeshDict
DSMCInisialiseDict: https://github.com/Anthony-Gay/HPC_w...InitialiseDict

My current hypothesis is that its how my tracking data (td) in the DSMCCloud::evolve function is being constructed since the error comes from line 1046
Code:
// Move the particles ballistically with their current velocities
    Cloud<ParcelType>::move(*this, td, mesh_.time().deltaTValue());
However I dont really know how to get the actual tracking data to print to my logfile.

When I dig into the particle class i find that its this loop thats triggering the message

Code:
tetPti_ = -1;
    forAll(mesh_.cells()[celli_], cellFaceI)
    {
        const label newFaceI = mesh_.cells()[celli_][cellFaceI];
        const class face& newFace = mesh_.faces()[newFaceI];
        const label newOwner = mesh_.faceOwner()[newFaceI];

        // Exclude the current face
        if (tetFacei_ == newFaceI)
        {
            continue;
        }

        // Loop over the edges, looking for the shared one. Note that we have to
        // match the direction of the edge as well as the end points in order to
        // avoid false positives when dealing with coincident ACMI faces.
        const label edgeComp = newOwner == celli_ ? -1 : +1;
        label edgeI = 0;
        for
        (
            ;
            edgeI < newFace.size()
         && edge::compare(sharedEdge, newFace.faceEdge(edgeI)) != edgeComp;
            ++ edgeI
        );

        // If the face does not contain the edge, then move on to the next face
        if (edgeI >= newFace.size())
        {
            continue;
        }

        // Make the edge index relative to the base point
        const label newBaseI = max(0, mesh_.tetBasePtIs()[newFaceI]);
        edgeI = (edgeI - newBaseI + newFace.size()) % newFace.size();

        // If the edge is next the base point (i.e., the index is 0 or n - 1),
        // then we swap it for the adjacent edge. This new edge is opposite the
        // base point, and defines the tet with the original edge in it.
        edgeI = min(max(1, edgeI), newFace.size() - 2);

        // Set the new face and tet point
        tetFacei_ = newFaceI;
        tetPti_ = edgeI;

        // Exit the loop now that the tet point has been found
        break;
    }

    if (tetPti_ == -1)
    {
        FatalErrorInFunction
            << "The search for an edge-connected face and tet-point failed."
            << exit(FatalError);
    }
From a conceptual standpoint I really dont know whats going on inside this loop. I have tried running a chekmesh but everything came back cosher and I have used my current geometry with the original solver and it worked fine.

Any insight is appreciated! Thank you!

Last edited by anthonygay1812; February 13, 2020 at 20:56. Reason: Added more information
anthonygay1812 is offline   Reply With Quote

Old   February 13, 2020, 18:14
Default
  #2
HPE
Senior Member
 
Herpes Free Engineer
Join Date: Sep 2019
Posts: 298
Rep Power: 3
HPE is on a distinguished road
More info is needed for forum dudes, so that people can replicate ur issue - and help u eventually.
anthonygay1812 likes this.
__________________
Kind regards,
HPE

The OpenFOAM community is the biggest contributor to OpenFOAM; not person A or B. Let's report bugs or issue feature requests in GitLab-OpenFOAM.

Please `design` your questions well. Such effort always pays off well for inquirers and `helpmate`s:
How to create a Minimal, Reproducible Example,
How to give enough info to get help.
HPE is offline   Reply With Quote

Old   February 13, 2020, 18:44
Default
  #3
New Member
 
Anthony Gay
Join Date: Oct 2019
Posts: 12
Rep Power: 2
anthonygay1812 is on a distinguished road
Thank you HPE, I've added more information. I think my real issue is I'm not yet effective with debugging in C++ on WSL (I've spent several years working with just Matlab) and still need to work on my skill toolbox.
anthonygay1812 is offline   Reply With Quote

Old   February 15, 2020, 05:05
Default Resolved
  #4
New Member
 
Anthony Gay
Join Date: Oct 2019
Posts: 12
Rep Power: 2
anthonygay1812 is on a distinguished road
I managed to find the issue. Once again being new to C++ in general and not knowing much about compilers, I was compiling everything as a super user. I accidentally ran a case as a super user, meaning that when I ran my all clean script as a regular user, files in my 0 directory weren't being deleted/overwritten.
HPE likes this.
anthonygay1812 is offline   Reply With Quote

Reply

Tags
dsmc openfoam dsmcfoam, particle cloud

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[swak4Foam] Validation of swak4Foam for lagrangian particle tracking nero235 OpenFOAM Community Contributions 13 March 28, 2017 06:45
droplet separation off a particle in turbulent stream anonymous_89 Main CFD Forum 0 August 22, 2013 14:40
injection problem Mark New FLUENT 0 August 4, 2013 02:30
Particle Tracking for ion Jun CFX 2 August 31, 2010 09:19
the separated particle temperature in cyclone mkuswadi FLUENT 0 December 17, 2003 09:25


All times are GMT -4. The time now is 08:24.