Hi Code Saturne team:
I have a steady state simulation done by Code Saturne, and I am going to read the result file. As I know, different variables are stored in different files, for example, temperature field is stored in file "results.tempc.00001" which is binary. And now I am going to read the temperature field into an array in Matlab, so that I can do other data processing or calculation using the result data, anyone know how to do that? If there is a Matlab file, it's perfect. If there is not, could someone tell me the structure of the output file "results.tempc.00001", how many numbers are in this file and what's the type of these numbers, because in Matlab, I need to specify the type of numbers ("float 64" or "int32"...) and the number of the total numbers stored in the file. I suppose for example I have 12000 cells in my fluid domain, there will be 12000 temperature values stored in this file, so that I can use the global cell index to find out the temperature of this cell. Thanks for the time.
Regards!
Jundi
Using Matlab to read the Code Saturne result file
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4085
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Using Matlab to read the Code Saturne result file
Hello,
The different post-processing output formats are detailed in the user manual (pdf).
What type of post-processing do you need to do ? If you need spatial information, the fields in the post-processing mesh will not be enough. You will also need mesh-related info.
I recommend checking what formats Matlab can read, and comparing that to those Code_Saturne can output. ParaView may also hep converting between formats.
Regards,
Yvan
The different post-processing output formats are detailed in the user manual (pdf).
What type of post-processing do you need to do ? If you need spatial information, the fields in the post-processing mesh will not be enough. You will also need mesh-related info.
I recommend checking what formats Matlab can read, and comparing that to those Code_Saturne can output. ParaView may also hep converting between formats.
Regards,
Yvan
Re: Using Matlab to read the Code Saturne result file
Hi Yvan:
OK, thanks, I am reading the user manual to know the structure of the output file.
Regards!
Jundi
OK, thanks, I am reading the user manual to know the structure of the output file.
Regards!
Jundi
Re: Using Matlab to read the Code Saturne result file
Hello,
You might want to check this matlab library https://www.mathworks.com/matlabcentral ... ile-format
The file format is actually not so complicated, and I was able to write some fortran program to read simple Ensight files, see this link for instance: https://repo.ijs.si/CFLAG/CS-fluid-soli ... eo.f90#L66
Regards,
Cédric
You might want to check this matlab library https://www.mathworks.com/matlabcentral ... ile-format
The file format is actually not so complicated, and I was able to write some fortran program to read simple Ensight files, see this link for instance: https://repo.ijs.si/CFLAG/CS-fluid-soli ... eo.f90#L66
Regards,
Cédric