nonlin system, doc?

Asked by Achim Schroll

hi,
thanks to the FEniCS tutorial, I have just learned how to solve scalar, nonlinear VPs directly.
Is there any doc or an example how to treat a system?
I have to integrate a nonlinear diffusive system in time.
In order to solve the nonlinear VP "directly", I may obviously not spell it out componentwise.
Best, Achim

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Achim Schroll
Solved:
Last query:
Last reply:
Revision history for this message
Marie Rognes (meg-simula) said :
#1

Achim Schroll wrote:
> New question #105989 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/105989
>
> hi,
> thanks to the FEniCS tutorial, I have just learned how to solve scalar, nonlinear VPs directly.
> Is there any doc or an example how to treat a system?
> I have to integrate a nonlinear diffusive system in time.
> In order to solve the nonlinear VP "directly", I may obviously not spell it out componentwise.
> Best, Achim
>
>

Have you looked at the hyperelasticity demo?

    demo/pde/hyperelasticity

--
Marie

Revision history for this message
Achim Schroll (achim-simula-deactivatedaccount) said :
#2

I am obviously not up to date. Curently I am running release 0.9.4. Have to check my OS as well. My demos are old and hyperelasticity does not exist. Could you just mail the code to <email address hidden> ? Thanks beforehand, Achim.

Revision history for this message
Marie Rognes (meg-simula) said :
#3

Achim Schroll wrote:
> Question #105989 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/105989
>
> Status: Answered => Open
>
> Achim Schroll is still having a problem:
> I am obviously not up to date. Curently I am running release 0.9.4. Have
> to check my OS as well. My demos are old and hyperelasticity does not
> exist. Could you just mail the code to <email address hidden> ? Thanks
> beforehand, Achim.
>
>

Done.

--
Marie

Revision history for this message
Achim Schroll (achim-simula-deactivatedaccount) said :
#4

I still appreciate any help to set up function spaces to automatically differentiate and solve a nonlinear system of the following type:
dot(h*grad(s), grad(phi))*dx + f*phi*dx = 0
dot(s*grad(h), grad(psi))*dx + g*psi*dx = 0
Unknowns are u=(s,h), while (f,g) are given.
Best, Achim

Revision history for this message
Marie Rognes (meg-simula) said :
#5

Achim Schroll wrote:
> Question #105989 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/105989
>
> Status: Answered => Open
>
> Achim Schroll is still having a problem:
> I still appreciate any help to set up function spaces to automatically differentiate and solve a nonlinear system of the following type:
> dot(h*grad(s), grad(phi))*dx + f*phi*dx = 0
> dot(s*grad(h), grad(psi))*dx + g*psi*dx = 0
> Unknowns are u=(s,h), while (f,g) are given.
> Best, Achim
>
>

Example attached. (The example is just made up, so the Newton solver
does not converge and so the answer is just rubbish, but it should
illustrate how to go about.)

You are probably particularily interested in line 25.

--
Marie

Revision history for this message
Garth Wells (garth-wells) said :
#6

It's best to start a new question when the topic changes.

Garth

On 31/03/10 21:55, Achim Schroll wrote:
> Question #105989 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/105989
>
> Status: Answered => Open
>
> Achim Schroll is still having a problem:
> I still appreciate any help to set up function spaces to automatically differentiate and solve a nonlinear system of the following type:
> dot(h*grad(s), grad(phi))*dx + f*phi*dx = 0
> dot(s*grad(h), grad(psi))*dx + g*psi*dx = 0
> Unknowns are u=(s,h), while (f,g) are given.
> Best, Achim
>

Revision history for this message
Achim Schroll (achim-simula-deactivatedaccount) said :
#7

Thank you Marie, you solved my problem.
For convergence (in my context) I had to put a "u" into the solver:
(s, h) = pde.solve(u).split()
Best, Achim