Hello everyone,

I would like to apply a traction boundary condition on the surface of a 
cantilever beam. Suppose I have a vector named 
*traction[dof_handler.n_dofs()**], *which gives the various traction on 
each dof. I implemented the boundary condition as follows:


            for ( unsigned int i = 0; i < dofs_per_cell; ++i )
            {
                const unsigned int component_i = fe.
system_to_component_index( i ).first;
                for ( unsigned int face = 0; face < GeometryInfo<dim>::
faces_per_cell; ++face )
                {
                    if ( cell->face( face )->at_boundary() == true && cell->
face( face )->boundary_id() != 0 )   //boundary_id() == 0  means the 
Dirichlet boundary condition
                    {
                        fe_face_values.reinit( cell, face );

                        std::vector<unsigned int> local_face_dof_indices( 
dofs_per_face );
                        cell->face( face )->get_dof_indices( 
local_face_dof_indices );


                        assert( dofs_per_face == 
fe_face_values.n_quadrature_points 
* dim );


                        for ( unsigned int q = 0; q < fe_face_values.
n_quadrature_points; ++q )
                        {
                            cell_rhs( i ) += traction( 
local_face_dof_indices[q * dim + component_i] ) * fe_face_values.shape_value
( i, q ) * fe_face_values.JxW( q );
                        }
                    }
                }
            }

At present, I set the traction to be nonzero in only one of the surfaces of 
a cantilever beam to make quantitative comparison with the previous 
literature. However, the results do not seem to be correct.
Another thing I would like to know is what this traction may mean in this 
code. Is this pressure or force?
I would like to ask for some help from you about these two questions.

Best regards,
Qin

-- 
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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to