Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing an External Mesh: Negative volume for element XXXXX type C3D4 #3079

Open
Ssachd-1 opened this issue Apr 12, 2024 · 2 comments
Open
Assignees
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention

Comments

@Ssachd-1
Copy link

I'm attempting to import a 3D Tetrahedral Mesh (.vtu) and use it for a single-phase flow simulation. I've successfully simulated using an internal mesh and a provided sample (egg.vtu) without encountering any errors. However, when I import my own mesh, I encounter the following error:

***** ERROR
***** LOCATION: /home/sachdeva/GEOS/codes/GEOS/src/coreComponents/mesh/CellElementSubRegion.cpp:397
***** Controlling expression (should be false): m_elementVolume[k] <= 0.0 ***** Rank 0: Negative volume for element 6020549 type C3D4 in subregion domain/MeshBodies/carteisanMesh/meshLevels/Level0/ElementRegions/elementRegionsGroup/reservoir(Mesh1_co2Injection.xml,l.56)/elementSubRegions/tetrahedra

I've also tried using mesh_doctor.py to investigate the root cause, and it seems that the volume of each element in my mesh is negative, unlike the sample mesh.

I suspect that the source code doesn't account for irregular tetrahedra, where the centroid lies outside the element, causing the negative volume.

Nevertheless, I'm unable to import my desired reservoir geometry. Could you please provide insights if you've encountered a similar problem, or suggest ideas on how I could tackle this error?

@Ssachd-1 Ssachd-1 added type: bug Something isn't working type: new A new issue has been created and requires attention labels Apr 12, 2024
@jeannepellerin
Copy link
Contributor

We have encountered the same problem and fixed it by pre-processing the tetrahedral mesh and changing the orientation of all its cells. This may be scripted in Paraview - for each cell switch 2 vertex ids.

@TotoGaz
Copy link
Contributor

TotoGaz commented Apr 18, 2024

Thanks for the answer @jeannepellerin .

BTW, if you want to perform the same reordering for all the cells, you can use the fix_elements_ordering feature of mesh_doctor to do so. See doc here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention
Projects
None yet
Development

No branches or pull requests

3 participants