Problem in solving the evolution equation for viscoelasticity

Hello Everyone,
I am implementing large deformation viscoelasticity with the following evolution equation.
1
where
2
Gamma_dot and mu are materials constant, and lambda_valpha is the Lagrange multiplier for imposing compressibility conditions for viscous deformation.
This is the code with Lagrange multiplier :


### Gradient of Cv1,Cv2,and Cv3
def CalcGradCv(u_old,Cv1_old,Cv2_old,Cv3_old,muv,gamma,lv1_old,lv2_old,lv3_old):
    I = Identity(V.mesh().geometry().dim()) 
    F_old = I + grad(u_old)
    J_old=det(F_old)
    C_old=F_old.T*F_old
    barC_old=J_old**(-2/3)*C_old
    Jv1= det(Cv1_old)
    Jv2= det(Cv2_old)
    Jv3= det(Cv3_old)
    slope1 =((muv[0]*gamma[0])/2)*(barC_old-1/3*inner(barC_old,inv(Cv1_old))*Cv1_old)-lv1_old*Jv1*inv(Cv1_old)
    slope2 =((muv[1]*gamma[1])/2)*(barC_old-1/3*inner(barC_old,inv(Cv2_old))*Cv2_old)-lv2_old*Jv2*inv(Cv2_old)
    slope3 =((muv[2]*gamma[2])/2)*(barC_old-1/3*inner(barC_old,inv(Cv3_old))*Cv3_old)-lv3_old*Jv3*inv(Cv3_old)
    return slope1, slope2, slope3,(Jv1-1.),(Jv2-1.),(Jv3-1.)
#weak form for incompressibity condition for viscoelastic deformation.

F2v1 = hv1*_lv1*dx
F2v2 = hv2*_lv2*dx
F2v3 = hv3*_lv3*dx

    

Getting following error.

Number of nodes:  729
Number of cells:  3072
3
time:  0.0
Solving nonlinear variational problem.
  Newton iteration 0: r (abs) = 2.757e-14 (tol = 1.000e-10) r (rel) = 1.000e+00 (tol = 1.000e-06)
  Newton solver finished in 0 iterations and 0 linear solver iterations.
3
time:  0.1
Solving nonlinear variational problem.
  Newton iteration 0: r (abs) = 9.069e+00 (tol = 1.000e-10) r (rel) = 1.000e+00 (tol = 1.000e-06)
Traceback (most recent call last):
  File "/home/willkin/Desktop/APS3_Fenics/hpbasic1.py", line 409, in <module>
    solver.solve()
RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to solve linear system using PETSc Krylov solver.
*** Reason:  Solution failed to converge in 0 iterations (PETSc reason DIVERGED_PC_FAILED, residual norm ||r|| = 0.000000e+00).
*** Where:   This error was encountered inside PETScKrylovSolver.cpp.
*** Process: 0
*** 
*** DOLFIN version: 2019.1.0
*** Git changeset:  7e99df3564aea9dc05729ddb64498ae47b6bc15d
*** ----------

Could you please help me with my error?

Thanking you in advance !!

It looks like you are applying the Lagrange multiplier constraint to the _old solution (rather than to the current timestep), since hv1 = det(Cv1_old) - 1. I think you mean to apply the Lagrange multiplier to the function at the current timestep, i.e.

F2v1 = (det(Cv1) - 1)*_lv1*dx + det(Cv1)*inner(inv(Cv1), _Cv1)*lv1*dx
F2v2 = (det(Cv2) - 1)*_lv2*dx + det(Cv2)*inner(inv(Cv2), _Cv2)*lv2*dx
F2v3 = (det(Cv3) - 1)*_lv3*dx + det(Cv3)*inner(inv(Cv3), _Cv3)*lv3*dx

which executes for me with no errors.

2 Likes

Thank you very much for your time.yes you are correct.