fedoo.constraint.IPCSelfContact
- class IPCSelfContact(mesh, dhat=0.001, dhat_is_relative=True, barrier_stiffness=None, friction_coefficient=0.0, eps_v=0.001, broad_phase='hash_grid', adaptive_barrier_stiffness=True, use_ccd=None, line_search_energy=None, use_ogc=False, space=None, name='IPC Self Contact')
Self-contact Assembly using the IPC method.
Convenience wrapper around
IPCContactthat automatically extracts the surface mesh from the volumetric mesh. Useful for problems where a single body may come into contact with itself (e.g. buckling, folding, compression of porous structures).All barrier stiffness tuning is automatic (see
IPCContactfor details).- Parameters:
mesh (fedoo.Mesh) – Full volumetric mesh.
dhat (float, default=1e-3) – Barrier activation distance (relative to bounding box diagonal by default, see
dhat_is_relative).dhat_is_relative (bool, default=True) – If
True,dhatis a fraction of the bounding box diagonal.barrier_stiffness (float, optional) – Barrier stiffness \(\kappa\).
None(default) for automatic computation and adaptive update — recommended.friction_coefficient (float, default=0.0) – Coulomb friction coefficient \(\mu\).
eps_v (float, default=1e-3) – Friction smoothing velocity.
broad_phase (str, default="hash_grid") – Broad-phase collision detection method.
adaptive_barrier_stiffness (bool, default=True) – Adaptively update \(\kappa\) at each converged time increment.
use_ccd (bool, default=False) – Enable CCD line search for robustness. Mutually exclusive with
use_ogc.line_search_energy (bool or None, default=None) – Energy-based backtracking after CCD.
Noneauto-enables whenuse_ccd=True(seeIPCContact).use_ogc (bool, default=False) – Enable OGC trust-region step filtering. Mutually exclusive with
use_ccd. Only supported for shell / surface meshes; raisesValueErrorfor solid meshes.space (ModelingSpace, optional) – Modeling space.
name (str, default="IPC Self Contact") – Name of the contact assembly.
Examples
import fedoo as fd fd.ModelingSpace("3D") mesh = fd.Mesh.read("gyroid.vtk") material = fd.constitutivelaw.ElasticIsotrop(1e5, 0.3) contact = fd.constraint.IPCSelfContact(mesh, use_ccd=True) wf = fd.weakform.StressEquilibrium(material, nlgeom="UL") solid = fd.Assembly.create(wf, mesh) assembly = fd.Assembly.sum(solid, contact) pb = fd.problem.NonLinear(assembly) res = pb.add_output("results", solid, ["Disp", "Stress"]) # ... add BCs and solve ...
See also
IPCContactBase class with full parameter documentation.
- __init__(mesh, dhat=0.001, dhat_is_relative=True, barrier_stiffness=None, friction_coefficient=0.0, eps_v=0.001, broad_phase='hash_grid', adaptive_barrier_stiffness=True, use_ccd=None, line_search_energy=None, use_ogc=False, space=None, name='IPC Self Contact')
Methods
IPCSelfContact.assemble_global_mat([compute])Recompute barrier contributions from cached vertex positions.
Delete Global Matrix and Global Vector related to the assembly.
Return a dict with all the known Assembly (with a name).
Get the last computed global matrix.
Get the last computed global vector.
Initialize the IPC contact assembly.
Reset the assembly.
Begin a new time increment.
Restart the current time increment after NR failure.
IPCSelfContact.update(pb[, compute])Update the IPC assembly for the current Newton–Raphson iteration.
Name of the assembly if defined.
Modeling space associated to the assembly.
Assembly associated to the mesh of the deformed geometry.
AssemblySum object that contains the assembly.