[Getdp] [castany at quatramaran.ens.fr: Re: Newton Raphson method with a time dependent problem]

Olivier Castany castany at quatramaran.ens.fr
Wed Aug 4 11:49:21 CEST 2010


Hello,
 
> 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?

I agree.
 
> >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.

Writing F({T}) = A({T}) * {T} + B({T}),
the jacobian is: J({T}) = A({T}) + A'({T}) * {T} + B'({T}),
(where operators A' and B' have the adequate meaning). 
There are two parts :
(1) A({T}) which corresponds to the linear behavior of F versus {T}
(2) A'({T}) * {T} + B'({T}) which come from the non-linear behavior of F

In GetDP, you when you write A({T}) * Dof{T}, it is a statement that A({T})
is the linear part of F({T}) (in fact B({T}) may also have a linear part, but 
it is not known by the program). 
When the matrix equation is assembled, the part (1) of the jacobian will be
adequately added. The part (2) must be specified by the JacNL term.

Note that the Picard scheme is obtained by just taking JacNL = 0.

> 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.

Unfortunately, after sending my answer a few days ago, I took a look at the
source code and noticed that "Dt" is not ready for such purpose because it
simply defaults to "DtDof" (Legacy/Cal_AssembleTerm.cpp).

The authors are aware of it and wrote :
/* Attention ! !  Faux en non lineaire ! !  */

> 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 ...

What do you mean by "work" ? does it converge quickly ?
Honestly, now that I looked at the code, I'm in the mist...

I wish I could understand better how the matrix is assembled !

Now I tend to think that the JacNL term should be:
JacNL [ Theta[] / DTime[] * rho[] * dcdT[{T}] * Dof{T} * {T} , {T} ]
Let me know if you try.

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

I think your explanation mixes the time scheme (TimeLoopTheta) and the 
non-linear scheme (Newton, IterativeLoop).
The TimeLoopTheta solves for T(t+dt) in a "theta" equation, which may be
non-linear. The IterativeLoop solves for dT between two iterations of the 
Newton algorithm in order to reach a good solution for T(t+dt). 

A+