Minor clarification on PDESubSystem

Asked by Yaakoub El Khamra on 2012-09-11

Please forgive the noob question but I need a minor clarification about PDESubSystems. If I create a PDESystem consisting of multiple coupled PDESubsystems, can I solve it as a coupled system or will it be segregated? What about the coupling: will it have to be Picard or can I still use Newton-Raphson?

Regards
Yaakoub

Question information

Language:
English Edit question
Status:
Solved
For:
CBC.PDESys Edit question
Assignee:
No assignee Edit question
Solved by:
Mikael Mortensen
Solved:
Last query:
Last reply:

Hi Yaakoub,

Den Sep 11, 2012 kl. 6:05 PM skrev Yaakoub El Khamra:

> New question #208283 on CBC.PDESys:
> https://answers.launchpad.net/cbcpdesys/+question/208283
>
> Please forgive the noob question but I need a minor clarification about PDESubSystems. If I create a PDESystem consisting of multiple coupled PDESubsystems, can I solve it as a coupled system or will it be segregated? What about the coupling: will it have to be Picard or can I still use Newton-Raphson?

The pdesubsystems are solved sequentially with an algorithm that pretty much looks like

for pdesystem in problem.pdesystems:
    for pdesubsystem in pdesystem.pdesubsystems:
        pdesubsystem.solve()

just a little more refined. So to answer your question, multiple coupled pdesubsystems are solved sequentially. Each pdesubsystem can be solved using either Picard or Newton iterations. You can specify how many iterations of each pdesystem and pdesubsystem though. Hope that helps?

Best regards

Mikael

>
> Regards
> Yaakoub
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.

Yaakoub El Khamra (yelkhamra) said : #2

Thanks Mikael Mortensen, that solved my question.

Yaakoub El Khamra (yelkhamra) said : #3

So I am trying to decide on writing up my equations in 1 PDESubsystem or in multiple coupled PDESubsystems. Do you have any recommendation as to which is best? Is there a design guideline or a distinct advantage of using 1 PDESubsystem (with multiple coupled PDE's) over a set of multiple PDESubsystems (where 1 PDE equation is 1 PDESubsystem) ? I guess the fact that I can re-use the multiple PDESubsystems as separate components later on if I want to, but is there anything else?

Also you mentioned that subsystems can be solved with Picard or Newton iterations, and systems are solved sequentially, isn't that somewhat similar to Picard iterations over multiple subsystems?

Regards
Yaakoub

Yaakoub El Khamra (yelkhamra) said : #4

Also follow up question: how does dolfin handle Newton iterations for coupled PDE's in a subsystem? Does it compute a Jacobian for the coupled PDESubsystem? Thank you very much in advance.

Regards
Yaakoub

Den Sep 11, 2012 kl. 7:41 PM skrev Yaakoub El Khamra:

> Question #208283 on CBC.PDESys changed:
> https://answers.launchpad.net/cbcpdesys/+question/208283
>
> Yaakoub El Khamra posted a new comment:
>
> So I am trying to decide on writing up my equations in 1 PDESubsystem or in multiple coupled PDESubsystems. Do you have any recommendation as to which is best? Is there a design guideline or a distinct advantage of using 1 PDESubsystem (with multiple coupled PDE's) over a set of multiple PDESubsystems (where 1 PDE equation is 1 PDESubsystem) ? I guess the fact that I can re-use the multiple PDESubsystems as separate components later on if I want to, but is there anything else?

I don't think there is a best approach guide for this, it depends on you system of equations, how strong the coupling between the equations are, transient/steady etc. One of the main reasons we started working on CBC.PDESys was to make it easy to experiment with this type of coupling for complex systems (turbulence models in particular). I think it is more robust to solve everything coupled, but it costs more in terms of speed and memory.

>
> Also you mentioned that subsystems can be solved with Picard or Newton
> iterations, and systems are solved sequentially, isn't that somewhat
> similar to Picard iterations over multiple subsystems?

That is a correct observation, but the Newton iteration on a subsystem uses the Jacobian of that subsystem. All other variables in other subsystems have to be treated explicitly as knowns. To get a fully Newtonian solve, all equations (pdesubsystems) need to be coupled.

Best regards

Mikael

>
> Regards
> Yaakoub
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.

Den Sep 11, 2012 kl. 8:05 PM skrev Yaakoub El Khamra:

> Question #208283 on CBC.PDESys changed:
> https://answers.launchpad.net/cbcpdesys/+question/208283
>
> Yaakoub El Khamra posted a new comment:
> Also follow up question: how does dolfin handle Newton iterations for
> coupled PDE's in a subsystem? Does it compute a Jacobian for the coupled
> PDESubsystem? Thank you very much in advance.

Yes it does, it is one of the nicest features of Fenics:-)

Best regards

Mikael

>
> Regards
> Yaakoub
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.

Yaakoub El Khamra (yelkhamra) said : #7

Mikael I must admit this is all pretty awesome! Thank you very much!