Body
- class Body
Bases:
CommonBaseModel
Represents the parameters of a body.
- qty_cross_sections
Number of cross-sections.
- Type:
Optional[int]
- stations
Axial stations.
- Type:
List[Optional[float]]
- cross_sectional_areas
Cross-sectional areas at stations.
- Type:
List[Optional[float]]
- cross_sectional_perimeters
Perimeters at stations.
- Type:
List[Optional[float]]
- max_halfbredth
Maximum Halfbredth at stations.
- Type:
List[Optional[float]]
- crown_line
Crown line height at stations.
- Type:
List[Optional[float]]
- keel_line
Keel Line height at stations.
- Type:
List[Optional[float]]
- nose_length
Nose length.
- Type:
Optional[float]
- aftbody_length
Afterbody length.
- Type:
Optional[float]
- nose_bluntness
Diameter of nose bluntness.
- Type:
Optional[float]
- area_rule
Area Ruling: 1 - Straight Wing, None, 2 - Swept Wing, None, 3 - area ruled.
- Type:
Optional[int]
Attributes Summary
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Methods Summary
validate_list_length
(values)Validate that the length of lists matches the number of cross-sections.
Validate that all values in the list are non-negative.
Attributes Documentation
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'protected_namespaces': (), 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Methods Documentation
- classmethod validate_list_length(values)
Validate that the length of lists matches the number of cross-sections.
- Parameters:
values (dict) – The current values of the model.
- Returns:
The validated values.
- Return type:
dict
- Raises:
ValueError – If the length of any list doesn’t match the number of cross-sections.
- classmethod validate_non_negative(v)
Validate that all values in the list are non-negative.
- Parameters:
v (List[Optional[float]]) – The list of values to validate.
- Returns:
The validated list of values.
- Return type:
List[Optional[float]]
- Raises:
ValueError – If any value in the list is negative.
Methods:
Validate that all values in the list are non-negative.
validate_list_length
(values)Validate that the length of lists matches the number of cross-sections.
Attributes:
__setattr__ handlers.
- classmethod validate_non_negative(v)
Validate that all values in the list are non-negative.
- Parameters:
v (List[Optional[float]]) – The list of values to validate.
- Returns:
The validated list of values.
- Return type:
List[Optional[float]]
- Raises:
ValueError – If any value in the list is negative.
- classmethod validate_list_length(values)
Validate that the length of lists matches the number of cross-sections.
- Parameters:
values (dict) – The current values of the model.
- Returns:
The validated values.
- Return type:
dict
- Raises:
ValueError – If the length of any list doesn’t match the number of cross-sections.
- __pydantic_setattr_handlers__: ClassVar[Dict[str, Callable[[BaseModel, str, Any], None]]] = {}
__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__