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.

Save a log file on each iteration step with parametric sweep.

Maxim Electromobility

Please login with a confirmed email address before reporting spam

Hi,

In COMSOL 3.5a I can run parametric sweep over parameter “A” and write a global variable (“B” for instance) into a log file during calculation. With each iteration step I have an updated log file with two columns A and B.

Now I am trying to move to COMSOL 4.2a and to do the same parametric sweep with variable export into one txt file on each iteration step. I tried the following procedure:
1) Add a boundary probe of integral type. This probe value I want to export in to the log file.
2) Add a parametric sweep node under the study 1 node.
3) Add a data node under Export node and set the file name.
4) Add a Export to file node under Study->Job configurations->Parametereic and select Data 1 from Run list.
5) Deselect Clear previous and Add parameters to filename checkboxes.
And I am getting the effort massage: “Error in sweep: could not overwrite existing file.”

Is there probably an easy way to save the log file with “A” and “B” columns on each iteration step? In version 3.5a there is a very simple solution for log file export, see picture 6 in the attachments.

Thank you,
Maxim


2 Replies Last Post 29.07.2014, 21:52 GMT-4
COMSOL Moderator

Hello Maxim

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: 1 decade ago 24.04.2014, 05:22 GMT-4
Dear Maxim,

did you find a way to avoid the error message?
With Version 4.3b I still get the same error message that you mentioned.

I use the "export to file" node in a parametric sweep.
And, as you also did, I cleared the "clear previous" checkbox. According to COMSOLs documentation, this should create one single exported file including the results of every single sweep run.
But instead I get the error message "“Error in sweep: could not overwrite existing file” which you got, too.

So in case you found the reason for that error I'd be very interested in your solution.

Thanks and best regards,
Juergen
Dear Maxim, did you find a way to avoid the error message? With Version 4.3b I still get the same error message that you mentioned. I use the "export to file" node in a parametric sweep. And, as you also did, I cleared the "clear previous" checkbox. According to COMSOLs documentation, this should create one single exported file including the results of every single sweep run. But instead I get the error message "“Error in sweep: could not overwrite existing file” which you got, too. So in case you found the reason for that error I'd be very interested in your solution. Thanks and best regards, Juergen

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.07.2014, 21:52 GMT-4
I am interested in writing the log into a log file as txt.
I need one log file per parametric sweep
OR one log file for all parametric sweep
I am interested in writing the log into a log file as txt. I need one log file per parametric sweep OR one log file for all parametric sweep

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.