def F1(w): u = w["disp"] p = w["press"] F = grad(u) + identity(u) J = det(F) Finv = inv(F) return p * J * transpose(Finv) + mu * F
def A12(w): u = w["disp"] F = zeros_like(grad(u)) for i in range(3): F[i, i] += 1. F += grad(u) J = det(F) Finv = inv(F) return J * transpose(Finv)
def F1(w): u = w["disp"] p = w["press"] F = zeros_like(grad(u)) for i in range(3): F[i, i] += 1. F += grad(u) J = det(F) Finv = inv(F) return p * J * transpose(Finv) + mu * F
def a(u, v, w): F, iF = deformation_gradient(w) DF = grad(u) dF = grad(v) dFiF = mul(dF, iF) DFiF = mul(DF, iF) tr_DFiF_dFiF = ddot(transpose(dFiF), DFiF) lnJ = np.log(det(F)) return (mu * ddot(DF, dF) - (lmbda * lnJ - mu) * tr_DFiF_dFiF + lmbda * trace(dFiF) * trace(DFiF))
def A12(w): u = w["disp"] F = grad(u) + identity(u) J = det(F) Finv = inv(F) return J * transpose(Finv)
def L(v, w): F, iF = deformation_gradient(w) dF = grad(v) lnJ = np.log(det(F)) return mu * ddot(F, dF) + (lmbda * lnJ - mu) * ddot(transpose(iF), dF)