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 see the plots after running in batch mode?

Please login with a confirmed email address before reporting spam

Hello!
I managed to get comsol to run in batch mode (Linux). However, after I open my newly created output model file out.mph, I do not see any graphs available. I am solely interested in CFD module, where comsol usually builds Velocity and Pressure plots if run with GUI. I want to have access to those after I open out.mph with Comsol GUI again.

I tried to run my computation command with -graphics switch, but nothing changed.
Is there a way to get those plots, with animation and all that stuff?
If not, where are the output files and how to interpret them? Any computation is useless unless you can access some sort of output.

Any help is greatly appreciated!

4 Replies Last Post 22 mars 2013, 06:17 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 mars 2013, 14:04 UTC−4
Hello,

I am facing exactly the same problem using COMSOL/4.3a, where you able to solve it?

Can anybody comment on it?

Cheers,

Meier Thierry
Hello, I am facing exactly the same problem using COMSOL/4.3a, where you able to solve it? Can anybody comment on it? Cheers, Meier Thierry

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 mars 2013, 03:46 UTC−4
Hi Alexander and Thierry,

with parametric sweeps it seems to work and the defined plots in the "export" node are plotted automatically during batch run (when using the "-graphics" option) and stored using the defined path.
But for model runs without parametric sweep, the export node does not seem to be run automatically and no output files are generated. It would be very nice if it was. Maybe there is a way to do that?

When running several models in a batch using e.g. Matlab script, then plotting can be done automatically by the Matlab code. Still it would be nice to achieve running the model's export node automatically when running from a simple command line shell script.
So if anyone has a solution for that, I would be interested as well.

Cheers,
Juergen
Hi Alexander and Thierry, with parametric sweeps it seems to work and the defined plots in the "export" node are plotted automatically during batch run (when using the "-graphics" option) and stored using the defined path. But for model runs without parametric sweep, the export node does not seem to be run automatically and no output files are generated. It would be very nice if it was. Maybe there is a way to do that? When running several models in a batch using e.g. Matlab script, then plotting can be done automatically by the Matlab code. Still it would be nice to achieve running the model's export node automatically when running from a simple command line shell script. So if anyone has a solution for that, I would be interested as well. Cheers, Juergen

Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 mars 2013, 10:15 UTC−4
Hi,

the solution to this is quite simple. After setting up your model but before submitting it to thebatch go to the study node and click "Get Initial Value". By default this will create the default plots as well - just empty.

When you solve that file with a batch, e.g.

comsolbatch -inputfile simple_init.mph -outputfile out.mph

the output will be there and poi,nt to the solution object that was generated during the solution.

By contrast, if you solve a model without the initialization only the solution object will be generated but not a default plot.
Note: After the "Get Initial Value"you can evcen use Edit > Clear All Solutions before saving and still the plot will be created. This could be valuable if you want to avoid sending a big file e.g. to a cloud server.

Best regards,

Sven
Hi, the solution to this is quite simple. After setting up your model but before submitting it to thebatch go to the study node and click "Get Initial Value". By default this will create the default plots as well - just empty. When you solve that file with a batch, e.g. comsolbatch -inputfile simple_init.mph -outputfile out.mph the output will be there and poi,nt to the solution object that was generated during the solution. By contrast, if you solve a model without the initialization only the solution object will be generated but not a default plot. Note: After the "Get Initial Value"you can evcen use Edit > Clear All Solutions before saving and still the plot will be created. This could be valuable if you want to avoid sending a big file e.g. to a cloud server. Best regards, Sven


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 mars 2013, 06:17 UTC−4
Hi Sven,

thanks for your reply.
I think, this is, what Alexander and Thierry were asking for.
Do you have a solution for my question, too?

The generation of the plots inside the model .mph works in my case.
Another really nice thing would be to automatically execute the export node of a model.
Hence, to automatically generate all output files that are defined in that node during a batch run.

Some model .mph files become quite large in size (several GB). It is not a very nice approach, having to open each of these large files (after running several models automatically) in order to see the plots and export them manually.

With models containing parametric sweeps it is possible to auto-generate the defined export files even in batch mode.
Is there a way for models w/o parametric sweeps, to achieve the same thing in batch mode?

Thanks a lot,
Juergen
Hi Sven, thanks for your reply. I think, this is, what Alexander and Thierry were asking for. Do you have a solution for my question, too? The generation of the plots inside the model .mph works in my case. Another really nice thing would be to automatically execute the export node of a model. Hence, to automatically generate all output files that are defined in that node during a batch run. Some model .mph files become quite large in size (several GB). It is not a very nice approach, having to open each of these large files (after running several models automatically) in order to see the plots and export them manually. With models containing parametric sweeps it is possible to auto-generate the defined export files even in batch mode. Is there a way for models w/o parametric sweeps, to achieve the same thing in batch mode? Thanks a lot, Juergen

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.