Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2022-06-27 09:33:18

obirler
Member
From: İstanbul
Registered: 2022-05-06
Posts: 13

Med File Documentation

I am trying to read code aster solutions programatically. So, I need to handle code aster .rmed file. I know it is based on hdf but hdf is the base library. So, I need to know the med file structure. There should be a documentations like where is node coordinates, node displacements, element stress, rather than explore the whole structure myself. Any help would be appreciated.


Software Developer, Master Naval Architect and Mechanical Engineer

Offline

#2 2022-06-27 10:12:46

jeanpierreaubry
Guru
From: nantes (france)
Registered: 2009-03-12
Posts: 3,860

Re: Med File Documentation

hello

i do not really understand why you need to read the remd file to "read code aster solutions programatically."

as anything that is in the rmed file is already in the result file .resu if you create it

you can do what you want using TABLE (for example)

you can add as well some python programming in the .comm file to export any subset of the results

if you  want to see what is in a med file you may use mdump (chapter 20.5) in my book

jean pierre aubry


consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/

Offline

#3 2022-06-27 10:24:21

mecour
Member
From: Ostrava (Czech)
Registered: 2011-04-04
Posts: 182

Re: Med File Documentation

Hello,

opeation with med file is not very pragmatic :-), cause you can post-process all result with code-aster. But if you really want to, you can read doc for medcoupling, medmem or meshio. After that you can operate with med file using C++ or python.


docs.salome-platform.org/latest/dev/MEDCoupling/developer/med-file.html



mecour

Offline

#4 2022-06-27 10:53:37

nicolas_p
Member
Registered: 2020-04-14
Posts: 66

Re: Med File Documentation

med is a binary file format so without the med API, this is impossible to read/write anything.

The simple choice is to use MedCoupling to manipulate this file

Offline

#5 2022-06-27 11:11:24

obirler
Member
From: İstanbul
Registered: 2022-05-06
Posts: 13

Re: Med File Documentation

Hi jeanpierreaubry. The reason why I need to read .rmed files is that I am developing an analysis application that will be integrated to another application that will run automated analyses. Much like Salome Mecha but is very sector-specific. So, manual post-processing is not an option. And when it comes to .resu files, it's not feasible because the med file is based on hdf file format. Hdf file format was designed to store and access large amount of datas much like databases. My program in some cases will work with a million elements. So, writing them to a .resu txt file will be very much time consuming as I already experienced the performance difference between reading med file and txt file not to mention .resu file is hard to read in format.

Anyway, its not relevant why I need to read it. The question is if there is a proper documentation for this file type. Thank you mecour for your answer. I already saw it before but it is too shallow explanation. I see the .rmed file type getting more complicated when there is a non linear analysis or when there are different type of elements.

And nicolas_p, it is not impossible to read it. I already developed a beam analysing application that read code aster med files. I also saw medcoupling before but since the programming language I use is not python, it is not an option for me, neither. I will look at it's source code as a last resort.


Software Developer, Master Naval Architect and Mechanical Engineer

Offline

#6 2022-06-27 12:20:36

nicolas_p
Member
Registered: 2020-04-14
Posts: 66

Re: Med File Documentation

medcoupling is written in c++. Python is just a binding.

i advise you to use the med API in this case because, the internal storage of med can change or aster too.

Offline