补充test_mql质量端止动原语
This commit is contained in:
1 parent
a63fda313b
commit
f6dda509a2
5 files changed
+142
No files matched your search
@@ -4,6 +4,7 @@ from dataclasses import dataclass
|
||||
|
||||
from PythonModels.components.amesim_mechanical import (
|
||||
AmesimElasticEndstop,
|
||||
AmesimMassFrictionEndstops,
|
||||
AmesimPistonGeometry,
|
||||
circular_area,
|
||||
mm_to_m,
|
||||
@@ -52,9 +53,33 @@ class TestMqlMassEndstopSpec:
|
||||
max_damping_n_per_m_per_s: float
|
||||
min_penetration_m: float
|
||||
max_penetration_m: float
|
||||
stiction_force_n: float
|
||||
coulomb_friction_n: float
|
||||
viscous_friction_n_per_m_per_s: float
|
||||
windage_n_per_m2_per_s2: float
|
||||
stick_velocity_threshold_m_s: float
|
||||
reset_velocity_threshold_m_s: float
|
||||
rest_coeff: float
|
||||
stribeck_constant_m_s: float
|
||||
use_friction: bool
|
||||
stop_type: int
|
||||
data_paths: tuple[str, ...]
|
||||
|
||||
def endstop(self) -> AmesimMassFrictionEndstops:
|
||||
return AmesimMassFrictionEndstops(
|
||||
mass_kg=self.mass_kg,
|
||||
lower_limit_m=self.xmin_m,
|
||||
upper_limit_m=self.xmax_m,
|
||||
lower_stiffness_n_per_m=self.min_stiffness_n_per_m,
|
||||
upper_stiffness_n_per_m=self.max_stiffness_n_per_m,
|
||||
lower_damping_n_per_m_per_s=self.min_damping_n_per_m_per_s,
|
||||
upper_damping_n_per_m_per_s=self.max_damping_n_per_m_per_s,
|
||||
viscous_friction_n_per_m_per_s=self.viscous_friction_n_per_m_per_s,
|
||||
coulomb_friction_n=self.coulomb_friction_n,
|
||||
stiction_force_n=self.stiction_force_n,
|
||||
windage_n_per_m2_per_s2=self.windage_n_per_m2_per_s2,
|
||||
)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TestMqlElasticEndstopSpec:
|
||||
@@ -189,7 +214,16 @@ def _build_mass(
|
||||
max_damping_n_per_m_per_s=n_per_mm_per_s_to_n_per_m_per_s(component.parameter_value("Dbmax")),
|
||||
min_penetration_m=mm_to_m(component.parameter_value("Pdmin")),
|
||||
max_penetration_m=mm_to_m(component.parameter_value("Pdmax")),
|
||||
stiction_force_n=component.parameter_value("fstick"),
|
||||
coulomb_friction_n=component.parameter_value("fcoul"),
|
||||
viscous_friction_n_per_m_per_s=component.parameter_value("rvisc"),
|
||||
windage_n_per_m2_per_s2=component.parameter_value("wind"),
|
||||
stick_velocity_threshold_m_s=component.parameter_value("dvel"),
|
||||
reset_velocity_threshold_m_s=component.parameter_value("restdvel"),
|
||||
rest_coeff=component.parameter_value("restcoeff"),
|
||||
stribeck_constant_m_s=component.parameter_value("astrib"),
|
||||
use_friction=bool(int(component.parameter_value("useFriction"))),
|
||||
stop_type=int(component.parameter_value("stoptype")),
|
||||
data_paths=_data_paths(variable_catalog, component.alias),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user