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.

Running Batch files with a number of studies

Please login with a confirmed email address before reporting spam

Hi All,
I would like to run an .mph file which includes two studies where the only difference is one BC.
Study 1 solves for a steady state case.
Study 2 solves the transient case where the solution of Study 1 is the initial condition.

When I solve manually, I input a time independent BC for Study 1 and solve.
Afterwards I manually add an additional time dependent BC, dictate that the initial state to be used is the one from Study one and solve.

However, when I run in batch mode, I need to have the time dependent BC included thus, when it initially tries running Study 1 and it stalls the program because it can not solve.

Is there anyway to bypass this?
Is there a command to order the program to solve only Study 2. I tried disabling the stationary solver in Study 1 and yet it still tried solving the stationary case/Study 1.

Any ideas ?
thanks,
yoav

5 Replies Last Post 2016年8月9日 GMT-4 07:30

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年10月1日 GMT-4 09:27
As of Comsol version 4.3, you can define different boundary conditions per study, without changing the model tree. Just check "Modify physics tree and variables for study step" in the Study Settings node and disable/enable appropriate boundary conditions in your stationary and time-dependentent studies. This is one way to go if you have 4.3 installed. (You tagged the thread as "4.2a" and "4.3" for some reason...)

Other than that, the comsolbatch command has the "-study" option which lets you single out a study to run by specifying its tag (such as std1).
As of Comsol version 4.3, you can define different boundary conditions per study, without changing the model tree. Just check "Modify physics tree and variables for study step" in the Study Settings node and disable/enable appropriate boundary conditions in your stationary and time-dependentent studies. This is one way to go if you have 4.3 installed. (You tagged the thread as "4.2a" and "4.3" for some reason...) Other than that, the comsolbatch command has the "-study" option which lets you single out a study to run by specifying its tag (such as std1).

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年10月1日 GMT-4 09:37
Thanks John!
My PC has Comsol 4.2a while the server I am only recently started working on has Comsol 4.3. I working to fix this discrepancy.
I will try the "-study" option. This was exactly what I was looking for but could not find it in the documentation.

so I should write:

comsol batch -inputfile test.mph -outputfile test_out.mph -study std2


Once again,
MUCH obliged!
Yoav
Thanks John! My PC has Comsol 4.2a while the server I am only recently started working on has Comsol 4.3. I working to fix this discrepancy. I will try the "-study" option. This was exactly what I was looking for but could not find it in the documentation. so I should write: comsol batch -inputfile test.mph -outputfile test_out.mph -study std2 Once again, MUCH obliged! Yoav

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年12月3日 GMT-5 22:06
What if I'd like to select multiple studies? such as -study std2,std3

Is there also a tag that includes all studies? such as -study all

Thanks,
Yelena
What if I'd like to select multiple studies? such as -study std2,std3 Is there also a tag that includes all studies? such as -study all Thanks, Yelena

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年8月9日 GMT-4 06:53
Dear Yelena,
Did you find the solution for your question?
Dear Yelena, Did you find the solution for your question?

Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年8月9日 GMT-4 07:30
Yelena,

Yes, you can select several studies into a single separate study using "Study Reference" options, as shown in the attached image.

Regards,
Sergei
Yelena, Yes, you can select several studies into a single separate study using "Study Reference" options, as shown in the attached image. Regards, Sergei

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.