dragonfly_doe2.properties.model module¶
Model DOE-2 Properties.
- class dragonfly_doe2.properties.model.ModelDoe2Properties(host)[source]¶
Bases:
object
DOE-2 Properties for Dragonfly Model.
- Parameters:
host – A dragonfly_core Model object that hosts these properties.
- Properties:
host
- apply_properties_from_dict(data)[source]¶
Apply the DOE-2 properties of a dictionary to the host Model of this object.
- Parameters:
data – A dictionary representation of an entire dragonfly-core Model. Note that this dictionary must have ModelDoe2Properties in order for this method to successfully apply the DOE-2 properties.
- check_all(raise_exception=True, detailed=False)[source]¶
Check all of the aspects of the Model DOE-2 properties.
- Parameters:
raise_exception – Boolean to note whether a ValueError should be raised if any errors are found. If False, this method will simply return a text string with all errors that were found.
detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).
- Returns:
A text string with all errors that were found or a list if detailed is True. This string (or list) will be empty if no errors were found.
- check_for_extension(raise_exception=True, detailed=False)[source]¶
Check that the Model is valid for DOE-2 simulation.
This process includes all relevant dragonfly-core checks as well as checks that apply only for DOE-2.
- Parameters:
raise_exception – Boolean to note whether a ValueError should be raised if any errors are found. If False, this method will simply return a text string with all errors that were found. (Default: True).
detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).
- Returns:
A text string with all errors that were found or a list if detailed is True. This string (or list) will be empty if no errors were found.
- check_no_room_2d_floor_plate_holes(raise_exception=True, detailed=False)[source]¶
Check whether any Room2D floor geometry has holes.
EQuest currently has no way to represent such rooms so, if the issue is not addressed, the hole will simply be removed as part of the process of exporting to an INP file.
- Parameters:
raise_exception – If True, a ValueError will be raised if the Room2D floor plate has one or more holes. (Default: True).
detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).
- Returns:
A string with the message or a list with a dictionary if detailed is True.
- check_no_story_courtyards(tolerance=None, raise_exception=True, detailed=False)[source]¶
Check that Story floor plates do not contain courtyards.
EQuest currently has no way to represent such courtyards so, if the issue is not addressed, the courtyards will simply be removed as part of the process of exporting to an INP file.
- Parameters:
tolerance – The tolerance to be used when joining the Room2D floor plates together into a Story floor plate. If None, the Model tolerance will be used. (Default: None).
raise_exception – Boolean to note whether a ValueError should be raised if the story contains a courtyard. (Default: True).
detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).
- Returns:
A string with the message or a list with a dictionary if detailed is True.
- check_room_2d_floor_plate_vertex_count(raise_exception=True, detailed=False)[source]¶
Check whether any Room2Ds floor geometry exceeds the maximum vertex count.
The DOE-2 engine currently does not support such rooms and limits the total number of vertices to 120.
- Parameters:
raise_exception – If True, a ValueError will be raised if the Room2D floor plate exceeds the maximum number of vertices supported by DOE-2. (Default: True).
detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).
- Returns:
A string with the message or a list with a dictionary if detailed is True.
- property host¶
Get the Model object hosting these properties.