Memory protection fault / invalid floating point operation

General discussions about how to formulate a script for FlexPDE.

Memory protection fault / invalid floating point operation

Postby Jocelyn on Tue Jul 14, 2020 10:54 pm

Dear moderators,

I am a student learning how to use flexPDE for the first time for a research project. We have generated many mesh files that run without issues, but one design file is consistently producing errors even after rebuilding and re-meshing the design. The errors we have gotten are "invalid floating point operation and "memory protection fault". Could you give us an idea of what the problem might be?

I attached a couple versions of this design along with the script that it can be run with.

Thanks
Attachments
FlexPDEForum.zip
(154.1 KB) Downloaded 31 times
Jocelyn
 
Posts: 4
Joined: Tue Jul 14, 2020 8:37 pm

Re: Memory protection fault / invalid floating point operation

Postby moderator on Wed Jul 15, 2020 4:33 pm

I believe that the origin of the error is that the cell normals of the inner swimmer have not been reversed. This is necessary even though you are not including the actual normals in the OBJ file. That is because it effects the ordering of the cell vertices (right hand rule produces the normal direction). I have attached one corrected OBJ file so you can compare. (I had to rename the file to obj.txt in order to have the forum attach it. Rename to remove .txt extension.)

Remember that FlexPDE uses the direction of the normal to determine which direction to start filling volume with cells, so in order to have one mesh inside the other, you need the inner one to have the normals reversed. Otherwise FlexPDE will try to create two full meshes, one inside the other sharing volume, instead of having a void volume in the middle.

I know that the OBJ mesh import has limited error diagnostics, and I apologize for that. It is hard for FlexPDE to know what you intend for the mesh. I will ask that the error diagnostics be reviewed to see if they can be improved.

The way I discovered the problem was to try and grid the two objects separately. The default normal direction on most CAD programs is to point out, as desired for a regular mesh. After both meshes grid independently, I flip (invert) the normals for the inner mesh and combine the two meshes into one file. This may not be convenient for your method of OBJ creation, but that is what I did. It is also helpful to us the "Domain Review" so you can confirm that the bounding meshes are being constructed correctly - to separate that from volume filling errors.
Attachments
Blender0.6SimpleV2invertswim.obj.txt
Inverted normals for swimmer - reverses order of vertices
(209.07 KB) Downloaded 29 times
moderator
 
Posts: 852
Joined: Tue Jan 11, 2011 1:45 pm

Re: Memory protection fault / invalid floating point operation

Postby Jocelyn on Fri Jul 17, 2020 11:59 am

Hello,

This fixed the 'memory protection fault' error, however the results are still not behaving and we are still getting floating point errors with meshes made for the specific design. Is this error still indicating an issue with flipped normals?

Thanks,
Jocelyn
Jocelyn
 
Posts: 4
Joined: Tue Jul 14, 2020 8:37 pm

Re: Memory protection fault / invalid floating point operation

Postby moderator on Fri Jul 17, 2020 2:14 pm

Unfortunately it is really hard to tell. Since the OBJ mesh can be any arbitrary shape, FlexPDE has a hard time diagnosing issues and separating what may be a problem in the OBJ file versus a problem filling the mesh volume. If you post the file causing trouble we can take a look. Your previous file gridded to completion for me after switching the normals.

One thing to consider is the mesh density in your 'sleeve' or tube surrounding the swimmer. I noticed that FlexPDE had to refine the cells to smaller size around the middle of the tube (perpendicular to the swimmer). FlexPDE can have trouble making small cells link up with large cells if the size difference is extreme. In the normal extrusion model, it is in control of the mesh density everywhere, but in OBJ import it is up to the user. If the size difference is extreme, then it can encounter meshing difficulties. These troubles often manifest as floating point errors. This is just a first guess without seeing the file, but something worth noting for your work. Try making the mesh density of the outer tube greater.
moderator
 
Posts: 852
Joined: Tue Jan 11, 2011 1:45 pm

Re: Memory protection fault / invalid floating point operation

Postby Jocelyn on Mon Jul 20, 2020 8:34 pm

Hello,

I tried setting the boundary mesh density higher - this produced similar results to before, and worse results when the density was set too high. The results are similar with the other files that are giving us trouble. I attached the files that can be run for this, as well as images of what the results should look similar too (labelled 'Good example'), and what the file's results are producing (labelled 'Bad example'). If you could take a look at this, that would be great.

Thank you for your help,
Jocelyn
Attachments
FilesForFlexPDEForum.zip
(170.74 KB) Downloaded 25 times
Jocelyn
 
Posts: 4
Joined: Tue Jul 14, 2020 8:37 pm

Re: Memory protection fault / invalid floating point operation

Postby moderator on Tue Jul 21, 2020 5:27 pm

This appears to be the OBJ where I flipped the normals and the auto-generated FlexPDE script from reading that OBJ. It grids fine, and the values that FlexPDE inserts are just place holders. You need to assign appropriate BCs and material properties for your model. I didn't try letting it run to completion because I don't know what values to use.

Can you provide the OBJ and pde script for the model that works the way you want it? (Blender0.6Bullet2.2Pitch) Then we can compare.
moderator
 
Posts: 852
Joined: Tue Jan 11, 2011 1:45 pm

Re: Memory protection fault / invalid floating point operation

Postby Jocelyn on Thu Jul 23, 2020 6:02 pm

Hello,

Should boundary conditions and material properties change between models? This is an example script and not what is used for simulations, but the meshes that have issues with this script are the same that have issues with the original one. The script that I attached earlier was run with other meshes and worked fine, with the exception of this mesh and two others. I am attaching the OBJ file of the better example I used.
Attachments
Blender0.6Bullet2.2Pitch.zip
(90.61 KB) Downloaded 20 times
Jocelyn
 
Posts: 4
Joined: Tue Jul 14, 2020 8:37 pm

Re: Memory protection fault / invalid floating point operation

Postby moderator on Fri Jul 24, 2020 10:46 pm

Ok, I see what you mean now. I wasn't sure if we were comparing things with different boundary conditions.

I see that this model doesn't respect the boundary conditions like the other, even though the OBJ data looks fine.

We will have to dig into this and see if we can discover why.
moderator
 
Posts: 852
Joined: Tue Jan 11, 2011 1:45 pm


Return to FlexPDE Discussion

Who is online

Users browsing this forum: No registered users and 10 guests