forked from 1b-agent/fieldcraft-upstream
model: contact pairs, general contact and Coulomb friction, mapped by the deck writers
Contact definitions on face sets: a pair (each surface's nodes against the other's faces), general contact on a surface (self contact) or on every exterior face of the solids; Coulomb friction with static and kinetic coefficients and an exponential decay, a penalty scale and the choice to adjust or refuse initially penetrating nodes, validated with caps. Rigid walls of explicit steps gain friction. The check wants solid faces on contact surfaces; sets used by a contact cannot be deleted. fem::contact: the closest point of a triangle (Ericson) or a bilinear quadrilateral (projected Newton) to a point, and a bucket grid of face boxes for the global search, deterministic and bounded. Commands interaction.contact.pair, .general, .edit, .delete and .find (the touching parts of the mesh, with face sets and pairs made of them); contacts in the model browser. Abaqus writes *SURFACE INTERACTION with *FRICTION (exponential decay), *CONTACT PAIR and general *CONTACT; LS-DYNA *CONTACT_AUTOMATIC_SURFACE_TO_SURFACE and _SINGLE_SURFACE with FS, FD, DC; Nastran refuses contact by name. The implicit solver refuses contact by name (M7); the explicit solver refuses it until the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
6c2b2509e7
commit
ecf947c090
23 files changed
+1494
-29
No files matched your search
@@ -387,6 +387,22 @@ impl Model {
|
||||
}
|
||||
}
|
||||
|
||||
// Contacts: their surfaces are element faces of solids.
|
||||
for (name, c) in &self.contacts {
|
||||
for set in c.surfaces.sets() {
|
||||
let faces = &set_of(set).faces;
|
||||
let solid = |f: &crate::ElementFace| self.elements.get(&f.element).is_some_and(|e| e.kind.dimension() == 3);
|
||||
if faces.is_empty() {
|
||||
d.error(format!("contact `{name}`"), format!("set `{set}` has no element faces (a contact surface is a set of faces)"));
|
||||
} else if !faces.iter().all(solid) {
|
||||
d.error(
|
||||
format!("contact `{name}`"),
|
||||
format!("set `{set}` has faces of elements that are not solids (contact acts on the faces of solid elements so far)"),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Nodes with rotational degrees of freedom: those of shells and beams, and reference points
|
||||
// (worked out only when a boundary condition or load needs it).
|
||||
let rotational = std::cell::OnceCell::new();
|
||||
|
||||
Reference in new issue
Block a user