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.
Batch mode of parametric sweep analysis
Posted 29.12.2009, 10:21 GMT-5 Version 4.4 7 Replies
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Indeed there is, if you use the "Solve Prametric Sweep" (from V3.5 probably not before), this will make a series of files for each step, if that's what you are looking for
Ivar
Please login with a confirmed email address before reporting spam
In the matter of fact, what I am trying to do is exactly the "Solve Parametric Sweep" (I am using version 3.5.603) but in batch mode, without the GUI interface. It is because the simulation I will perform lasts several hours and I don't want to keep logged in. Then I will use the nohup command in Solaris to keep the program running even if I logout. But this works only in batch mode, without the graphical interface and the "Solve Parametric Sweep" only works, from my knowledge, with the graphical interface.
I saw in the help of batch mode that there is an option -pname and -globals, in order to simulate specific parameters. But I've tried to use them without success. Moreover, in the "Solve Parametric Sweep" we can choose a file to save some variables in and I don't know what would be the equivalent to this in the batch mode.
Please login with a confirmed email address before reporting spam
Sorry, but I havnt used COMSOL yet in batch mode, in this way, I have used server client, to gain RAM, but that I do not believe will help you. Usually, my runs last not more than some 15 min, when longer (8h once for a heavy model) I leave my session logged on anyhow, as I'm not working on my laptop.
But probably there are some other out there, if not you have to try "support", but I expect them too to be on "holiday" these days, perhaps not, they are probably working hard on V4 to get it out ;)
With comsol I usually set up a simple model and test out systematically the options I find, perhaps you could try it with your batch variables
Good luck anyhow
Ivar
Please login with a confirmed email address before reporting spam
"Concerning your question about the batch mode:
Yes, it is possible to run a parametric sweep in batch mode. Use the
commandline as in the installation and operationsguide
comsol batch -input <filename> -paramfile <name of parameterfile> -pname
<name of parameter>
The parameterfile must contain the parameter values in Columns. If you
have more than one parameter it looks like
value1(parameter1) value1(parameter2)
value2(parameter1) value2(parameter2)
...
the -pname option should then look like:
parametername1, parametername2
These parameters of course, have to be set somewhere in the physics
interface (in the boundary settings for example).
Also make sure that you define the right paths to the files (This is, what
I often forgot).
> 2) I will try the procedure that you mentioned. But I would like to save
> some post-processing values (e.g. dampdB_rfwv variable) to a file just
like it is saved using the solve parameter GUI (we can choose a file name
to save some parameters). How could I do that?
It is possible to save global expressions. So you have to define it in the
global expressions Dialog box and add the argument -globals
<globalexpressionname> in the command line.
One think I want to mention is, that I work with Windows and there one
need to add also the command -psave on. Otherwise no data will be stored.
So attached you will find a little example. Please try to solve it with
the following command under Solaris:
comsol batch -input example.mph -paramfile parameter.txt -pname para,para2
-globals wholestress -psave on"
I have not tested it yet but it should work.
Please login with a confirmed email address before reporting spam
Thanks for the info,
I haven't been using batch mode so far, but it will certaily arrive too
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Any inputs about how to perform batch processing for parametric sweep? I've got 3 parameters that I vary and have 12 sets of such variations to perform. So anything that is not batch process for this would not be helpful. I tried using the command
comsol batch -inputfile input.mph -outputfile out.mph -pname p1,p2,p3 -plist (my set of values) -pasve on.
Basically this command works as though there was not parameter sweep that was done in the model.
What am I missing in this?
Does batch processing not work in 4.2a from the command line?
Please let me know.
Thanks,
Rohini
Please login with a confirmed email address before reporting spam
What if I want to get output of one node?
For example, I want to export the temperature of the node with tag pev1 in a .txt file.
What command should I type for this?
THX
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.
Suggested Content
- BLOG How to Add Stop Conditions to Solvers in COMSOL Multiphysics®
- FORUM Error in parametric sweep
- KNOWLEDGE BASE Running parametric sweeps, batch sweeps, and cluster sweeps from the command line
- KNOWLEDGE BASE What hardware do you recommend for COMSOL Multiphysics®?
- BLOG How to Run on Clusters from the COMSOL Desktop® Environment