# Discussion Forum

## COMSOL solver control

 Topics: 4.3a
RSS feed   |   Turn on email notifications   |   5 Replies   Last post: February 10, 2013 5:16pm UTC

Hamsa Dhwani

October 15, 2012 2:37pm UTC

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

Jesus Lucio

October 15, 2012 4:33pm UTC in response to Hamsa Dhwani

Re: COMSOL solver control

Hi, Hamsa,

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

Bye,

Jesus

Hamsa Dhwani

October 15, 2012 4:37pm UTC in response to Jesus Lucio

Re: COMSOL solver control

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

Jesus Lucio

October 15, 2012 5:11pm UTC in response to Hamsa Dhwani

Re: COMSOL solver control

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.

Hamsa Dhwani

October 15, 2012 5:36pm UTC in response to Jesus Lucio

Re: COMSOL solver control

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

Hamsa

Xu Gong

February 10, 2013 5:16pm UTC in response to Hamsa Dhwani

Re: COMSOL solver control

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

Rules and guidelines