[Getdp] Newton Raphson method with a time dependent problem

michael.asam at infineon.com michael.asam at infineon.com
Tue Aug 3 16:15:47 CEST 2010



Hi Olivier, hi Stephane,

first of all thank you very, very much for your answers! They are very helpful. Stephane, it would be great if you could place a link to your homepage on the GetDP-Wiki. I suppose there are many others who will find your examples and explanations very helpful.
Unfortunately there are still some points I do not understand.
Let's divide it into two parts:

Heat conducting part
--------------------
Here I've the same like you, Stephane.
The term

         [ lambda[{T}] * Dof{d T} , {d T} ];

gets for Newton's method:

        JacNL[ dlambdadT[{T}] * Dof{T} * {d T} , {d T} ]
        [ lambda[{T}] * Dof{d T} , {d T} ]

But I must confess I was surprised to see that you have also a "Dof" in the second line. I looked at the "MagnetoStaticsNonLinear<https://geuz.org/trac/getdp/wiki/MagnetoStaticsNonLinear>" example from the Wiki:

      Galerkin { JacNL[ - dbdh[ {d phi} ] * Dof{d phi} , {d phi} ] ;
                 In Steel ; Jacobian MyJac ; Integration MyInt ; }

      Galerkin { [ b[ - {d phi} ] , {d phi} ]  ;
                In Steel ; Jacobian MyJac ; Integration MyInt ; }

There is no Dof used for the non-JacNL part.
The interesting thing is that in your example it is necessary to have it whereas in the Wiki example it does not work if I use Dof (by replacing "b[-{d phi}]" by "mu_Steel[SquNorm[{d phi }]] * Dof{d phi}").

I suppose Dof{d T} means that the actual unknown temperature is used. And {T} is the temperature from the last iteration. Am I right?

>From the Newton's method

        J(T'n') * (T'n+1' - T'n') + F(T'n') = 0

T'n+1' stands for the actual temperature to be calculated,
T'n' is the one from the last iteration, J is the Jacobian

I would suppose that there should be no Dof in the non-JacNL part.

Does one of you has an explanation about this topic?


Time dependent heat storing part
--------------------------------
Olivier, you are right. It should be Dt instead of DtDof:

Dt [ rho[] * c[{T}] * Dof{T} , {T} ]

because rho*c(T)*T corresponds to the stored energy and the flux is the derivative of this energy.
I just took the differential equation out of a book without thinking about it. There the time derivative was applied only to the temperature which is okay when rho and c are constants.

How did you derive the JacNL term for this part?
I tried your solution:

        JacNL [ rho[] * dcdT[{T}] * Dof{T} * {T} , {T} ]
        Dt [ rho[] * c[{T}] * Dof{T} , {T} ]

It seems to work but I do not understand it ...

I thought the JacNL term is a linearization of the original term:

q = d/dt (rho * c(T) * T) =
rho * (c(T'i+1') * T'i+1' - c(T'i') * T'i') / delta_t

        dq/dT = rho * ( dcdT(T) * T + c(T) ) / delta_t

gives the linearised equation:

        dq/dT * T => rho * ( dcdT(T) * T + c(T) ) / delta_t * T

Therefore I used

        dqcdT[Vol] = rho[] * ( dcdT[$1#1] * #1 + c[#1] ) / dt;
        JacNL[ dqcdT[{T}] * Dof{T} , {T} ]

But obviously I'm totally wrong here because it does not work.
Olivier, please tell me your steps how you derived your equation.
Is it right to do the linearization just of the term inside the Dt[ ... ] statement?

Thanks again for your help!!!

Kind regards,
Michael





-----Original Message-----
From: Stephane [mailto:sdurand at cage.ugent.be]
Sent: Monday, August 02, 2010 10:12 AM
To: Asam Michael (IFAG ATV BP PD1 M1)
Cc: stephane.durand at ugent.be
Subject: Re: Nonlinear time-dependent problem

Dear Michael,

sorry for the late reply, but I was on holiday. You can find several
GetDP-examples on my website http://cage.ugent.be/~sdurand/getdp. I
didn't send them to the GetDP-wiki, since they are very elementary in
comparison to the examples I found there.

One of them is the implementation of a time-dependent non-linear problem
with Newton's method. You can also find a file with some explanation on
the implementation in GetDP. The hardest part to implement Newton's
method is the calculation of the jacobian. This is however very simply
in GetDP, once you know how GetDP thinks. The JacNL-term you have to
include in GetDP is the term of the jacobian that contains the
derivative of the non-linearity. All the other terms of the jacobian can
be omitted in GetDP, since they follow directly from the weak
formulation. Take a look at the explanation sheet on my website!

Good luck! If you still have some problems, you can always contact me.

Kind regards,
Stephane

----------
Stephane Durand
Department of mathematical analysis
Ghent University
Galglaan 2
9000 Ghent
Belgium

email: sdurand at cage.ugent.be
website: http://cage.ugent.be/~sdurand/






-----Original Message-----
From: Olivier Castany [mailto:castany at quatramaran.ens.fr]
Sent: Friday, July 30, 2010 1:48 PM
To: Asam Michael (IFAG ATV BP PD1 M1); getdp at geuz.org
Subject: Re: [Getdp] Newton Raphson method with a time dependent problem

Hello,

> Galerkin { [ lambda[{T}] * Dof{d T} , {d T} ];  In Vol_The;
>            Integration I1; Jacobian Jac;  }
> // The set up of JacNL for this line is clear.

could you show it, please ? I would like to know if we agree on this point.

> Galerkin { DtDof [ rho[] * c[{T}] * Dof{T} , {T} ]; In Vol_The;
>            Integration I1; Jacobian Jac;  }
> // But how to set up the JacNL for this part??

First, I would have used Dt instead of DtDof. I think the time derivative
must be applied to rho*c(T)*T, do you agree ?

For this term, I think the JacNL should be :
JacNL [ rho[] * dcdT[{T}] * Dof{T} * {T} , {T} ]
where dcdT[] is a function providing the first derivative of c with T.

Best regards,

O.C.