FEA Inter-operability

  • Massimo
  • Topic Author
  • Visitor
  • Visitor
14 years 9 months ago #633 by Massimo
Replied by Massimo on topic Re:FEA Inter-operability
Hi,
I think your suggestion on the use of an intermediate parser is really brilliant. If a working translator will (ever) see the light, customizing it will be really fast..
Should the temporary model be kept in memory during the process? Could there be a memory drain issue?
Anyway this solution would simplify also the exclude group option..

Thanks,
Massimo

Please Log in or Create an account to join the conversation.

More
14 years 9 months ago #652 by Joël Cugnoni
Replied by Joël Cugnoni on topic Re:FEA Inter-operability
From my experience in solid mechanics, the size of the model in RAM is usually much smaller than what we expect, mainly because we use a rather limited numbers of elements & nodes compared to CFD and also because when reading an ASCII file into a Float array, you save a lot of space.

I started my first translator with this memory problem in mind (and I was not very willing to deal with memory management in C...) and chose the \"direct\" way. But it was a really big error in the end, mostly when I add to convert additionnal datasets and update the code for a slightly new syntax: A pure nightmare!!

Good luck

Joël Cugnoni - a.k.a admin
www.caelinux.com

Please Log in or Create an account to join the conversation.

  • admin
  • Topic Author
  • Visitor
  • Visitor
14 years 9 months ago #654 by admin
Replied by admin on topic Re:FEA Inter-operability
Hi all,

I found some time to implement a base module for UNV2X conversion. This module implements a modular parser for UNV datasets and a simple FEM object structure to ease the manipulation & conversion of Meshes. It is programmed in Python, and thus should be 100% multiplatform...
The aim of the code is to give you a simple framework to read UNV files, then you will need to create the code to write in the specific output format that you might need.

To show you the way, this code also provides a simple example of mesh conversion to a very simple ASCII format

I dont't think that this code is 100% complete, but it should be enough to convert UNV meshes from Salome to other codes.

At the moment, I am trying to build some converters to Elmer, Calculix & OpenFOAM... but it will take probably some time to finish.

In the mean time, here is the download link for the UNV2X.py module:
http://www.caelinux.com/downloads/tools/unv2x.py

To use it in your Python code, just do a \"import unv2x\" or \"from unv2x import *\" if you prefer.

To test the conversion example, run:
python unv2x.py unvfilename outputfileprefix

Please Log in or Create an account to join the conversation.

  • admin
  • Topic Author
  • Visitor
  • Visitor
14 years 9 months ago #655 by admin
Replied by admin on topic Re:FEA Inter-operability
Hi again,

as I was playing with this new code, I tried to write two translators: unv2abaqus & unv2ElmerUNV + some improvements of unv2x

moreover, I tried the install of unvToFoam and it worked great within \"CAE command line tools\" console & guest account. wmake is working fine!!

so I have now tested some preliminary conversion between Salome-UNV and ELMER, Calculix & OpenFOAM.

Here are some usefull links:

http://www.caelinux.com/downloads/tools/unv2x.zip
http://www.caelinux.com/downloads/tools/unvToFoam.tar.gz
http://www.caelinux.com/downloads/tools/unv_star_conversion.tar.gz

Enjoy & improve these codes as you may need !!!

Please Log in or Create an account to join the conversation.

  • phsieh2005
  • Topic Author
  • Visitor
  • Visitor
14 years 9 months ago #665 by phsieh2005
Replied by phsieh2005 on topic Re:FEA Inter-operability
Dear Admin:

Thanks a lot for the great tools.

I installed Salome v3.2.1 on a Mandriva box. Played with an assembly, meshed it and exported to unv format, with groups. I used unix2dos to convert it to dos ascii. When I tried to import it into elmer (Windows version), I got an error message: \"Error! Incorrect data in the mesh inputfile:C:/test.unv\".

I am wondering if you can post your unv-to-elmer converter? Is it written in python? How can I use it in Mandriva? Thanks!

phsieh2005

Please Log in or Create an account to join the conversation.

  • phsieh2005
  • Topic Author
  • Visitor
  • Visitor
14 years 9 months ago #666 by phsieh2005
Replied by phsieh2005 on topic Re:FEA Inter-operability
Dear Admin:

Sorry that I spoke too soon. I found the information in unv2x.zip. It contains several python codes. However, I did run into a problem:

When I tried unv2ElmerUNV.py, it created the unv file that elmer can read. However, the \"groups\" information either was not read or was read incorrectly. I have 3 bodies (exported into 3 groups, I used names as grp1, grp2, and grp3). IN elmer, after import, I only had 2 bodies, one is mesh, one is the solid body. All three partitions (badies) were lump into one.

Where did I do wrong? Help will be greatly appreciated.

Also, I thought that elmer mesh contains 4 files: name.header, name.elements, name.bounday, name.nodes. When I tried unv2elmer.py, I got: name.elments, name.groups, and name.nodes. I was not able to read these 3 files into elmer.

phsieh2005

Please Log in or Create an account to join the conversation.

Moderators: catux
Time to create page: 0.138 seconds
Powered by Kunena Forum