ContactSimulationModel
类型: 类
领域: 仿真交接
推荐导入: from cadflow import ContactSimulationModel
签名
class ContactSimulationModel(assembly_id: 'str', surfaces: 'tuple[SurfaceRegion, ...]' = (), contact_laws: 'tuple[SurfaceContactLaw, ...]' = (), contact_pairs: 'tuple[SurfaceContactPair, ...]' = (), surface_properties: 'tuple[SurfaceProperty, ...]' = (), materials: 'tuple[MechanicalMaterial, ...]' = (), component_materials: 'dict[str, str]' = <factory>, length_unit: 'str' = 'mm', force_unit: 'str' = 'N', time_unit: 'str' = 's', temperature_unit: 'str' = 'K', metadata: 'dict[str, Any]' = <factory>) -> None
功能说明
保存求解器无关的表面接触、材料与分配声明。
原始 API 说明
ContactSimulationModel(assembly_id: 'str', surfaces: 'tuple[SurfaceRegion, ...]' = (), contact_laws: 'tuple[SurfaceContactLaw, ...]' = (), contact_pairs: 'tuple[SurfaceContactPair, ...]' = (), surface_properties: 'tuple[SurfaceProperty, ...]' = (), materials: 'tuple[MechanicalMaterial, ...]' = (), component_materials: 'dict[str, str]' = <factory>, length_unit: 'str' = 'mm', force_unit: 'str' = 'N', time_unit: 'str' = 's', temperature_unit: 'str' = 'K', metadata: 'dict[str, Any]' = <factory>)
其他公共导入路径
from cadflow.simulation import ContactSimulationModel
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
assembly_id | 'str' | 是 | - | 源码 Docstring 未单独说明。 |
surfaces | 'tuple[SurfaceRegion, ...]' | 否 | () | 源码 Docstring 未单独说明。 |
contact_laws | 'tuple[SurfaceContactLaw, ...]' | 否 | () | 源码 Docstring 未单独说明。 |
contact_pairs | 'tuple[SurfaceContactPair, ...]' | 否 | () | 源码 Docstring 未单独说明。 |
surface_properties | 'tuple[SurfaceProperty, ...]' | 否 | () | 源码 Docstring 未单独说明。 |
materials | 'tuple[MechanicalMaterial, ...]' | 否 | () | 源码 Docstring 未单独说明。 |
component_materials | 'dict[str, str]' | 否 | <factory> | 源码 Docstring 未单独说明。 |
length_unit | 'str' | 否 | 'mm' | 源码 Docstring 未单独说明。 |
force_unit | 'str' | 否 | 'N' | 源码 Docstring 未单独说明。 |
time_unit | 'str' | 否 | 's' | 源码 Docstring 未单独说明。 |
temperature_unit | 'str' | 否 | 'K' | 源码 Docstring 未单独说明。 |
metadata | 'dict[str, Any]' | 否 | <factory> | 源码 Docstring 未单独说明。 |
返回值
类型: None
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
数据字段
| 名称 | 类型 | 默认值 |
|---|---|---|
assembly_id | 'str' | required |
surfaces | 'tuple[SurfaceRegion, ...]' | () |
contact_laws | 'tuple[SurfaceContactLaw, ...]' | () |
contact_pairs | 'tuple[SurfaceContactPair, ...]' | () |
surface_properties | 'tuple[SurfaceProperty, ...]' | () |
materials | 'tuple[MechanicalMaterial, ...]' | () |
component_materials | 'dict[str, str]' | factory |
length_unit | 'str' | 'mm' |
force_unit | 'str' | 'N' |
time_unit | 'str' | 's' |
temperature_unit | 'str' | 'K' |
metadata | 'dict[str, Any]' | factory |
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
assign_material | method | (self, component_id: 'str', material_id: 'str') -> "'ContactSimulationModel'" | 见成员签名。 |
from_dict | class method | (cls, value: 'Mapping[str, Any]') -> "'ContactSimulationModel'" | 见成员签名。 |
from_json | class method | (cls, value: 'str') -> "'ContactSimulationModel'" | 见成员签名。 |
SCHEMA_VERSION | constant | - | str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
to_dict | method | (self) -> 'dict[str, Any]' | 见成员签名。 |
to_json | method | (self, *, indent: 'int | None' = 2) -> 'str' | 见成员签名。 |
with_contact_law | method | (self, value: 'SurfaceContactLaw') -> "'ContactSimulationModel'" | 见成员签名。 |
with_contact_pair | method | (self, value: 'SurfaceContactPair') -> "'ContactSimulationModel'" | 见成员签名。 |
with_material | method | (self, value: 'MechanicalMaterial') -> "'ContactSimulationModel'" | 见成员签名。 |
with_surface | method | (self, value: 'SurfaceRegion') -> "'ContactSimulationModel'" | 见成员签名。 |
with_surface_property | method | (self, value: 'SurfaceProperty') -> "'ContactSimulationModel'" | 见成员签名。 |
行为与约束
- 实例是不可变 dataclass 值;更新式工作流会返回替代值。
导入检查
from cadflow import ContactSimulationModel