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.

Exporting data files after parametric sweep with varying mesh size

Please login with a confirmed email address before reporting spam

The below post is related to an archived discussion


[start here] Hi, I'm doing a parametric sweep on some of my model's geometry parameters. I would like to export the data for each parameter combination into an independent .txt file for post-processing. I followed the instructions in the above discussion, but I get the following error:

"Data can only be exported if the same mesh is used for all parameter value"

Is there any way to do this? If I run the sweep and then save the results for each solution manually it works fine, but this is very tedious when I need to run many combinations...

Thank, Ori


1 Reply Last Post 2 giu 2020, 04:54 GMT-4
COMSOL Moderator

Hello Ori Golani

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 4 years ago 2 giu 2020, 04:54 GMT-4
Updated: 4 years ago 2 giu 2020, 04:59 GMT-4

DEAR PEOPLE FROM THE FUTURE: Here's what we figured out so far: You can force comsol to output data on a fixed grid using the cut point data set (I used 1D, but there are also 2D and 3D). I wanted to extract the parametric solution along a cross section of the structure. What I did is: 1. Define a line cut 2D, with the propertities of the cross section area 2. Set the line cut's dataset to the parametric solution 3. Define a cut point 1D, Set its dataset to be the cut line 4. Set its coordinates manualy to a range along the cut line. Note that the coordinaes are defined relative to the line, not the global geometry, i.e the point x=0 corresponds to the start point of the line. 5. export the data with an export data node, pointing to the cut point dataset.

The result of this is a single file with all datapoints along the cross section and all parameters in the sweep. It is a bit annoying to parse this file, but better than doing it file-by-file...

[DEAR PEOPLE FROM THE FUTURE: ](//xkcd.com/979/) Here's what we figured out so far: You can force comsol to output data on a fixed grid using the cut point data set (I used 1D, but there are also 2D and 3D). I wanted to extract the parametric solution along a cross section of the structure. What I did is: 1. Define a line cut 2D, with the propertities of the cross section area 2. Set the line cut's dataset to the parametric solution 3. Define a cut point 1D, Set its dataset to be the cut line 4. Set its coordinates manualy to a range along the cut line. Note that the coordinaes are defined relative to the line, not the global geometry, i.e the point x=0 corresponds to the start point of the line. 5. export the data with an export data node, pointing to the cut point dataset. The result of this is a single file with all datapoints along the cross section and all parameters in the sweep. It is a bit annoying to parse this file, but better than doing it file-by-file...

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.