victorsndvg / FEconv

Program feconv is an utility to convert between several mesh and FE field formats, like ANSYS mesh files (.msh), MD Nastran input files (.bdf), I-Deas Universal (.unv), VTK files (.vtk), etc. If you use a Modulef format to store an intermediate mesh (.mfm). It can transform the FE type of a mesh composed of trangles or tetrahedra, to Lagrange P1 or P2, Raviart-Thomas (face) or Whitney (edge) finite elements. It also uses third-party code to perform bandwidth optimization (CutlHill-McKee optimization).
GNU General Public License v3.0
91 stars 25 forks source link

Comsol 5.3 Meshfile not readable #2

Open christoph33 opened 6 years ago

christoph33 commented 6 years ago

Hello I tried a 2D Comsol mphtxt to convert into unv or msh files. Neither the -l listing is working. I get errors like: INFO: Reading mphtxt file ... INFO: Reading piece 1 ... INFO: Element type: Node INFO: Element type: Edge lagrange P1 At line 117 of file source/mphtxt/module_manage_mphtxt.f90 Fortran runtime error: Index '0' of dimension 1 of array 'minelindx' below lower bound of 1

Error termination. Backtrace:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

Or Loading COMSOL mesh file... INFO: Reading mphtxt file ... INFO: Reading piece 1 ... INFO: Element type: Edge lagrange P1 ERROR: mphtxt_file/object/etype, #-1 STOP 1

I tried with triangle, quad and mapped meshes and toggled the four options in export comsol: Data elements Boundaries elements Vertex elements Geometric entity information

Nothing works. Any help? feconv.exe compiled with gfortran in Cygwin.

Regards Christoph

fran-pena commented 6 years ago

Dear Christoph,

it seems that the type of the finite element is not being properly recognized. In order to give you a more accurate answer I need the mesh file to debug the program because the tests I conducted with my COMSOL meshes were Ok.

Best regards, Fran Pena

christoph33 commented 6 years ago

Dear Fran,

Thanks for your prompt answer, I send you the 4 possibilities of the Comsol export options as flags and also two meshings (mapped and free triangular). The model is 2D axisymmetric. [cid:image002.png@01D3725A.4A9AFA10]

Best regards.

Christoph

Dear Christoph,

it seems that the type of the finite element is not being properly recognized. In order to give you a more accurate answer I need the mesh file to debug the program because the tests I conducted with my COMSOL meshes were Ok.

Best regards, Fran Pena

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/victorsndvg/FEconv/issues/2#issuecomment-350562800, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdFHO2SMlRroEJigorI0qa7RDT61M0HOks5s_BA3gaJpZM4Q8jCr.

christoph33 commented 6 years ago

Dear Fran,

Did you receive the zip files via Email or must I attach them via github?

Regards Christoph

From: fran-pena [mailto:notifications@github.com] Sent: Sunday, December 10, 2017 6:12 PM To: victorsndvg/FEconv Cc: Nölle Christoph; Author Subject: Re: [victorsndvg/FEconv] Comsol 5.3 Meshfile not readable (#2)

Dear Christoph,

it seems that the type of the finite element is not being properly recognized. In order to give you a more accurate answer I need the mesh file to debug the program because the tests I conducted with my COMSOL meshes were Ok.

Best regards, Fran Pena

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/victorsndvg/FEconv/issues/2#issuecomment-350562800, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdFHO2SMlRroEJigorI0qa7RDT61M0HOks5s_BA3gaJpZM4Q8jCr.

fran-pena commented 6 years ago

Dear Christoph,

Sorry I couldn't reply yesterday. I do not find your files neither in my GitHub account nor in the e-mail.

Best, Fran

christoph33 commented 6 years ago

Dear Fran, the missing files: Transducer_1000.zip Transducer_1000_tri.zip

fran-pena commented 6 years ago

Dear Christoph,

Now I have your meshes! Let me have some time to study the problem. I'll give you an answer.

Best, Fran

fran-pena commented 6 years ago

Dear Christoph,

I think I found the reason why your mesh is not properly parsed. The Mesh type specifications are explained in the page 657 of the COMSOL Reference Guide ; see mesh-type.pdf. In your mesh _Transducter_1000tri.mphtxt, the type mesh does not contain the parameter sets, domain labels and up/down boundaries. Can you confirm me the COMSOL version you used to generate the mesh?

Best,
Fran

fran-pena commented 6 years ago

Dear Christoph, I have made a new commit that avoid that the MPHTXT files require to contain parameters or domains for Mesh type. In such a case, the element references does not exist and they are set to zero. I am not sure that to have missing parameters or domains is permitted by the MPHTXT standard. I am still interested into know how you created the mesh (COMSOL version, options used to save the mesh,...)

I have transformed _Transducer_1000tri.mphtxt and the result can be seen below: attached image.

Best, Fran

christoph33 commented 6 years ago

Dear Fran,

My version is 5.3, the newest one.

The options are: [cid:image002.png@01D375AE.CB2698E0] Maybe the company does not provide too much information, the second option to export NASTRAN is also very poor.

Regards Christoph Nölle

fran-pena commented 6 years ago

Dear Christoph, I cannot see the attached image. Best, Fran

christoph33 commented 6 years ago

Better?

This four options are 1111 filed in this example.

From: fran-pena [mailto:notifications@github.com] Sent: Friday, December 15, 2017 2:22 PM To: victorsndvg/FEconv Cc: Nölle Christoph; Author Subject: Re: [victorsndvg/FEconv] Comsol 5.3 Meshfile not readable (#2)

Dear Christoph, I cannot see the attached image. Best, Fran

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/victorsndvg/FEconv/issues/2#issuecomment-352004257, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdFHO4JPvcaNreIAFkK__Ko1Ag3p_XH3ks5tAnJhgaJpZM4Q8jCr.

fran-pena commented 6 years ago

Sorry, I still do not see any link to an image. Have you tried to click on "Attach files by dragging &, dropping, selecting them, or pasting from the clipboard"? capture

christoph33 commented 6 years ago

Dear Fran,

I am just playing around and found out, you can export the mesh with poor information or export the geometry (in 5.1 format) with just some cumulative selections, the selections which I made are not written down.

I started a new blank model, created a axisymmetric component, imported the geometry (no selections, just the pure lines and points) then after importing the mesh, the information comes with “you will delete your geometry and mesh” and the geometry is gone…

I asked Comsol to export into hdf5, but the pressure for them is not too high.

Regards Christoph Nölle