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.

How to store parametric sweep results in single file or MATLAB variable

Please login with a confirmed email address before reporting spam

Hello

I need to perform several nested parametric sweeps in order to vary several geometric parameters simultaneously (I'm using Comsol version 4.0a)
If I add a "Report to file" task in the inner parametric sweep, in order to export the value, say, of a line integration along one boundary, COMSOL generates one text file per parameters set.
This is very unconfortable in my case in which I have several thousand of parameter sets.

Do anyone know a way to export the calculated quantities in a single text file?

I cannot store the solution for every parameter set in the model and perform the calculation of the derived quantities after solving, since the whole mph file would be become too large.

I tried to work with the .m file and Comsol + matlab livelink but I still couldn't get rid of this problem. The code automatically generated by Comsol contains the following lines

model.batch.create('p1', 'Parametric');
model.batch('p1').feature.create('so1', 'Solutionseq');
model.batch('p1').feature.create('nu1', 'Numericalseq');

but I can't understand how to access the calculated quantities in the numerical sequence.

Thanks for reading
best regards,

Pierfrancesco

3 Replies Last Post Nov 24, 2011, 10:39 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 Jan 4, 2011, 3:48 a.m. EST
Hi

the most I have done is a double parametric sweep, that in v4.1 you can export as a 2D table in either direct or transposed shape

--
Good luck
Ivar
Hi the most I have done is a double parametric sweep, that in v4.1 you can export as a 2D table in either direct or transposed shape -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 23, 2011, 9:08 p.m. EST
Hi,
How do we export the data after choosing " Report to File"
Hi, How do we export the data after choosing " Report to File"

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 Nov 24, 2011, 10:39 a.m. EST
Hi

You export, in V4, either from the table data directly, or from a data set (or derived data set) - export, and then Export - Data node operation

--
Good luck
Ivar
Hi You export, in V4, either from the table data directly, or from a data set (or derived data set) - export, and then Export - Data node operation -- 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.