Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Export post-processing data

Please login with a confirmed email address before reporting spam

Hello Everybody

How can I export global variables results to a file? There is an "Export Post-Processing Data" dialog box, but you can't choose global variables from there, just subdomain, boundary, edge or point variables.

Thanks in advance.

11 Replies Last Post Jan 28, 2011, 1:32 a.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 6, 2010, 5:13 a.m. EST
Hi

usually you find these kind of info in the command.pdf and mlinterface.pdf, check the "postglobaleval", and run an indexed search on your doc files as the examples are scattered around in the different documents

Good luck
Ivar
Hi usually you find these kind of info in the command.pdf and mlinterface.pdf, check the "postglobaleval", and run an indexed search on your doc files as the examples are scattered around in the different documents Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 8, 2010, 4:55 a.m. EST
Thank you very much, Ivar. I just was focused on COMSOL options and I did not realize that MATLAB commands could be used.
Thank you very much, Ivar. I just was focused on COMSOL options and I did not realize that MATLAB commands could be used.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 8, 2010, 6:40 a.m. EST
plot the global variable you want to export and in the plot wind0w you have an " ascii" button that save the plotted variable in a text file.
jf
plot the global variable you want to export and in the plot wind0w you have an " ascii" button that save the plotted variable in a text file. jf

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 8, 2010, 3:18 p.m. EST
Hi

pls note ther is a little bug in the ascii dump for long files with multiple plots, the columns get slightly mixed up, check carefully the results, it does not alsway show up, depends on plot data length

This has been discussed a couple of times before, pls try a search on the forum

Good luck
Ivar
Hi pls note ther is a little bug in the ascii dump for long files with multiple plots, the columns get slightly mixed up, check carefully the results, it does not alsway show up, depends on plot data length This has been discussed a couple of times before, pls try a search on the forum Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 9, 2010, 4:28 a.m. EST
Thank you all, the ascii button fits with my purposes.
Lidia.
Thank you all, the ascii button fits with my purposes. Lidia.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 14, 2010, 5:35 a.m. EDT
Hi Ivar,

In COMSOL 3.5 one was allowed to specify co-ordinates @ which data should be exported from. This was enabled by the "Get co-ordinates from, 'textfile' " option. Comsol 4a does not seem to allow one to do this. Any idea why they have removed this function? What is the work around?

Thanks

Tiaan
Hi Ivar, In COMSOL 3.5 one was allowed to specify co-ordinates @ which data should be exported from. This was enabled by the "Get co-ordinates from, 'textfile' " option. Comsol 4a does not seem to allow one to do this. Any idea why they have removed this function? What is the work around? Thanks Tiaan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 14, 2010, 8:54 a.m. EDT
and what is the equivalent in Comsol 4? Say I want to export temperature along a boundary, or more complex: a surface data to matlab.


--
Comsol 4.0a
Ubuntu 10.04.1
and what is the equivalent in Comsol 4? Say I want to export temperature along a boundary, or more complex: a surface data to matlab. -- Comsol 4.0a Ubuntu 10.04.1

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 14, 2010, 6:11 p.m. EDT
HI

I can only say what I do: send in suggestions to "suggest at comsol" that are sufficiently documented that thy see the advantages, then your suggestions have, if generic enough, a great chance to appear on next version

--
Good luck
Ivar
HI I can only say what I do: send in suggestions to "suggest at comsol" that are sufficiently documented that thy see the advantages, then your suggestions have, if generic enough, a great chance to appear on next version -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 15, 2010, 4:36 a.m. EDT
Regarding the questions posted earlier in this thread:

(1) "In COMSOL 3.5 one was allowed to specify co-ordinates @ which data should be exported from. This was enabled by the "Get co-ordinates from, 'textfile' " option. Comsol 4a does not seem to allow one to do this. Any idea why they have removed this function? What is the work around?"

By defining a Cut Point data set and choose that in the export you can specify for which coordinates the data should be evaluated. In the upcoming version 4.1 the cut point coordinates can be a grid of coordinates values and not just a single point.

(2) "and what is the equivalent in Comsol 4? Say I want to export temperature along a boundary, or more complex: a surface data to matlab."

To get a boundary (surface) in 3D: Select "Surface" from the "Space dimension" list in the Data node's Settings window and add a selection to the Solution data set (right-click and choose "Add Selection) that is the surfaces that you want to export data from. In version 4.1 you can also use the new Edge and Surface data sets to define boundaries or surfaces for which you want to export data.

Hope this helps.

Magnus Ringh, COMSOL

Regarding the questions posted earlier in this thread: (1) "In COMSOL 3.5 one was allowed to specify co-ordinates @ which data should be exported from. This was enabled by the "Get co-ordinates from, 'textfile' " option. Comsol 4a does not seem to allow one to do this. Any idea why they have removed this function? What is the work around?" By defining a Cut Point data set and choose that in the export you can specify for which coordinates the data should be evaluated. In the upcoming version 4.1 the cut point coordinates can be a grid of coordinates values and not just a single point. (2) "and what is the equivalent in Comsol 4? Say I want to export temperature along a boundary, or more complex: a surface data to matlab." To get a boundary (surface) in 3D: Select "Surface" from the "Space dimension" list in the Data node's Settings window and add a selection to the Solution data set (right-click and choose "Add Selection) that is the surfaces that you want to export data from. In version 4.1 you can also use the new Edge and Surface data sets to define boundaries or surfaces for which you want to export data. Hope this helps. Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 27, 2011, 4:44 p.m. EST
I too am facing the issue of needing to export data from COMSOL 4.0 to a coordinate set defined by me. How would one create a cut point set in version 4.0? I only see a way to define the points individually. Is there a less labor intensive way to do this? I have over 75,000 points that I need to evaluate, and having to define each individual point just isn't practical. Any advice would be greatly appreciated.

Rebecca
I too am facing the issue of needing to export data from COMSOL 4.0 to a coordinate set defined by me. How would one create a cut point set in version 4.0? I only see a way to define the points individually. Is there a less labor intensive way to do this? I have over 75,000 points that I need to evaluate, and having to define each individual point just isn't practical. Any advice would be greatly appreciated. Rebecca

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 28, 2011, 1:32 a.m. EST
Hi

My way would be, take it or not, to use matlab for so many "points".

But perhaps the points are aliogned on a boundary ? then you could use some projection coupling variables or a boundary "cut" (right click on data sets in v4)

One should always try (when possible) to use "higher order" entities as then one is handling the details as global items

--
Good luck
Ivar
Hi My way would be, take it or not, to use matlab for so many "points". But perhaps the points are aliogned on a boundary ? then you could use some projection coupling variables or a boundary "cut" (right click on data sets in v4) One should always try (when possible) to use "higher order" entities as then one is handling the details as global items -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.