Skip to content

Solid mechanics constraints¤

Boundary conditions¤

phydrax.constraints.ContinuousTractionBoundaryConstraint(displacement_var: str, component: DomainComponent, /, *, lambda_: DomainFunction | ArrayLike, mu: DomainFunction | ArrayLike, traction: DomainFunction | ArrayLike | None = None, var: str = 'x', mode: Literal[reverse, forward] = 'reverse', num_points: int | tuple[Any, ...], structure: Any, sampler: str = 'latin_hypercube', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, reduction: Literal[mean, integral] = 'mean') -> FunctionalConstraint ¤

Prescribed traction (Neumann) boundary condition.

Enforces \(\sigma(u)\,n = t\) on the boundary component, where \(n\) is the outward normal and \(t\) is the prescribed traction (default \(0\)).

Arguments:

  • displacement_var: Name of the displacement field.
  • component: Boundary component.
  • lambda_, mu: Lamé parameters.
  • traction: Target traction \(t\) (defaults to 0).
  • var: Geometry variable used to compute normals.
  • mode: Differentiation mode ("reverse" or "forward").
  • num_points: Number of boundary samples.
  • structure: Sampling structure over labels.
  • sampler: Sampling method.
  • weight: Scalar weight.
  • label: Optional label for logging.
  • over: Optional reduction axes.
  • reduction: "mean" or "integral".

Returns:

  • A FunctionalConstraint enforcing the traction condition.

phydrax.constraints.ContinuousNormalDisplacementBoundaryConstraint(displacement_var: str, component: DomainComponent, /, *, normal_displacement: DomainFunction | ArrayLike | None = None, var: str = 'x', num_points: int | tuple[Any, ...], structure: Any, sampler: str = 'latin_hypercube', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, reduction: Literal[mean, integral] = 'mean') -> FunctionalConstraint ¤

Prescribed normal displacement boundary condition.

Enforces \(u\cdot n = u_n\) on the boundary component (default \(u_n=0\)).


phydrax.constraints.ContinuousElasticFoundationBoundaryConstraint(displacement_var: str, component: DomainComponent, /, *, lambda_: DomainFunction | ArrayLike, mu: DomainFunction | ArrayLike, stiffness: DomainFunction | ArrayLike, foundation_displacement: DomainFunction | ArrayLike | None = None, var: str = 'x', mode: Literal[reverse, forward] = 'reverse', num_points: int | tuple[Any, ...], structure: Any, sampler: str = 'latin_hypercube', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, reduction: Literal[mean, integral] = 'mean') -> FunctionalConstraint ¤

Elastic foundation boundary condition.

Enforces a spring-like relation between traction and displacement:

\[ \sigma(u)\,n + k\,(u-u_0) = 0, \]

where stiffness is the foundation stiffness \(k\) and foundation_displacement is \(u_0\) (default \(0\)).


phydrax.constraints.ContinuousElasticSymmetryBoundaryConstraint(displacement_var: str, component: DomainComponent, /, *, lambda_: DomainFunction | ArrayLike, mu: DomainFunction | ArrayLike, var: str = 'x', mode: Literal[reverse, forward] = 'reverse', num_points: int | tuple[Any, ...], structure: Any, sampler: str = 'latin_hypercube', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, reduction: Literal[mean, integral] = 'mean') -> FunctionalConstraint ¤

Elastic symmetry boundary condition.

Enforces symmetry by combining: - zero normal displacement: \(u\cdot n = 0\), - zero tangential traction: \((I-n\otimes n)\,\sigma(u)\,n = 0\).


phydrax.constraints.DiscreteDisplacementBoundaryConstraint(displacement_var: str, component: DomainComponent, /, *, points: Mapping[str, ArrayLike] | ArrayLike, displacement_values: ArrayLike, weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, reduction: Literal[mean, sum] = 'mean') -> PointSetConstraint ¤

Discrete displacement (Dirichlet) constraint at explicit anchor points.


phydrax.constraints.DiscreteTractionBoundaryConstraint(displacement_var: str, component: DomainComponent, /, *, points: Mapping[str, ArrayLike] | ArrayLike, values: ArrayLike, lambda_: DomainFunction | ArrayLike, mu: DomainFunction | ArrayLike, var: str = 'x', mode: Literal[reverse, forward] = 'reverse', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, reduction: Literal[mean, sum] = 'mean') -> PointSetConstraint ¤

Discrete traction (Neumann) constraint at explicit anchor points.


phydrax.constraints.DiscreteNormalDisplacementBoundaryConstraint(displacement_var: str, component: DomainComponent, /, *, points: Mapping[str, ArrayLike] | ArrayLike, values: ArrayLike, var: str = 'x', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, reduction: Literal[mean, sum] = 'mean') -> PointSetConstraint ¤

Discrete normal displacement constraint at explicit anchor points.

Integral / global constraints¤

phydrax.constraints.SolidTotalReactionBoundaryConstraint(displacement_var: str, domain, /, *, lambda_: ArrayLike, mu: ArrayLike, target_reaction: ArrayLike, var: str = 'x', num_points: NumPoints | tuple[Any, ...], structure: ProductStructure | None = None, sampler: str = 'latin_hypercube', weight: ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, where: Mapping[str, Callable] | None = None, where_all: DomainFunction | None = None) -> IntegralEqualityConstraint ¤

Boundary integral constraint for total reaction force.

For Cauchy stress \(\sigma(u)\) and outward normal \(n\), the traction is \(t=\sigma n\). This enforces a net reaction force condition

\[ \int_{\partial\Omega} \sigma(u)\,n\,dS = F_{\text{target}}. \]