Hinge boundary condition

73 views
Skip to first unread message

Мария Бронзова

unread,
Nov 3, 2021, 12:00:28 PM11/3/21
to deal.II User Group
Dear colleagues, 

I was trying to prescribe displacement boundary conditions on a 3D model on certain faces but only for the x and y displacement components. I used to apply the interpolate_boundary_values class before,  but it demands dim+1 components inside my boundary_function (i have a mixed displacement-pressure formulation problem), when I call fe.component_mask(velocities). 

Could you please let me know, how I can otherwise impose my Dirichlet condition for chosen displacement components?

Thank you!

Wolfgang Bangerth

unread,
Nov 3, 2021, 12:59:30 PM11/3/21
to dea...@googlegroups.com
The function takes an argument that specifies which components of the
solution to constrain. In your case, you would provide a mask that only
specifies, for example, the x and y components. The input function is
still a dim-dimensional function, but its z component will simply be
ignored.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Мария Бронзова

unread,
Nov 3, 2021, 2:45:25 PM11/3/21
to deal.II User Group
Oh, logic, thank you a lot!

среда, 3 ноября 2021 г. в 17:59:30 UTC+1, Wolfgang Bangerth:

Wolfgang Bangerth

unread,
Nov 3, 2021, 3:34:02 PM11/3/21
to dea...@googlegroups.com
On 11/3/21 12:45 PM, Мария Бронзова wrote:
> Oh, logic, thank you a lot!

Would you like to suggest edits to the documentation of that function
that would have made that point clearer? Updating parts of the
documentation often make for excellent first patches!

Мария Бронзова

unread,
Nov 4, 2021, 9:44:08 AM11/4/21
to deal.II User Group
I somehow didn't come up intuitively with the idea of taking a closer look at the fe.component_mask parameter. I believe it would be helpful to have an extension with an example in some of the tutorial steps. 

Like in step-20 or so:

Depending on the type of the prescribed Dirichlet boundary conditions the VectorTools::interpolate_boundary_values() class can be used to interpolate boundary conditions as well on single boundary degrees of freedom. The fe.component_mask inside VectorTools::interpolate_boundary_values() specifies the desired components for selection. 

For instance, we want to set only x and y displacement components on the boundary with the id=3 to a certain value, according to the BoundaryValue<dim>() function, then the VectorTools::interpolate_boundary_values() class can be modified in the following manner:

DoFTools::make_hanging_node_constraints(dof_handler, constraints);
std::vector<bool> choice={true,true,false,false};
VectorTools::interpolate_boundary_values(dof_handler,
    3,
    BoundaryValue<dim>(),
    constraints,
    fe.component_mask(choice));
With kind regards,
Mariia

среда, 3 ноября 2021 г. в 20:34:02 UTC+1, Wolfgang Bangerth:
Reply all
Reply to author
Forward
0 new messages