Postprocessing with matlab
Dear all, is there a convenient way to import data written by nektar into matlab? Up till now I convert the output files to the tecplot format and then read them into matlab. Thank you very much in advance With best regards Jan Jan-Niklas Hau, M.Sc. TU Darmstadt, Department of Mechanical Engineering Chair of Fluid Mechanics Otto-Bernd-Str. 2 64287 Darmstadt, Germany Tel: +49 6151 16-5249 Fax: +49 6151 16-7061 Mail: hau@fdy.tu-darmstadt.de Web: http://www.fdy.tu-darmstadt.de/
Hi Jan, I do not believe we currently have a direct output to matlab but am aware a few people are converting it indirectly (can anyone else comment on this?). If you are using the FieldConvert utility to generate the tecplot format it would probably be pretty easy to add a new module to get to matlab format directly. This utility has input, processing and output modules and so essentially we would need to copy the tecplot output module and make it into a matlab compatible format. However what ending do you typically require in matlab (it might indeed also be .dat?). Also what formatting changes are you making to that the tecplot output as things currently stand. Cheers, Spencer. On 24 Jul 2015, at 07:30, Jan-Niklas Hau <hau@fdy.tu-darmstadt.de<mailto:hau@fdy.tu-darmstadt.de>> wrote: Dear all, is there a convenient way to import data written by nektar into matlab? Up till now I convert the output files to the tecplot format and then read them into matlab. Thank you very much in advance With best regards Jan Jan-Niklas Hau, M.Sc. TU Darmstadt, Department of Mechanical Engineering Chair of Fluid Mechanics Otto-Bernd-Str. 2 64287 Darmstadt, Germany Tel: +49 6151 16-5249 Fax: +49 6151 16-7061 Mail: hau@fdy.tu-darmstadt.de<mailto:hau@fdy.tu-darmstadt.de> Web: http://www.fdy.tu-darmstadt.de/ _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
Hi Spencer, thank you very much for your fast response. Yes, in general .dat is fine. Currently, I'm simply rearranging the tecplot output to be a 2D matrix that I can post-process in matlab (fft and things like that) Best regards Jan On 24.07.2015 12:16, Sherwin, Spencer J wrote:
Hi Jan,
I do not believe we currently have a direct output to matlab but am aware a few people are converting it indirectly (can anyone else comment on this?).
If you are using the FieldConvert utility to generate the tecplot format it would probably be pretty easy to add a new module to get to matlab format directly. This utility has input, processing and output modules and so essentially we would need to copy the tecplot output module and make it into a matlab compatible format.
However what ending do you typically require in matlab (it might indeed also be .dat?). Also what formatting changes are you making to that the tecplot output as things currently stand.
Cheers, Spencer.
On 24 Jul 2015, at 07:30, Jan-Niklas Hau <hau@fdy.tu-darmstadt.de <mailto:hau@fdy.tu-darmstadt.de>> wrote:
Dear all,
is there a convenient way to import data written by nektar into matlab? Up till now I convert the output files to the tecplot format and then read them into matlab.
Thank you very much in advance
With best regards Jan
Jan-Niklas Hau, M.Sc. TU Darmstadt, Department of Mechanical Engineering Chair of Fluid Mechanics Otto-Bernd-Str. 2 64287 Darmstadt, Germany
Tel: +49 6151 16-5249 Fax: +49 6151 16-7061
Mail: hau@fdy.tu-darmstadt.de <mailto:hau@fdy.tu-darmstadt.de> Web: http://www.fdy.tu-darmstadt.de/
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk <mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ
s.sherwin@imperial.ac.uk <mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
Jan-Niklas Hau, M.Sc. TU Darmstadt, Department of Mechanical Engineering Chair of Fluid Mechanics Otto-Bernd-Str. 2 64287 Darmstadt, Germany Tel: +49 6151 16-5249 Fax: +49 6151 16-7061 Mail: hau@fdy.tu-darmstadt.de Web: http://www.fdy.tu-darmstadt.de/
Hello Jan, Yes I agree with Spencer that probably the easiest thing would be to use the FieldConvert utility - please see the user manual. You can use a simple command like the following to probe the solution at a given list of points. ./FieldConvert -m interppoints:fromxml=cube.xml:fromfld=cube_t0.fld points.pts field_t0.dat I am sending attached an example for the list of points which should be in a given structure (check the attached points.pts file). You need the XML, the FLD and the PTS file to get a DAT file. Kind regards, Rodrigo .
participants (3)
- 
                
                Jan-Niklas Hau
- 
                
                Rodrigo Moura
- 
                
                Sherwin, Spencer J