External Mesh simulation problem

92 views
Skip to first unread message

Rushikesh Modhave

unread,
Sep 10, 2023, 6:58:55 AM9/10/23
to Prisms-CPFE-users
Hello developers , 
I am using Gmsh software for generating mesh for my interested sample in .msh format.
It was advised me earlier to generate a unstructured hex elements but it is not available in Gmsh.
1. Can I use Tetrahedral elements or any other elements or structured elements to generate the mesh ?
2. What happens with the GrainID.txt and orientations.txt ??  How to get orientations file ? should I generate it with the same regular procedure from Dream.3D ?
3. Also if I am using external mesh flag to "true" so is there any need to change in the code or anything other ?

If you can advice me for the same it would be a great help. 

regards,
Rushikesh

Mohammadreza Yaghoobi

unread,
Sep 10, 2023, 10:51:09 PM9/10/23
to Rushikesh Modhave, Prisms-CPFE-users
Hi,

1)I believe GMsh is able to mesh unstructured Hex. Neper software which generates microstructure using unstructured mesh uses GMSH to generate those.

2) You still will need orientations.txt. That is just a list of orientations for grains and does not depend on how you generate the microstructure. For grainID, that will be part of your mesh, as materialsID. You can see this example to see how the grainID is defined for each element in the mesh file. Basically, in GMSH file, along with the connectivity info, each element should also has the grainID.

3) Please carefully compared the input file  in the example I shared with the simple compression test case. It has these two keywords:
#Name of external mesh file
set Name of file containing external mesh        = n200-id4_hex.msh

#The external mesh parameter: The ratio of defiend region size to the Domain size
set External mesh parameter        = 0.05

You can learn more about this in the documentation:

Reza

--
You received this message because you are subscribed to the Google Groups "Prisms-CPFE-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prisms-cpfe-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prisms-cpfe-users/45adcf94-875e-4e88-bb59-671a99d25ed3n%40googlegroups.com.

Rushikesh Modhave

unread,
Sep 14, 2023, 1:09:08 AM9/14/23
to Prisms-CPFE-users
Hi, Thank you for the reply.
I have worked on it and able to create a mesh from Gmsh in required format. But when trying to run the simulation it is showing me the error ( screenshot attached ). I have tried everything like changing steps, domain size, etc. but it is not running.
I have also attached my other files like orientations, prm and mesh file in .msh format. Other remaining files are same as example given as "simpleCompression_ExternalMesh" as I am also working on FCC.
I have single crystal so orientation file also have a one orientation only as attached.
And please explain more about "Set External mesh parameter" , what is meant by minimum element length. I have also tried with varying this parameter but still not working.
Thank You,
Rushikesh
Simulation_error_SS.png
prm.prm
Mesh_image.png
orientations.txt
mesh3_final.msh

Diego

unread,
Sep 26, 2023, 3:51:23 AM9/26/23
to Prisms-CPFE-users
Hi  Rushikesh, 

Have you solved this problem? It seems I met the same error message as yours.

By the way,  do you know where to get the info related to the "defined region size" ( I have no idea what it is) and the minimum element length?

Regards,

Diego



Mohammadreza Yaghoobi

unread,
Sep 27, 2023, 1:41:34 AM9/27/23
to Rushikesh Modhave, Prisms-CPFE-users
Rushikesh,

I checked the mesh you generated. It seems fine. 
To start with, the value you have for "set External mesh parameter" is very large.

Let's start with the reason we have this parameter. In the case of external meshes, let's assume you have the dimension of 1, 1, and 0.2 along x, y, and z as you have (your mesh dimensions should be  x->[0,1], y->[0,1], and z->[0,1]). 
Now, prisms-plasticity is applying BCs based on the faceIDs. To find out if a point is part of a faceID or not, it checks the boundary. So, let's say you want to apply the BCs on a face with x1, y=1, it will search for all nodes with that condition. Here is why we need that parameter for external mesh. In the case of deal.ii generated mesh, these parameters are precisely generated with enough precision.  However, in the case of external mesh, you might have roundoff errors. Let's say a node with x=0.9999999 should be considered as x=1 boundary. 
"set External mesh parameter" defines that threshold for you. Now, for each direction, that tolerance is defined as:
Length of domain along that direction *  External mesh parameter

For example, in your case, if your dimension along x is 1, and your external mesh parameter is 0.001,
 all the nodes from 1- 1*0.001 to 1 + 1*0.001 is considered as x=1.

You defined the parameter as 0.5. Basically you assign all points to be on face boundaries and you get errors. "set External mesh parameter" should be very small. You want to have it large enough to cover all roundoff errors, but small enough so you don't mistakenly assign a node which is not on a face as a boundary.

Best
Reza

Diego

unread,
Sep 27, 2023, 4:21:31 AM9/27/23
to Prisms-CPFE-users
Dear Reza,

Thank you for your detailed explanation. However, I am a little confused that, in my case, the domain size is 69.9791, 120.0740, and 6, for X, Y, and Z, respectively. And I set the  External mesh parameter as 0.001. But I still get the same error message (after ~1000 increments) as  Rushikesh did.  Do you know what is the problem?

Thanks,
Diego

Rushikesh Modhave

unread,
Sep 27, 2023, 7:30:42 AM9/27/23
to Prisms-CPFE-users
Hi Reza,
Thank you for the great explanation. I am able to run the simulation now after changing the mesh to cubic element and giving appropriate 'External mesh paramter'
Thank you
Rushikesh

Reply all
Reply to author
Forward
0 new messages