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.

Solving coupled PDES in comsol

Please login with a confirmed email address before reporting spam

I have a system where I am solving two different PDEs in COMSOL. The solution to the first PDE is called u and the second is u2. To solve the second one I need to use the solution that COMSOL found for the first PDE, i.e. u enters in the second PDE. How do I do solve this problem such that COMSOL knows to call the solution found from solving the first PDE? I tried to blindly just plug in u in the second PDE but that gives me an error.
The way the problem is set up currently I have two PDEs and two separate studies, one for each PDE.

2 Replies Last Post 14 juin 2016, 14:03 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 14 juin 2016, 13:42 UTC−4
Hello August,
In principle, what you are doing will work if you implement it correctly (assuming that your equations are only one-way coupled; if they are two-way coupled you need to use a single study). Consider posting a more detailed description of what you want your model to do (equations, BCs, geometry, etc) as well as your mph file if you'd like Discussion Forum users to look at how you tried to set it up.
Best,
Jeff
Hello August, In principle, what you are doing will work if you implement it correctly (assuming that your equations are only one-way coupled; if they are two-way coupled you need to use a single study). Consider posting a more detailed description of what you want your model to do (equations, BCs, geometry, etc) as well as your mph file if you'd like Discussion Forum users to look at how you tried to set it up. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 14 juin 2016, 14:03 UTC−4
okay thanks for the answer. The equations are two way coupled and what I do is perform a parametric sweep over the first equation, where I sweep over K*u2, where K=0 at first and then I sweep up to K=1. Here u2 is the solution to the second equation, in which the solution u also enters. So to summarize.
I solve the first PDE for K=0, plug this solution into the second PDE. I then solve this for u2 and put in K*u2, where K is now non-zero (defined by the sweep).
Then I reiterate this process.
I have attached my .mph file. It is written in COMSOL 5.1. I hope that will work for you.
okay thanks for the answer. The equations are two way coupled and what I do is perform a parametric sweep over the first equation, where I sweep over K*u2, where K=0 at first and then I sweep up to K=1. Here u2 is the solution to the second equation, in which the solution u also enters. So to summarize. I solve the first PDE for K=0, plug this solution into the second PDE. I then solve this for u2 and put in K*u2, where K is now non-zero (defined by the sweep). Then I reiterate this process. I have attached my .mph file. It is written in COMSOL 5.1. I hope that will work for you.

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.