model: ties between surfaces

A tie names a main and a secondary face set and an optional position tolerance; it refers to
its sets, round-trips, is bounded in number and checked for solid faces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-14 15:28:02 -04:00
1 parent a91ac5baf9
commit 8d2fa980a5
4 files changed
+139 -1

No files matched your search

+12 -1
View File
@@ -45,6 +45,7 @@ pub mod nodal;
pub mod sections;
pub mod sets;
pub mod steps;
pub mod tie;
pub mod units;
use std::collections::BTreeMap;
@@ -71,6 +72,7 @@ pub use steps::{
MAX_LOAD_PATH_POINTS, MAX_NONLINEAR_INCREMENTS, MAX_NONLINEAR_ITERATIONS, MassScaling, NonlinearStatic, OutputVariable, Procedure, RigidWall,
Step, StressRate, Tolerances, Transient,
};
pub use tie::Tie;
pub use units::UnitSystem;
/// The largest node or element label. Nastran's GRID and element ids stop at 99 999 999 (eight
@@ -128,6 +130,8 @@ pub struct Model {
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
contacts: BTreeMap<String, Contact>,
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
ties: BTreeMap<String, Tie>,
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
masses: BTreeMap<String, PointMass>,
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
springs: BTreeMap<String, Spring>,
@@ -164,6 +168,8 @@ struct ModelData {
#[serde(default)]
contacts: BTreeMap<String, Contact>,
#[serde(default)]
ties: BTreeMap<String, Tie>,
#[serde(default)]
masses: BTreeMap<String, PointMass>,
#[serde(default)]
springs: BTreeMap<String, Spring>,
@@ -225,6 +231,9 @@ impl TryFrom<ModelData> for Model {
for (n, v) in d.contacts {
m.add_contact(&n, v)?;
}
for (n, v) in d.ties {
m.add_tie(&n, v)?;
}
for (n, v) in d.masses {
m.add_mass(&n, v)?;
}
@@ -341,6 +350,7 @@ impl Model {
reference_points: self.reference_points.clone(),
couplings: self.couplings.clone(),
contacts: self.contacts.clone(),
ties: self.ties.clone(),
masses: self.masses.clone(),
springs: self.springs.clone(),
boundary_conditions: self.boundary_conditions.clone(),
@@ -351,7 +361,7 @@ impl Model {
}
/// Counts of each kind of definition, for summaries.
pub fn definition_counts(&self) -> [(&'static str, usize); 12] {
pub fn definition_counts(&self) -> [(&'static str, usize); 13] {
[
("sets", self.sets.len()),
("materials", self.materials.len()),
@@ -359,6 +369,7 @@ impl Model {
("reference_points", self.reference_points.len()),
("couplings", self.couplings.len()),
("contacts", self.contacts.len()),
("ties", self.ties.len()),
("masses", self.masses.len()),
("springs", self.springs.len()),
("boundary_conditions", self.boundary_conditions.len()),