Hi All, I am working on hyper-elastic beam buckling problem. I wish to apply non-homogeneous Dirichlet Boundary condition on the right hand side of the beam (to compress the beam). I was reading the step-44 <https://www.dealii.org/current/doxygen/deal.II/step_44.html#Solidmake_constraints> where they have mentioned about how to apply non-homogeneous boundary condition. Essentially, I will have to apply the homogeneous boundary condition at the zeroth and first Newton's step, and Non-homogeneous BC only at the zeroth step, as mentioned in the documentation <https://www.dealii.org/current/doxygen/deal.II/step_44.html#Solidmake_constraints> .
I have following two questions regarding this - 1. Why would I need to give the homogeneous boundary conditions twice? 2. Is it correct the way I am applying the constraints? I am copying the part of the code in red? The major concern that I have is that if I do constraints.clear(), then it will also clear my non-homogeneous constraint applied at the zeroth Newton step. How should I handle this? I have edited the following code from code gallery - https://dealii.org/developer/doxygen/deal.II/code_gallery_Quasi_static_Finite_strain_Compressible_Elasticity.html Thanks! Animesh template <int dim,typename NumberType> void Solid<dim,NumberType>::make_constraints(const int &it_nr) { std::cout << " CST " << std::flush; if (it_nr > 1) return; constraints.clear(); const bool apply_dirichlet_bc = (it_nr == 0); const FEValuesExtractors::Scalar x_displacement(0); // Apply Non-homogeneous B.C. { const int boundary_id = 5; if (apply_dirichlet_bc == true) VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id, ConstantFunction<dim>(dim == 3 ? std::vector<double> { -0.0001, 0.0, 0.0 } : std::vector<double> { -0.0001, 0.0 }), constraints, fe.component_mask(x_displacement)); } //Fix the left hand side.. { const int boundary_id = 1; if (apply_dirichlet_bc == true) VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id, ZeroFunction<dim>(n_components), constraints, fe.component_mask(u_fe)); else VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id, ZeroFunction<dim>(n_components), constraints, fe.component_mask(u_fe)); } // Zero Z-displacement through thickness direction // This corresponds to a plane strain condition being imposed on the beam if (dim == 3) { const int boundary_id = 2; const FEValuesExtractors::Scalar z_displacement(2); if (apply_dirichlet_bc == true) VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id, ZeroFunction<dim>(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id, ZeroFunction<dim>(n_components), constraints, fe.component_mask(z_displacement)); } constraints.close(); } -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/69400803-2427-4b62-be28-7d164c1cb1aan%40googlegroups.com.
