Hi,
I am solving a variationnal problem in non linear elasticity (Neo-Hookean model) involving an external force F acting on a part of the boundary (indexed by 2 inMeshFunction
exterior_facets_meshfunction
) :
mesh = Mesh("mymesh.xml")
exterior_facets_meshfunction = MeshFunction("size_t", mesh, 'mymeshfunction.xml")
V = VectorFunctionSpace(mesh, "Lagrange", 1)
u = Function(V)
ds = Measure("ds")[exterior_facets_meshfunction]
load = Expression(("t"),t=F)
I then define the invariants, material parameters and energy density psi
.
I tried two ways to define the total energy (taking into account the effect of the external load on boundary) :
W = psi*dx - load*u[1]*ds(2)(mesh)
and :
W = psi*dx - load*u[1]*ds(2)
Does someone know the difference between the two syntaxes ?
I have the impression that the first formulation does the integration over the whole mesh, so I would rather use the second one, but it raises the following error message when I try to define the first variation of energy using derivative
:
ufl.log.UFLException: An Integral without a Domain is now illegal.
Is there another way to restrict integration on a part of the boundary ?
I am using version 1.7.0dev
Many thanks in advance !
Claire