Hi!
I am currently working on solving non linear mechanics pde with FEniCS, using NonLinearVariationalProblem fonction.
I found several examples (see Hyperelasticity — DOLFIN documentation; https://fenicsproject.org/pub/course/lectures/2012-11-rognes-kaust-sa/lecture_03_static_nonlinear_pdes.pdf; Nonlinear Problems — A FEniCS Tutorial 1.0 documentation) but they seem to propose different ways to formulate the NonLinearVariationalProblem:
du = TrialFunction(V)
v = TestFunction(V)
u = Function(V)
-
1st case:
F = derivative(total_potential_energy, u, v)
J = derivative(F, u, du)
pde = NonLinearVariationalProblem(F, u, bc, J)
solver = NonLinearVariationalSolver(pde)
solver.solve () -
2nd case:
dF = derivative (F , u)
pde = NonLinearVariationalProblem(F, u, bc, dF)
solver = NonLinearVariationalSolver(pde)
solver.solve ()
Here are my questions:
- In the 1st case, is “J” the same entity than the “dF” of the 2nd case?
- I read that in non linear cases, one should only use “u” (i.e. a Function) to define the VariationalProblem, but not “du” (TrialFunction). However, in the 1st case, du is used. Why?
- Last but not least: which are the correct arguments for the NonLinearVariationalProblem?
Many thanks,
Anne