Hello,
I want to solve a BVP for an initially undeformed hyperelastic unit cube , with domain boundaries
bottom_fc=CompiledSubDomain("near(x[2],0.0) && on_boundary")
top_fc=CompiledSubDomain("near(x[2],1.0) && on_boundary")
right_fc=CompiledSubDomain("near(x[0],1.0) && on_boundary")
left_fc=CompiledSubDomain("near(x[0],0.0) && on_boundary")
front_fc=CompiledSubDomain("near(x[1],0.0) && on_boundary")
back_fc=CompiledSubDomain("near(x[1],1.0) && on_boundary")
and subjected to two sequential Dirichlet boundary conditions during times 0<t<T_{2}:
- Boundary Condition 1 (0<t \leq T_{1}): Apply initial uniaxial pre-stretch along x
bc_right=DirichletBC(V_u.sub(0),strtch1,right_fc)
bc_left=DirichletBC(V_u.sub(0),0.0,left_fc)
bc_bottom=DirichletBC(V_u.sub(2),0.0,bottom_fc)
bc_front=DirichletBC(V_u.sub(1),0.0,front_fc)
bcs1=[bc_right,bc_left,bc_bottom,bc_front]
- Boundary Condition 2 (T_{1}<t \leq T_{2}): Apply a clamped stretch in the direction lateral to the direction of initial prestretch.
bc_top1=DirichletBC(V_u.sub(2),stretch2,top_fc)
bc_top2=DirichletBC(V_u.sub(0),ux,top_fc)
bc_top3=DirichletBC(V_u.sub(1),uy,top_fc)
bc_bot1=DirichletBC(V_u.sub(2),Constant(0.0),bottom_fc)
bc_bot2=DirichletBC(V_u.sub(0),ux,bottom_fc)
bc_bot3=DirichletBC(V_u.sub(1),uy,bottom_fc)
bcs2=[bc_top1,bc_top2,bc_top3,bc_bot1,bc_bot2,bc_bot3]
where ux and uy are the displacements in the x and y directions on the top (and bottom) faces at t=T_1.
So what I would want to do is this:
#######################First BC#############################
u = Function(V_u)
du = TrialFunction(V_u)
v = TestFunction(V_u)
...
...
...
a_uv = derivative(Psi(u), u, v)*dx
Jac = derivative(a_uv, u, du)
F1 = NonlinearVariationalProblem(a_uv, u, bcs1, J=Jac)
solver1 = NonlinearVariationalSolver(F1)
solver1.parameters.update(snes_solver_parameters)
solver1.solve()
#######################Second BC#############################
bcs2=[bc_top1,bc_top2,bc_top3,bc_bot1,bc_bot2,bc_bot3]
u2 = Function(V_u)
du2 = TrialFunction(V_u)
v2 = TestFunction(V_u)
a_uv2 = derivative(Psi(u2), u2, v2)*dx
Jac2 = derivative(a_uv, u2, du2)
F2 = NonlinearVariationalProblem(a_uv2, u2, bcs2, J=Jac2)
solver2 = NonlinearVariationalSolver(F2)
solver2.solve()
Now this is where I am confused.
- How do I extract the displacements ux and uy on the top and bottom faces and apply bcs2
- Do I need to form a new variational problem (F2) for this case and redefine the test and trial functions (u2,v2 and du2)for the second loading step?
Any advise about how to go about solving this would be appreciated. Thanks!