GetFEM++  5.3
getfem_contact_and_friction_large_sliding.h
1 /* -*- c++ -*- (enables emacs c++ mode) */
2 /*===========================================================================
3 
4  Copyright (C) 2013-2017 Yves Renard, Konstantinos Poulios.
5 
6  This file is a part of GetFEM++
7 
8  GetFEM++ is free software; you can redistribute it and/or modify it
9  under the terms of the GNU Lesser General Public License as published
10  by the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version along with the GCC Runtime Library
12  Exception either version 3.1 or (at your option) any later version.
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  License and GCC Runtime Library Exception for more details.
17  You should have received a copy of the GNU Lesser General Public License
18  along with this program; if not, write to the Free Software Foundation,
19  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, you may use this file as it is a part of a free
22  software library without restriction. Specifically, if other files
23  instantiate templates or use macros or inline functions from this file,
24  or you compile this file and link it with other files to produce an
25  executable, this file does not by itself cause the resulting executable
26  to be covered by the GNU Lesser General Public License. This exception
27  does not however invalidate any other reasons why the executable file
28  might be covered by the GNU Lesser General Public License.
29 
30 ===========================================================================*/
31 
32 /** @file getfem_contact_and_friction_integral.h
33  @author Yves Renard <Yves.Renard@insa-lyon.fr>
34  @author Konstantinos Poulios <logari81@googlemail.com>
35  @date May, 2013.
36  @brief Large sliding unilateral contact and friction condition brick.
37  */
38 #ifndef GETFEM_CONTACT_AND_FRICTION_LARGE_SLIDING_H__
39 #define GETFEM_CONTACT_AND_FRICTION_LARGE_SLIDING_H__
40 
42 
43 namespace getfem {
44 
45 
46 
47  /** Adds a large sliding contact with friction brick to the model.
48  This brick is able to deal with self-contact, contact between
49  several deformable bodies and contact with rigid obstacles.
50  It uses the high-level generic assembly. It adds to the model
51  a raytracing_interpolate_transformation object.
52  For each slave boundary a multiplier variable should be defined.
53  The release distance should be determined with care
54  (generally a few times a mean element size, and less than the
55  thickness of the body). Initially, the brick is added with no contact
56  boundaries. The contact boundaries and rigid bodies are added with
57  special functions.
58  */
60  (model &md, const std::string &augm_param,
61  scalar_type release_distance, const std::string &f_coeff = "0",
62  const std::string &alpha = "1",
63  bool sym_v = false, bool frame_indifferent = false);
64 
65  /** Adds a contact boundary to an existing large sliding contact
66  with friction brick. When a boundary is declared slave, a multiplier
67  `lambda` has to be given which whould be defined on the boundary
68  `region`. The integration of contact terms is performed on each
69  slave boundary. A boundary can be both declare master and slave
70  which allows self-contact detection.
71  */
73  (model &md, size_type indbrick, const mesh_im &mim, size_type region,
74  bool is_master, bool is_slave, const std::string &u,
75  const std::string &lambda = "", const std::string &w = "");
76 
77  /** Adds a rigid obstacle to an existing large sliding contact
78  with friction brick. `expr` is an expression using the high-level
79  generic assembly language (where `x` is the current position)
80  which should be a signed distance to the obstacle.
81  `N` is the mesh dimension.
82  */
84  (model &md, size_type indbrick, const std::string &expr, size_type N);
85 
86  /** Gives the name of the group of variables corresponding to the
87  sliding data for an existing large sliding contact brick.
88  */
90  (model &md, size_type indbrick);
91 
92  /** Gives the name of the group of variables corresponding to the
93  displacement for an existing large sliding contact brick.
94  */
96  (model &md, size_type indbrick);
97 
98  /** Gives the name of the raytracing interpolate transformation
99  for an existing large sliding contact brick.
100  */
102  (model &md, size_type indbrick);
103 
104 
105 
106 
107 
108  /** Adds a large sliding contact with friction brick to the model.
109  This brick is able to deal with self-contact, contact between
110  several deformable bodies and contact with rigid obstacles.
111  It takes a variable of type multi_contact_frame wich describe
112  the contact situation (master and slave contact boundaries,
113  self-contact detection or not, and a few parameter).
114  For each slave boundary (and also master boundaries if self-contact
115  is asked) a multiplier variable should be defined.
116  DEPRECATED brick.
117  */
119  (model &md, multi_contact_frame &mcf,
120  const std::string &dataname_r,
121  const std::string &dataname_friction_coeff = std::string(),
122  const std::string &dataname_alpha = std::string());
123 
124 
125  /** Adds a large sliding contact with friction brick to the model based on Nitsche's method.
126  This brick is able to deal with self-contact, contact between
127  several deformable bodies and contact with rigid obstacles.
128  It uses the high-level generic assembly. It adds to the model
129  a raytracing_interpolate_transformation object.
130  For each slave boundary a material law should be defined as a function of the dispacement variable on this boundary.
131  The release distance should be determined with care
132  (generally a few times a mean element size, and less than the
133  thickness of the body). Initially, the brick is added with no contact
134  boundaries. The contact boundaries and rigid bodies are added with
135  special functions.
136  */
138  (model &md, bool is_unbiased, const std::string &Nitsche_param,
139  scalar_type release_distance, const std::string &f_coeff = "0",
140  const std::string &alpha = "1",
141  bool sym_v = false, bool frame_indifferent = false);
142 
143  /** Adds a contact boundary to an existing large sliding contact
144  with friction brick. When a boundary is declared slave, a multiplier
145  `lambda` has to be given which whould be defined on the boundary
146  `region`. The integration of contact terms is performed on each
147  slave boundary. A boundary can be both declare master and slave
148  which allows self-contact detection.
149  */
151  (model &md, size_type indbrick, const mesh_im &mim, size_type region,
152  bool is_master, bool is_slave, bool is_unbiased, const std::string &u,
153  const std::string &lambda = "", const std::string &w = "");
154 
155  /** Adds a rigid obstacle to an existing large sliding contact
156  with friction brick. `expr` is an expression using the high-level
157  generic assembly language (where `x` is the current position)
158  which should be a signed distance to the obstacle.
159  `N` is the mesh dimension.
160  */
162  (model &md, size_type indbrick, const std::string &expr, size_type N);
163 
164  /** Gives the name of the group of variables corresponding to the
165  sliding data for an existing large sliding contact brick.
166  */
168  (model &md, size_type indbrick);
169 
170  /** Gives the name of the group of variables corresponding to the
171  displacement for an existing large sliding contact brick.
172  */
174  (model &md, size_type indbrick);
175 
176  /** Gives the name of the raytracing interpolate transformation
177  for an existing large sliding contact brick.
178  */
180  (model &md, size_type indbrick);
181 
182 
183 
184 
185 #if 0 // Old brick, to be adapted ...
186 
187 
188 
189  /** Adds a large sliding contact with friction brick to the model.
190  This brick is able to deal with auto-contact, contact between
191  several deformable bodies and contact with rigid obstacles.
192  The condition is applied on the variable `varname_u` on the
193  boundary corresponding to `region`. `dataname_r` is the augmentation
194  parameter of the augmented Lagrangian. `dataname_friction_coeff`
195  is the friction coefficient. `mim` is an integration method on the
196  boundary. `varname_u` is the variable on which the contact condition
197  will be prescribed (should be of displacement type). `multname` is
198  a multiplier defined on the boundary which will represent the contact
199  force. If no additional boundary or rigid
200  obstacle is added, only auto-contact will be detected. Use
201  `add_boundary_to_large_sliding_contact_brick` and
202  `add_rigid_obstacle_to_large_sliding_contact_brick` to add contact
203  boundaries and rigid obstacles.
204  */
205  size_type add_integral_large_sliding_contact_brick_field_extension
206  (model &md, const mesh_im &mim, const std::string &varname_u,
207  const std::string &multname, const std::string &dataname_r,
208  const std::string &dataname_friction_coeff, size_type region);
209 
210 
211  /** Adds a contact boundary to an existing large sliding contact brick.
212  `indbrick` is the brick index.
213  */
214  void add_boundary_to_large_sliding_contact_brick
215  (model &md, size_type indbrick, const mesh_im &mim,
216  const std::string &varname_u, const std::string &multname,
217  size_type region);
218 
219  /** Adds a rigid obstacle to an existing large sliding contact brick.
220  `indbrick` is the brick index, `obs` is the expression of a
221  function which should be closed to a signed distance to the obstacle.
222  In `obs`, the current position is denoted `X` with components
223  `X(1), X(2), ...`. It is also allowed to use `x` instead of `X(1)`,
224  `y` instead of `X(2)`, `z` instead of `X(3)` and `w` instead of `X(4)`.
225  */
227  (model &md, size_type indbrick, const std::string &obs);
228 
229 
230 #endif
231 
232 } /* end of namespace getfem. */
233 
234 
235 #endif /* GETFEM_CONTACT_AND_FRICTION_LARGE_SLIDING_H__ */
size_type add_integral_large_sliding_contact_brick_raytracing(model &md, const std::string &augm_param, scalar_type release_distance, const std::string &f_coeff="0", const std::string &alpha="1", bool sym_v=false, bool frame_indifferent=false)
Adds a large sliding contact with friction brick to the model.
size_type add_integral_large_sliding_contact_brick_raytrace(model &md, multi_contact_frame &mcf, const std::string &dataname_r, const std::string &dataname_friction_coeff=std::string(), const std::string &dataname_alpha=std::string())
Adds a large sliding contact with friction brick to the model.
const std::string & transformation_name_of_large_sliding_contact_brick(model &md, size_type indbrick)
Gives the name of the raytracing interpolate transformation for an existing large sliding contact bri...
void add_rigid_obstacle_to_large_sliding_contact_brick(model &md, size_type indbrick, const std::string &expr, size_type N)
Adds a rigid obstacle to an existing large sliding contact with friction brick.
void add_rigid_obstacle_to_Nitsche_large_sliding_contact_brick(model &md, size_type indbrick, const std::string &expr, size_type N)
Adds a rigid obstacle to an existing large sliding contact with friction brick.
const std::string & displacement_group_name_of_large_sliding_contact_brick(model &md, size_type indbrick)
Gives the name of the group of variables corresponding to the displacement for an existing large slid...
size_t size_type
used as the common size type in the library
Definition: bgeot_poly.h:49
void add_contact_boundary_to_large_sliding_contact_brick(model &md, size_type indbrick, const mesh_im &mim, size_type region, bool is_master, bool is_slave, const std::string &u, const std::string &lambda="", const std::string &w="")
Adds a contact boundary to an existing large sliding contact with friction brick. ...
const std::string & sliding_data_group_name_of_large_sliding_contact_brick(model &md, size_type indbrick)
Gives the name of the group of variables corresponding to the sliding data for an existing large slid...
GEneric Tool for Finite Element Methods.
Comomon tools for unilateral contact and Coulomb friction bricks.
const std::string & displacement_group_name_of_Nitsche_large_sliding_contact_brick(model &md, size_type indbrick)
Gives the name of the group of variables corresponding to the displacement for an existing large slid...
void add_contact_boundary_to_Nitsche_large_sliding_contact_brick(model &md, size_type indbrick, const mesh_im &mim, size_type region, bool is_master, bool is_slave, bool is_unbiased, const std::string &u, const std::string &lambda="", const std::string &w="")
Adds a contact boundary to an existing large sliding contact with friction brick. ...
const std::string & sliding_data_group_name_of_Nitsche_large_sliding_contact_brick(model &md, size_type indbrick)
Gives the name of the group of variables corresponding to the sliding data for an existing large slid...
const std::string & transformation_name_of_Nitsche_large_sliding_contact_brick(model &md, size_type indbrick)
Gives the name of the raytracing interpolate transformation for an existing large sliding contact bri...
size_type add_Nitsche_large_sliding_contact_brick_raytracing(model &md, bool is_unbiased, const std::string &Nitsche_param, scalar_type release_distance, const std::string &f_coeff="0", const std::string &alpha="1", bool sym_v=false, bool frame_indifferent=false)
Adds a large sliding contact with friction brick to the model based on Nitsche&#39;s method.