Interactions
Module: xfea.model.interactions
Contact
Section titled “Contact”Contact(normal, tangent, **kwargs)
Contact between two surfaces: how they push on each other across the faces and slide along them.
Abstract: use a subclass (HardContactNoFriction,
HardContactFrictionPenalty, HardContactRough,
LinearContactFrictionPenalty). One contact property can serve
several interfaces.
Parameters
| Name | Type | Description |
|---|---|---|
| normal | str | The behaviour across the faces (along each face’s normal): "HARD" or "Linear". |
| tangent | None, float or str | The behaviour along the faces: None (frictionless), a friction coefficient, or "ROUGH". |
| name | str, optional | A name for the input file; one is generated if not given. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
normalread-only
The behaviour across the faces: "HARD" or "Linear".
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tangentread-only
The behaviour along the faces: None, a friction coefficient or "ROUGH".
uidUUID | Noneread-only
The object’s unique id, a UUID.
Convection
Section titled “Convection”Convection(h, temperature_value, temperature_amplitude, **kwargs)
Convection from a surface: a heat flux h (T - T_sink) per unit area, out of the surface where it is warmer.
Parameters
| Name | Type | Description |
|---|---|---|
| h | float | The film (heat transfer) coefficient, power per area per degree (mW/(mm2 K) for mm models). |
| temperature_value | float | The surrounding fluid’s (sink) temperature, in the model’s temperature unit. |
| temperature_amplitude | Amplitude or None |
How the sink temperature varies in time: None keeps it constant. |
Properties
hread-only
The film coefficient, power per area per degree.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
temperatureread-only
The sink temperature, a ScalarLoad with its amplitude.
uidUUID | Noneread-only
The object’s unique id, a UUID.
HardContactFrictionPenalty
Section titled “HardContactFrictionPenalty”HardContactFrictionPenalty(mu, tol, **kwargs)
Contact with Coulomb friction: the faces push on each other when pressed together and stick until friction gives.
Friction is a penalty: the faces creep slightly before they stick. Use it
with detect_interfaces().
Parameters
| Name | Type | Description |
|---|---|---|
| mu | float | The friction coefficient (dimensionless): the most shear the faces carry is mu times the contact pressure. |
| tol | float | A contact tolerance, a length (mm for mm models); kept with the property, not used by the solver plugin. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
muread-only
The friction coefficient (dimensionless).
namestr
The object’s name.
normalread-only
The behaviour across the faces: "HARD" or "Linear".
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tangentread-only
The behaviour along the faces: None, a friction coefficient or "ROUGH".
tolread-only
The contact tolerance, a length.
uidUUID | Noneread-only
The object’s unique id, a UUID.
HardContactNoFriction
Section titled “HardContactNoFriction”HardContactNoFriction(tol, **kwargs)
Frictionless contact: the faces push on each other when pressed together, part freely, and slide freely.
Use it with detect_interfaces(). It carries
compression only, and nothing along the faces.
Parameters
| Name | Type | Description |
|---|---|---|
| tol | float | A contact tolerance, a length (mm for mm models); kept with the property, not used by the solver plugin. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
normalread-only
The behaviour across the faces: "HARD" or "Linear".
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tangentread-only
The behaviour along the faces: None, a friction coefficient or "ROUGH".
tolread-only
The contact tolerance, a length.
uidUUID | Noneread-only
The object’s unique id, a UUID.
HardContactRough
Section titled “HardContactRough”HardContactRough(**kwargs)
Contact with no slip: the faces push on each other when pressed together and never slide while touching.
Rough contact: friction without limit (the solver plugin writes a friction coefficient of 1e30). The faces can still part.
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
normalread-only
The behaviour across the faces: "HARD" or "Linear".
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tangentread-only
The behaviour along the faces: None, a friction coefficient or "ROUGH".
uidUUID | Noneread-only
The object’s unique id, a UUID.
InteractionBase
Section titled “InteractionBase”InteractionBase(**kwargs)
What happens between two surfaces, or between a surface and the exterior: contact, convection, radiation.
An interaction is a behaviour: an interface (PartPartInterface,
BoundaryInterface) says where it acts. Abstract: use a
subclass.
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
LinearContactFrictionPenalty
Section titled “LinearContactFrictionPenalty”LinearContactFrictionPenalty(stiffness, mu, tolerance, **kwargs)
Contact with friction whose pressure grows linearly with how far the faces overlap, at a stiffness you give.
The contact pressure is stiffness times the overlap; friction is a
penalty, as in HardContactFrictionPenalty.
Parameters
| Name | Type | Description |
|---|---|---|
| stiffness | float | The slope of contact pressure against overlap, pressure per length (N/mm3 for N and mm). |
| mu | float | The friction coefficient (dimensionless). |
| tolerance | float | A contact tolerance, a length (mm for mm models); kept with the property, not used by the solver plugin. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
normalread-only
The behaviour across the faces: "HARD" or "Linear".
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
stiffness
The slope of contact pressure against overlap, pressure per length.
tangentread-only
The behaviour along the faces: None, a friction coefficient or "ROUGH".
tolerance
The contact tolerance, a length.
uidUUID | Noneread-only
The object’s unique id, a UUID.
Radiation
Section titled “Radiation”Radiation(eps, temperature_value, temperature_amplitude, **kwargs)
Radiation from a surface to its surroundings: a heat flux eps sigma (T^4 - T_sink^4) per unit area.
sigma is the Stefan-Boltzmann constant of the model’s unit system,
and temperatures count from its absolute zero (Kelvin by default).
Parameters
| Name | Type | Description |
|---|---|---|
| eps | float | The surface’s emissivity (dimensionless, 0 to 1). |
| temperature_value | float | The surroundings’ (sink) temperature, in the model’s temperature unit. |
| temperature_amplitude | Amplitude or None |
How the sink temperature varies in time: None keeps it constant. |
Properties
epsread-only
The surface’s emissivity (dimensionless).
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
temperatureread-only
The sink temperature, a ScalarLoad with its amplitude.
uidUUID | Noneread-only
The object’s unique id, a UUID.
ThermalInteraction
Section titled “ThermalInteraction”ThermalInteraction(temperature_value, temperature_amplitude=None, **kwargs)
Heat exchanged between a surface and its surroundings, at a given surrounding (sink) temperature.
Abstract: use Convection or Radiation, on a surface
given by a BoundaryInterface.
Parameters
| Name | Type | Description |
|---|---|---|
| temperature_value | float | The surrounding (sink) temperature, in the model’s temperature unit. |
| temperature_amplitude | Amplitude, optional |
How the sink temperature varies in time: None keeps it constant. |
Attributes
| Name | Type | Description |
|---|---|---|
| temperature | ScalarLoad |
The sink temperature with its amplitude. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
modelread-only
The model the interaction is registered to, or None.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
temperatureread-only
The sink temperature, a ScalarLoad with its amplitude.
uidUUID | Noneread-only
The object’s unique id, a UUID.
© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them