hello everyone please I have a Problem I’m new to fenics programming and I’d like to solve the linear equation of a piezoelectric
Hi,
transform it into weak form and use a mixed function space for the displacement u and electric potential. You can start by the quasistatic version and then adapt any elastodynamic demo to this case quite easily…
Hi Jeremi,
thank you for your answer.My difficulty resides exactly in the quasistatic version case because for the elastodynamic case I already have an idea. Please can you give me if it’s possible a document or a type that illustrates the quasistatic version case?
well then if you are OK for the elastodynamic case, what is your problem ? If you don’t post your code with a specific issue, people will not be likely to help you
Hi,
please, I still have a problem, I have changed my expression as you asked me. My difficulty lies in the fact that I don’t know where to start in order to implement this. I would like to know if there are any examples or tipps that you can give me
Hi,
I assume that B is the symetrized gradient and Bbar the gradient operators. Here is some partial code for the quasistatic part of the bilinear weak form:
Ue = VectorElement("CG", mesh.ufl_cell(), 1)
Ve = FiniteElement("CG", mesh.ufl_cell(), 1)
W = FunctionSpace(mesh, MixedElement([Ue, Ve]))
u_, v_ = TestFunctions(W)
du, dv = TrialFunctions(W)
def sigma(u):
eps = sym(grad(u))
return lmbda*tr(eps)*Identity(u.geometric_dimension()) + 2*mu*esp
a = inner(sigma(du), eps(u_))*dx + inner(sigma(du), dot(e, grad(v_)))*dx \
+ inner(sigma(u_), dot(e, grad(dv)))*dx - dot(grad(dv), dot(eps_S, grad(v_)))*dx
I assumed isotropic elasticity for the mechanical part. You will also need to define the third-rank tensor e
for coupling and the second-rank tensor eps_S
for the electrical part.
For the extension to dynamics, you just need to adapt elastodynamics demos e.g. https://fenicsproject.org/docs/dolfin/latest/python/demos/elastodynamics/demo_elastodynamics.py.html