Re. Vanishing Jacobian Error

264 views
Skip to first unread message

Shubham Goswami

unread,
Oct 25, 2023, 8:24:49 PM10/25/23
to Nek5000
Hello All,

I am trying to setup and run a case for wall-mounted prisms using Nek5000 on Compute Canada HPC clusters. I generated a mesh using GMSH (using python API) and setup the usr and par files for my case. But the problem is that I keep getting vanishing jacobian error when I run the case. I have attached my files here. 

Please let me know a solution for this. 
ext_cyl.usr
ext_cyl.par
SIZE

Yuan, Haomin

unread,
Oct 26, 2023, 2:02:49 PM10/26/23
to Shubham Goswami, Nek5000
Hi,

This is a mesh related issue.

you need to check if some of the elements are too skewed, which makes them invalid.

You can visualize the elements from the xyz file exported by Nek5000. 

Then you should go back to your gmsh, and fix those elements.

Haomin (Kirk) Yuan



From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of Shubham Goswami <shubham...@gmail.com>
Sent: Wednesday, October 25, 2023 7:24 PM
To: Nek5000 <nek...@googlegroups.com>
Subject: [nek5000] Re. Vanishing Jacobian Error
 
Hello All,

I am trying to setup and run a case for wall-mounted prisms using Nek5000 on Compute Canada HPC clusters. I generated a mesh using GMSH (using python API) and setup the usr and par files for my case. But the problem is that I keep getting vanishing jacobian error when I run the case. I have attached my files here. 

Please let me know a solution for this. 

--
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/84b4ebb9-81a8-407a-b9a9-569268f855ben%40googlegroups.com.

Shubham Goswami

unread,
Oct 26, 2023, 2:13:51 PM10/26/23
to Yuan, Haomin, Nek5000
Hey Haomin,

Thanks for the reply. 

I did check my mesh. Out of gmsh, the mesh looks fine. But when I import it into nek5000 it comes out as skewed. 

In terms of meshing, my problem is pretty simple. It’s a wall mounted cube. 

Any solutions for this ? 

Thanks and regards,
Shubham. 

Yuan, Haomin

unread,
Oct 26, 2023, 2:31:57 PM10/26/23
to Shubham Goswami, Nek5000
I will suggest you check the mesh after you converted to 2nd order.

especially at all boundaries.
 

Haomin (Kirk) Yuan

From: Shubham Goswami <shubham...@gmail.com>
Sent: Thursday, October 26, 2023 1:13 PM
To: Yuan, Haomin <hy...@anl.gov>
Cc: Nek5000 <nek...@googlegroups.com>
Subject: Re: [nek5000] Re. Vanishing Jacobian Error
 

Shubham Goswami

unread,
Oct 26, 2023, 2:47:01 PM10/26/23
to Yuan, Haomin, Nek5000
Thanks for the reply, Haomin!!!

I checked the mesh. Here is a snapshot of the mesh out of GMSH. I checked near the boundary and it looks okay to me. Is there a chance the problem may lie elsewhere?

Regards,
Shubham.
Mesh_Gmsh.JPG

Yuan, Haomin

unread,
Oct 27, 2023, 10:22:14 AM10/27/23
to Shubham Goswami, Nek5000
Can you visualize the xyz file exported by nek5000?
then you can see where is the negative jacobian. 

Haomin (Kirk) Yuan

From: Shubham Goswami <shubham...@gmail.com>
Sent: Thursday, October 26, 2023 1:46 PM

Shubham Goswami

unread,
Oct 27, 2023, 11:31:26 AM10/27/23
to Yuan, Haomin, Nek5000
I have checked that. There are issues on the outer surface mesh. I’m not sure how to solve that, but trying to figure it out. 

Thanks for the help.

Regards,
Shubham. 

Gaurav Gupta

unread,
Jul 7, 2024, 1:23:44 AM7/7/24
to Nek5000
Hello ! 
I am also facing a similar problem. I believe my mesh is skewed, so I wanted to visualize the problematic areas. How could I visualize the xyz file ? I tried using visnek but it doesn't work.

Thanks 
Gaurav

YuHsiang Lan

unread,
Jul 10, 2024, 3:29:38 PM7/10/24
to Nek5000
Hi,

For a xyzcasename.fld00 file, you first do visnek to get the .nek5000 file.
  visnek xyzcasename
Then, open the .nek5000 file in paraview/visit. 

I personally recommend using Paraview since it can compute various mesh qualities.
Combined with the isovolume filter, you can figure out the location quite easily.

Sometimes the visnek script might fail due to the index of the filename.
I typically rename it to xyzcasename.fld01 or even xyzcasename0.f00001 to trick visnek.

Hope this helps,
Yu-Hsiang
--

Gaurav Gupta

unread,
Jul 11, 2024, 4:18:19 AM7/11/24
to Nek5000
Thank you for your reply ! Another question, what is the minimum acceptable value of Scaled Jacobian for any mesh in Nek5000. My geometry has a mix of small features which cannot be eliminated and a good quality mesh (Min, 0.1 for scaled jacobian) requires atleast 1M elements which on conversion using Exo2Nek will be 4M. I am making a hybrid mesh such that the region near the body are made with tet elements and rest using hex and wedge. If I reduce the number of elements to a range where I can do simulations with it then min jacobian is 0.01 approx. What would be your suggestion ?

YuHsiang Lan

unread,
Jul 11, 2024, 1:44:18 PM7/11/24
to Nek5000
Hi,

> what is the minimum acceptable value of Scaled Jacobian for any mesh in Nek5000
As long as the min scaled Jacobian > 0, it's valid.
The bottleneck is the conditioning. The default preconditioner might struggle to converge for the case since we approximate the elements with box during multigrid smoothing.
You might find it works better with SEMFEM for highly skewed mesh.

It's case by case for sure. 
I'd suggest to get an easy mesh to make the code running first.
Then you can decide whether it's worthy investing time to improve the mesh quality while waiting the results.

Hope this helps,
Yu-Hsiang
--



Gaurav Gupta

unread,
Jul 11, 2024, 2:10:47 PM7/11/24
to Nek5000
Hii, 
Thank you for the clarification. I am planning to use HYPRE preconditioner. I will try running the case for a simpler mesh and then look into for refining. 
Reply all
Reply to author
Forward
0 new messages