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
+12
-1
@@ -34,6 +34,7 @@
|
||||
pub mod bcs;
|
||||
pub mod check;
|
||||
pub mod constraints;
|
||||
pub mod contact;
|
||||
pub mod discrete;
|
||||
pub mod fluids;
|
||||
pub mod geometry;
|
||||
@@ -53,6 +54,7 @@ use serde::{Deserialize, Serialize};
|
||||
pub use bcs::{BoundaryCondition, Dofs, Symmetry, TEMPERATURE_DOF, Target};
|
||||
pub use check::{Diagnostic, Resolved, ResolvedSet, Severity};
|
||||
pub use constraints::{Coupling, CouplingKind, ReferencePoint};
|
||||
pub use contact::{Contact, ContactSurfaces, Friction, InitialPenetration};
|
||||
pub use discrete::{Direction, Mass, PointMass, ResolvedDirection, ResolvedMass, ResolvedSpring, Spring};
|
||||
pub use fluids::{BoxFace, BoxFaces, FaceCondition, FluidBoundary, FluidDomain, Profile, SurfaceBoundary, SurfaceCondition};
|
||||
pub use geometry::{Classification, Entity, GeometryRef};
|
||||
@@ -123,6 +125,8 @@ pub struct Model {
|
||||
reference_points: BTreeMap<String, ReferencePoint>,
|
||||
couplings: BTreeMap<String, Coupling>,
|
||||
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
|
||||
contacts: BTreeMap<String, Contact>,
|
||||
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
|
||||
masses: BTreeMap<String, PointMass>,
|
||||
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
|
||||
springs: BTreeMap<String, Spring>,
|
||||
@@ -157,6 +161,8 @@ struct ModelData {
|
||||
#[serde(default)]
|
||||
couplings: BTreeMap<String, Coupling>,
|
||||
#[serde(default)]
|
||||
contacts: BTreeMap<String, Contact>,
|
||||
#[serde(default)]
|
||||
masses: BTreeMap<String, PointMass>,
|
||||
#[serde(default)]
|
||||
springs: BTreeMap<String, Spring>,
|
||||
@@ -215,6 +221,9 @@ impl TryFrom<ModelData> for Model {
|
||||
for (n, v) in d.couplings {
|
||||
m.add_coupling(&n, v)?;
|
||||
}
|
||||
for (n, v) in d.contacts {
|
||||
m.add_contact(&n, v)?;
|
||||
}
|
||||
for (n, v) in d.masses {
|
||||
m.add_mass(&n, v)?;
|
||||
}
|
||||
@@ -330,6 +339,7 @@ impl Model {
|
||||
sections: self.sections.clone(),
|
||||
reference_points: self.reference_points.clone(),
|
||||
couplings: self.couplings.clone(),
|
||||
contacts: self.contacts.clone(),
|
||||
masses: self.masses.clone(),
|
||||
springs: self.springs.clone(),
|
||||
boundary_conditions: self.boundary_conditions.clone(),
|
||||
@@ -340,13 +350,14 @@ impl Model {
|
||||
}
|
||||
|
||||
/// Counts of each kind of definition, for summaries.
|
||||
pub fn definition_counts(&self) -> [(&'static str, usize); 11] {
|
||||
pub fn definition_counts(&self) -> [(&'static str, usize); 12] {
|
||||
[
|
||||
("sets", self.sets.len()),
|
||||
("materials", self.materials.len()),
|
||||
("sections", self.sections.len()),
|
||||
("reference_points", self.reference_points.len()),
|
||||
("couplings", self.couplings.len()),
|
||||
("contacts", self.contacts.len()),
|
||||
("masses", self.masses.len()),
|
||||
("springs", self.springs.len()),
|
||||
("boundary_conditions", self.boundary_conditions.len()),
|
||||
|
||||
Reference in new issue
Block a user