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.

COMSOL solver control

Hi,

I am looking at a problem that solves physics at two different time scales. Basically, I want to do the following

At a coarser time scale I want to solve a few partial differential equations (PDEs).

In each coarse time step, the source terms and some coefficients for these PDEs have to be determined by solving a few other PDEs with shorter time steps. The physics at the finer time scale will be solved for a few time steps and then eventually when the fine time scale agrees with the coarser time, the coefficients and source terms are updated. An algorithm will be

For CoarseTimeStep = 1 to n
for FinerTimeStep = 100 smaller time steps in each coarseTimeStep
solve PDE_SET_1 to get coefficients and source terms
end

Use these coefficients and source terms to solve PDE_SET_2
end

Can someone suggest if this is possible to do in comsol? If so, can you kindly point me to appropriate resources.

Thanks,

Hamsa

5 Replies Last Post Feb 10, 2013, 12:16 PM EST
Posted: 5 years ago Oct 15, 2012, 12:33 PM EDT
Hi, Hamsa,

This algorithms including COMSOL solvers could be done through MATLAB (you need LiveLink for MATLAB) or Java.

Bye,

Jesus
Hi, Hamsa, This algorithms including COMSOL solvers could be done through MATLAB (you need LiveLink for MATLAB) or Java. Bye, Jesus

Posted: 5 years ago Oct 15, 2012, 12:37 PM EDT
Hi Jesus,

Thanks for your prompt email. Can you point me to a tutorial or a sample program that does something of this sort?

Thanks,

Hamsa


Hi, Hamsa,

This algorithms including COMSOL solvers could be done through MATLAB (you need LiveLink for MATLAB) or Java.

Bye,

Jesus


Hi Jesus, Thanks for your prompt email. Can you point me to a tutorial or a sample program that does something of this sort? Thanks, Hamsa [QUOTE] Hi, Hamsa, This algorithms including COMSOL solvers could be done through MATLAB (you need LiveLink for MATLAB) or Java. Bye, Jesus [/QUOTE]

Posted: 5 years ago Oct 15, 2012, 1:11 PM EDT
Hi, Hamsa,

You should read the corresponding documentation:
COMSOL LiveLink™ for MATLAB® Introduction and User’s Guide, and also you can look (from MATLAB) at several simple models saved as .m

I spent much time in using MATLAB with COMSOL up to 3.5, but I don't use MATLAB with COMSOL now.
Once you have read that documentation, many people in this forum will be able to help you in particular points.

Bye,

Jesus.
Hi, Hamsa, You should read the corresponding documentation: COMSOL LiveLink™ for MATLAB® Introduction and User’s Guide, and also you can look (from MATLAB) at several simple models saved as .m I spent much time in using MATLAB with COMSOL up to 3.5, but I don't use MATLAB with COMSOL now. Once you have read that documentation, many people in this forum will be able to help you in particular points. Bye, Jesus.

Posted: 5 years ago Oct 15, 2012, 1:36 PM EDT
Thanks for your prompt reply Jesus. I am going to do some search on this. Thanks for your help.

Hamsa
Thanks for your prompt reply Jesus. I am going to do some search on this. Thanks for your help. Hamsa

Posted: 5 years ago Feb 10, 2013, 12:16 PM EST
Dear Hamsa:
I got a quite similar problem with yours. I was wondering if you solved this. We can discuss about it. Thank you!!!!

Xu
Dear Hamsa: I got a quite similar problem with yours. I was wondering if you solved this. We can discuss about it. Thank you!!!! Xu

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.