Hi, I am working on a problem with solution dependent property, for instance k(u)\frac{du}{dt}=\frac{d^2u}{dx^2}. I am wondering how to implement it. I saw some posts giving almost the same solution: define u=Function(V)
, and then define k
as an expression such as k=Expression('u+1',u=u,degree=2)
. I am confused by this implementation, since it is treating each time step as a non-linear problem (linear problem defines TrialFunction
first). It looks to me that Expression
freezes k(u)
at each time step based on the solution of u
in the previous step, thus we are solving a linear problem at each time step. Why in all examples (e.g. Material property depending on solution) we do not define u=TrialFunction(V)
?
I tried u=TrialFunction(V)
and k=Expression('u+1',u=u,degree=2)
. It reports error, so it seems Expression
does not input TrialFunction
. Is it designed on purpose?