Transfer from LinearVariationalSolver to LinearProblem

I am new to FEniCSx and Phase Field Method for Fracture Mechanics.
I am trying to rewrite an open-source dolfin code to dolfinx version, and meet this problem:

The code I am working with is PHASE FIELD FRACTURE IMPLEMENTATION IN FENICS from Codes | ​​​​Emilio Martínez Pañeda.

unew, uold = Function(W), Function(W)
pnew, pold, Hold = Function(V), Function(V), Function(V)
E_du = ((1.0-pold)**2)*inner(grad(v),sigma(u))*dx
E_phi = (Gc*l*inner(grad(p),grad(q))+((Gc/l)+2.0*H(uold,unew,Hold))\
            *inner(p,q)-2.0*H(uold,unew,Hold)*q)*dx

p_disp = LinearVariationalProblem(lhs(E_du), rhs(E_du), unew, bc_u)
p_phi = LinearVariationalProblem(lhs(E_phi), rhs(E_phi), pnew, bc_phi)

solver_disp = LinearVariationalSolver(p_disp)
solver_phi = LinearVariationalSolver(p_phi)

I tried to find the current version of LinearVariationalProblem and LinearVariationalSolver, but it seems they no longer exist. Currently, dolfinx has dolfinx.fem.petsc.LinearProblem dolfinx.fem.petsc — DOLFINx 0.9.0 documentation

So I tried to use:

# Set up the linear problems
p_disp = LinearProblem(
    a=lhs(E_du),
    L=rhs(E_du),
    bcs=bc_u, 
    u=unew
)

p_phi = LinearProblem(
    a=lhs(E_phi),
    L=rhs(E_phi),
    bcs=bc_phi, 
    u=pnew
)

# Solve the linear problems
p_disp.solve()
p_phi.solve()

But this is not working since LinearProblem does not take bc_u as input. But after I delete the input of u, it still gives error:

AttributeError: 'NoneType' object has no attribute 'function_spaces'

My question is:

  1. Is there a well-developed open-source Phase Field Code for Dolfinx that beginner can easily get start with?
  2. For the above code, is there a solution for transferring previous LinearVariationalProblem method to current Dolfinx version?

Very Thanks!

It is unclear why you get this error, as you have t shown the definition of bc_u.

Note that LinearProblem du take boundary conditions, see for instance: Poisson equation — DOLFINx 0.9.0 documentation
or
dolfinx.fem.petsc — DOLFINx 0.9.0 documentation

Secondly, I imagine that the issue is that ufl.rhs(E_du) is None, as you do not have a rhs in the system you show above.
Add for instance ufl.inner(dolfinx.fem.Constant(mesh, 0.), v)*ufl.dx to get a working version.

For further questions, please provide sufficient amounts of code to reproduce the issue, as questions with only snippets raises the difficulty of answering a question by several magnitudes.