pymead.core.param.AngleDesVar#

class AngleDesVar(value: float, name: str, lower: float | None = None, upper: float | None = None, setting_from_geo_col: bool = False, point=None, root=None, rotation_handle=None, enabled: bool = True, equation_str: str | None = None)[source]#

Bases: AngleParam

Design variable class for angle values; subclasses the base-level Param. Adds lower and upper bound default behavior.

__init__(value: float, name: str, lower: float | None = None, upper: float | None = None, setting_from_geo_col: bool = False, point=None, root=None, rotation_handle=None, enabled: bool = True, equation_str: str | None = None)[source]#
Parameters:
  • value (float) – Starting value of the design variable

  • name (str) – Name of the design variable

  • lower (float or None) – Lower bound for the design variable. If None, a reasonable value is chosen. Default: None.

  • upper (float or None) – Upper bound for the design variable. If None, a reasonable value is chosen. Default: None.

  • setting_from_geo_col (bool) – Whether this method is being called directly from the geometric collection. Default: False.

Methods

get_dict_rep()

Gets a dictionary representation of the pymead object.

set_value(value[, bounds_normalized, force, ...])

In this special case of set_value for an AngleDesVar, we skip over the call to the set_value method in AngleParam and directly call the set_value method in Param (the grandparent class).

Attributes

get_dict_rep()[source]#

Gets a dictionary representation of the pymead object. In general, this dictionary should consist of only the required arguments for object instantiation. For example, the dictionary representation of a point looks something like this: {"x": 0.3, "y": 0.5}. If the argument requires a reference to a PymeadObj rather than a string or float value, the name() method should be the value that is stored. For an example, see the overridden value of this method in pymead.core.airfoil.Airfoil. All subclasses of PymeadObj must implement this method, since it is the way pymead objects are stored in saved instances of a GeometryCollection (.jmea files).

set_value(value: float, bounds_normalized: bool = False, force: bool = False, param_graph_update: bool = False, from_request_move: bool = False)[source]#

In this special case of set_value for an AngleDesVar, we skip over the call to the set_value method in AngleParam and directly call the set_value method in Param (the grandparent class). The reason for this is that AngleParam always keeps the angle between 0 and \(2 \pi\), which is not logical behavior for a bounded variable. This method eliminates that restriction.