校验test_mql机械观测量
This commit is contained in:
1 parent
6f34ac16bf
commit
a63fda313b
3 files changed
+57
-3
No files matched your search
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
|
||||
from PythonModels.components.amesim_mechanical import (
|
||||
AmesimElasticEndstop,
|
||||
AmesimPistonGeometry,
|
||||
circular_area,
|
||||
mm_to_m,
|
||||
@@ -31,6 +32,13 @@ class TestMqlPistonSpec:
|
||||
annulus_area_m2: float
|
||||
data_paths: tuple[str, ...]
|
||||
|
||||
def geometry(self) -> AmesimPistonGeometry:
|
||||
return AmesimPistonGeometry(
|
||||
piston_diameter_m=self.piston_diameter_m,
|
||||
rod_diameter_m=self.rod_diameter_m,
|
||||
zero_length_m=self.zero_displacement_m,
|
||||
)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TestMqlMassEndstopSpec:
|
||||
@@ -58,6 +66,13 @@ class TestMqlElasticEndstopSpec:
|
||||
wire_diameter_m: float
|
||||
data_paths: tuple[str, ...]
|
||||
|
||||
def endstop(self) -> AmesimElasticEndstop:
|
||||
return AmesimElasticEndstop(
|
||||
contact_stiffness_n_per_m=self.contact_stiffness_n_per_m,
|
||||
contact_damping_n_per_m_per_s=self.contact_damping_n_per_m_per_s,
|
||||
gap0_m=self.gap_m,
|
||||
)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TestMqlMechanicalNodeSpec:
|
||||
|
||||
Reference in new issue
Block a user