Inverse of piecewise constant of the second-rank tensor


50
views
0
14 days ago by

Dear FEniCS community,

I have a question if one of the coefficients is piecewise constant of the second-rank tensor, and in the left-hand side of the equation, I have to inverse this coefficient as you can see in the third line as `mu/k`. How should I accomplish this? Should I inverse it before put it in a0?

KM = TensorFunctionSpace(mesh, "DG", 0)
k = Function(KM)

a0 =  inner(2*mu_l*strain(u)+lmbda_l*div(u)*I-alpha*p*I,sym(grad(y)))*dx\
    + div(v)*q*dx\
    + mu/k*inner(v,phi)*dx\
    - p*div(phi)*dx


Thank you very much for your time.

Meen

Community: FEniCS Project

1 Answer


3
14 days ago by
Emek  
If you want to take the inverse of A_ij where A is a tensor of rank 2 with indices ij, then you should use
inv(A)
or
as_tensor( inv(A)[i,j] ... )
in your formulation.

Best, Emek
Thank you very much, Emek!!!
written 10 days ago by Teeratorn Kadeethum  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »