Constitutive Behavior#
The constitutive layer describes what a material does, independently of the
structural model that uses it. A structural model holds a
MaterialBehaviorMap binding physics channels to behaviors.
Protocols#
- class sgio.model.Model(*args, **kwargs)#
Protocol shared by legacy model-like objects.
- get(name: str)#
Get model parameter (property) given a name.
- class sgio.model.ConstitutiveBehaviorProtocol(*args, **kwargs)#
Protocol for stateless or stateful constitutive behaviors.
- export_payload() Any#
Return the payload currently backing this behavior.
- property descriptor: ConstitutiveBehaviorDescriptor#
Return the static behavior descriptor.
- class sgio.model.HistoryDependentBehaviorProtocol(*args, **kwargs)#
Protocol for future history-dependent constitutive behaviors.
- describe_consistent_tangent() str#
Describe the tangent quantity exposed by the behavior.
- describe_update_rule() str#
Describe the update law boundary used by the behavior.
- initialize_history_state() dict[str, Any]#
Return one initialized history-state payload.
Behaviors and Descriptors#
- class sgio.model.LinearElasticConstitutiveBehavior(payload: LinearElasticBehavior)#
Bases:
objectAdapter exposing current linear elasticity through the generic behavior seam.
- Parameters:
payload (LinearElasticBehavior) – Linear-elastic payload snapshot.
- export_payload() LinearElasticBehavior#
Return the wrapped linear-elastic payload.
- property descriptor: ConstitutiveBehaviorDescriptor#
Return the linear-elastic behavior descriptor.
- class sgio.model.ConstitutiveBehaviorDescriptor(name: str, channels: tuple[PhysicsChannel, ...], is_stateful: bool, inputs: tuple[BehaviorVariable, ...] = (), outputs: tuple[BehaviorVariable, ...] = (), tangent_outputs: tuple[BehaviorVariable, ...] = (), state_variables: tuple[BehaviorVariable, ...] = (), notes: str = '')#
Static descriptor of one constitutive behavior family.
- Parameters:
name (str) – Behavior family name.
channels (tuple[PhysicsChannel, ...]) – Physics channels covered by the behavior.
is_stateful (bool) – Whether the behavior carries history variables.
inputs (tuple[BehaviorVariable, ...], optional) – Input variables.
outputs (tuple[BehaviorVariable, ...], optional) – Output variables.
tangent_outputs (tuple[BehaviorVariable, ...], optional) – Tangent outputs or linearization products.
state_variables (tuple[BehaviorVariable, ...], optional) – History variables used by the behavior.
notes (str, optional) – Additional notes about the behavior boundary.
- class sgio.model.MaterialBehaviorMap(mechanical: ~sgio.model.constitutive.ChannelBehaviorSlot = <factory>, thermal: ~sgio.model.constitutive.ChannelBehaviorSlot = <factory>, electrical: ~sgio.model.constitutive.ChannelBehaviorSlot = <factory>, magnetic: ~sgio.model.constitutive.ChannelBehaviorSlot = <factory>, optical: ~sgio.model.constitutive.ChannelBehaviorSlot = <factory>, couplings: tuple[~sgio.model.constitutive.ChannelCouplingDescriptor, ...] = ())#
Container reserving per-channel constitutive behavior slots.
- Parameters:
mechanical (ChannelBehaviorSlot) – Per-channel slots.
thermal (ChannelBehaviorSlot) – Per-channel slots.
electrical (ChannelBehaviorSlot) – Per-channel slots.
magnetic (ChannelBehaviorSlot) – Per-channel slots.
optical (ChannelBehaviorSlot) – Per-channel slots.
couplings (tuple[ChannelCouplingDescriptor, ...], optional) – Cross-channel couplings carried alongside the slots.
- get_slot(channel: PhysicsChannel) ChannelBehaviorSlot#
Return one channel slot by enum key.
- class sgio.model.BehaviorVariable(name: str, channel: PhysicsChannel, role: BehaviorVariableRole, description: str = '')#
One named constitutive variable used by a behavior descriptor.
- Parameters:
name (str) – Variable name.
channel (PhysicsChannel) – Owning physics channel.
role (BehaviorVariableRole) – Variable role.
description (str, optional) – Human-readable description.
- class sgio.model.ChannelBehaviorSlot(channel: PhysicsChannel, behavior: ConstitutiveBehaviorProtocol | None = None, properties: Any | None = None)#
One extensibility slot for a single physics channel.
- Parameters:
channel (PhysicsChannel) – Slot channel.
behavior (ConstitutiveBehaviorProtocol or None, optional) – Attached behavior implementation.
properties (object or None, optional) – Auxiliary channel properties not yet promoted to full behaviors.
- class sgio.model.ChannelCouplingDescriptor(source: PhysicsChannel, target: PhysicsChannel, description: str = '')#
Descriptor for one cross-channel coupling relation.
- Parameters:
source (PhysicsChannel) – Driving channel.
target (PhysicsChannel) – Driven channel.
description (str, optional) – Human-readable description of the coupling.
- class sgio.model.TensorComponent(row: int, column: int)#
Typed material tensor/matrix component selector.
- Parameters:
row (int) – One-based row index or tensor index.
column (int) – One-based column index or tensor index.
- to_matrix_indices() tuple[int, int]#
Return zero-based matrix indices.
- to_voigt_index() int#
Return the zero-based Voigt index for thermal-expansion access.
Enumerations#
- class sgio.model.PhysicsChannel(value)#
Supported constitutive physics channels.
- ELECTRICAL = 'electrical'#
- MAGNETIC = 'magnetic'#
- MECHANICAL = 'mechanical'#
- OPTICAL = 'optical'#
- THERMAL = 'thermal'#
- class sgio.model.BehaviorVariableRole(value)#
Role of one constitutive variable within a behavior descriptor.
- INPUT = 'input'#
- OUTPUT = 'output'#
- STATE = 'state'#
- TANGENT = 'tangent'#
- class sgio.model.ElasticInputType(value)#
Typed elastic-input selector for material APIs.
- classmethod from_value(input_type: ElasticInputType | str | int) ElasticInputType#
Normalize legacy elastic input tokens into one enum value.
- Parameters:
input_type (ElasticInputType or str or int) – Legacy or typed elastic input selector.
- Returns:
Normalized enum value.
- Return type:
- ANISOTROPIC = 'anisotropic'#
- AUTO = ''#
- COMPLIANCE = 'compliance'#
- ENGINEERING = 'engineering'#
- ISOTROPIC = 'isotropic'#
- LAMINA = 'lamina'#
- ORTHOTROPIC = 'orthotropic'#
- STIFFNESS = 'stiffness'#
- TRANSVERSE_ISOTROPIC = 'transverse_isotropic'#
- class sgio.model.MatrixKind(value)#
Typed selector for material matrix views.
- COMPLIANCE = 'compliance'#
- STIFFNESS = 'stiffness'#
- class sgio.model.SectionMatrixKind(value)#
Typed selector for beam/shell section-result matrices.
- CLASSICAL_COMPLIANCE = 'classical_compliance'#
- CLASSICAL_STIFFNESS = 'classical_stiffness'#
- COMPLIANCE = 'compliance'#
- GEOMETRIC_STIFFNESS = 'geometric_stiffness'#
- MASS = 'mass'#
- MASS_CENTER = 'mass_center'#
- STIFFNESS = 'stiffness'#
- class sgio.model.SectionAxis(value)#
Typed selector for section-result principal axes.
- BENDING = 'bending'#
- INERTIAL = 'inertial'#
- SHEAR = 'shear'#
Helper Functions#
- sgio.model.getModelDim(model: str) int#
Infer structural-model dimension from a legacy model label.