ansys-systemcoupling-core 0.7.0__py3-none-any.whl → 0.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ansys-systemcoupling-core might be problematic. Click here for more details.
- ansys/systemcoupling/core/__init__.py +2 -2
- ansys/systemcoupling/core/_version.py +1 -1
- ansys/systemcoupling/core/adaptor/api_25_1/instancing.py +2 -0
- ansys/systemcoupling/core/adaptor/api_25_1/instancing_child.py +62 -10
- ansys/systemcoupling/core/adaptor/api_25_1/mapping_control.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_1/setup_root.py +1 -1
- ansys/systemcoupling/core/adaptor/api_25_1/update_participant.py +15 -15
- ansys/systemcoupling/core/adaptor/api_25_2/_add_participant.py +80 -0
- ansys/systemcoupling/core/adaptor/api_25_2/_clear_state.py +13 -0
- ansys/systemcoupling/core/adaptor/api_25_2/_solve.py +13 -0
- ansys/systemcoupling/core/adaptor/api_25_2/abort.py +39 -0
- ansys/systemcoupling/core/adaptor/api_25_2/activate_hidden.py +46 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_aerodamping_data_transfers.py +43 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_data_transfer.py +190 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_data_transfer_by_display_names.py +191 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_expression_function.py +61 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_flow_boundary_data_transfers.py +32 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_fsi_data_transfers.py +43 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_interface.py +77 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_interface_by_display_names.py +78 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_named_expression.py +42 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_ordered_data_transfers.py +32 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_participant.py +162 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_reference_frame.py +40 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_thermal_data_transfers.py +43 -0
- ansys/systemcoupling/core/adaptor/api_25_2/add_transformation.py +102 -0
- ansys/systemcoupling/core/adaptor/api_25_2/analysis_control.py +303 -0
- ansys/systemcoupling/core/adaptor/api_25_2/apip.py +33 -0
- ansys/systemcoupling/core/adaptor/api_25_2/ascii_output.py +44 -0
- ansys/systemcoupling/core/adaptor/api_25_2/attribute.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/attribute_child.py +64 -0
- ansys/systemcoupling/core/adaptor/api_25_2/automatic_alignment_options.py +46 -0
- ansys/systemcoupling/core/adaptor/api_25_2/available_ports.py +40 -0
- ansys/systemcoupling/core/adaptor/api_25_2/avoid_data_reconstruction.py +56 -0
- ansys/systemcoupling/core/adaptor/api_25_2/case_root.py +62 -0
- ansys/systemcoupling/core/adaptor/api_25_2/clear_state.py +18 -0
- ansys/systemcoupling/core/adaptor/api_25_2/connect_ensight_dvs.py +41 -0
- ansys/systemcoupling/core/adaptor/api_25_2/coupling_interface.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/coupling_interface_child.py +42 -0
- ansys/systemcoupling/core/adaptor/api_25_2/coupling_participant.py +23 -0
- ansys/systemcoupling/core/adaptor/api_25_2/coupling_participant_child.py +272 -0
- ansys/systemcoupling/core/adaptor/api_25_2/create_restart_point.py +29 -0
- ansys/systemcoupling/core/adaptor/api_25_2/data_transfer.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/data_transfer_child.py +187 -0
- ansys/systemcoupling/core/adaptor/api_25_2/delete_snapshot.py +28 -0
- ansys/systemcoupling/core/adaptor/api_25_2/delete_transformation.py +42 -0
- ansys/systemcoupling/core/adaptor/api_25_2/dimensionality.py +96 -0
- ansys/systemcoupling/core/adaptor/api_25_2/execution_control.py +256 -0
- ansys/systemcoupling/core/adaptor/api_25_2/execution_control_1.py +24 -0
- ansys/systemcoupling/core/adaptor/api_25_2/expression.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/expression_child.py +36 -0
- ansys/systemcoupling/core/adaptor/api_25_2/expression_function.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/expression_function_child.py +46 -0
- ansys/systemcoupling/core/adaptor/api_25_2/external_data_file.py +24 -0
- ansys/systemcoupling/core/adaptor/api_25_2/fluent_input.py +77 -0
- ansys/systemcoupling/core/adaptor/api_25_2/fmu_parameter.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/fmu_parameter_child.py +164 -0
- ansys/systemcoupling/core/adaptor/api_25_2/generate_input_file.py +41 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_add_data_transfer_group_commands.py +29 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_execution_command.py +30 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_machines.py +13 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_mode_shape_variables.py +29 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_region_names_for_participant.py +31 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_setup_summary.py +25 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_status_messages.py +52 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_supported_participant_types.py +13 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_thermal_data_transfer_options.py +32 -0
- ansys/systemcoupling/core/adaptor/api_25_2/get_transformation.py +43 -0
- ansys/systemcoupling/core/adaptor/api_25_2/global_stabilization.py +155 -0
- ansys/systemcoupling/core/adaptor/api_25_2/has_input_file_changed.py +36 -0
- ansys/systemcoupling/core/adaptor/api_25_2/import_system_coupling_input_file.py +36 -0
- ansys/systemcoupling/core/adaptor/api_25_2/initialize.py +27 -0
- ansys/systemcoupling/core/adaptor/api_25_2/instancing.py +25 -0
- ansys/systemcoupling/core/adaptor/api_25_2/instancing_child.py +114 -0
- ansys/systemcoupling/core/adaptor/api_25_2/interrupt.py +39 -0
- ansys/systemcoupling/core/adaptor/api_25_2/library.py +37 -0
- ansys/systemcoupling/core/adaptor/api_25_2/live_visualization.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/live_visualization_child.py +100 -0
- ansys/systemcoupling/core/adaptor/api_25_2/map.py +19 -0
- ansys/systemcoupling/core/adaptor/api_25_2/mapping_control.py +249 -0
- ansys/systemcoupling/core/adaptor/api_25_2/open.py +102 -0
- ansys/systemcoupling/core/adaptor/api_25_2/open_results_in_ensight.py +56 -0
- ansys/systemcoupling/core/adaptor/api_25_2/open_snapshot.py +37 -0
- ansys/systemcoupling/core/adaptor/api_25_2/output_control.py +134 -0
- ansys/systemcoupling/core/adaptor/api_25_2/parameter.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/parameter_child.py +60 -0
- ansys/systemcoupling/core/adaptor/api_25_2/partition_participants.py +138 -0
- ansys/systemcoupling/core/adaptor/api_25_2/properties.py +36 -0
- ansys/systemcoupling/core/adaptor/api_25_2/record_interactions.py +46 -0
- ansys/systemcoupling/core/adaptor/api_25_2/reference_frame.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/reference_frame_child.py +71 -0
- ansys/systemcoupling/core/adaptor/api_25_2/region.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/region_child.py +71 -0
- ansys/systemcoupling/core/adaptor/api_25_2/reload_expression_function_modules.py +14 -0
- ansys/systemcoupling/core/adaptor/api_25_2/results.py +89 -0
- ansys/systemcoupling/core/adaptor/api_25_2/save.py +51 -0
- ansys/systemcoupling/core/adaptor/api_25_2/save_snapshot.py +54 -0
- ansys/systemcoupling/core/adaptor/api_25_2/setup_root.py +259 -0
- ansys/systemcoupling/core/adaptor/api_25_2/show_plot.py +75 -0
- ansys/systemcoupling/core/adaptor/api_25_2/shutdown.py +25 -0
- ansys/systemcoupling/core/adaptor/api_25_2/side.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/side_child.py +56 -0
- ansys/systemcoupling/core/adaptor/api_25_2/solution_control.py +117 -0
- ansys/systemcoupling/core/adaptor/api_25_2/solution_root.py +134 -0
- ansys/systemcoupling/core/adaptor/api_25_2/solve.py +30 -0
- ansys/systemcoupling/core/adaptor/api_25_2/stabilization.py +157 -0
- ansys/systemcoupling/core/adaptor/api_25_2/step.py +57 -0
- ansys/systemcoupling/core/adaptor/api_25_2/transformation.py +21 -0
- ansys/systemcoupling/core/adaptor/api_25_2/transformation_child.py +62 -0
- ansys/systemcoupling/core/adaptor/api_25_2/type.py +39 -0
- ansys/systemcoupling/core/adaptor/api_25_2/unmapped_value_options.py +158 -0
- ansys/systemcoupling/core/adaptor/api_25_2/update_control.py +43 -0
- ansys/systemcoupling/core/adaptor/api_25_2/update_interfaces.py +19 -0
- ansys/systemcoupling/core/adaptor/api_25_2/update_participant.py +61 -0
- ansys/systemcoupling/core/adaptor/api_25_2/variable.py +20 -0
- ansys/systemcoupling/core/adaptor/api_25_2/variable_child.py +231 -0
- ansys/systemcoupling/core/adaptor/api_25_2/write_csv_chart_files.py +21 -0
- ansys/systemcoupling/core/adaptor/api_25_2/write_ensight.py +46 -0
- ansys/systemcoupling/core/adaptor/api_25_2/write_target_data.py +32 -0
- ansys/systemcoupling/core/adaptor/impl/get_status_messages.py +1 -1
- ansys/systemcoupling/core/adaptor/impl/get_syc_version.py +1 -1
- ansys/systemcoupling/core/adaptor/impl/injected_commands.py +5 -4
- ansys/systemcoupling/core/adaptor/impl/root_source.py +1 -1
- ansys/systemcoupling/core/adaptor/impl/static_info.py +13 -6
- ansys/systemcoupling/core/adaptor/impl/syc_proxy.py +1 -1
- ansys/systemcoupling/core/adaptor/impl/syc_proxy_interface.py +1 -1
- ansys/systemcoupling/core/adaptor/impl/types.py +1 -1
- ansys/systemcoupling/core/charts/chart_datatypes.py +1 -1
- ansys/systemcoupling/core/charts/csv_chartdata.py +18 -4
- ansys/systemcoupling/core/charts/live_csv_datasource.py +1 -1
- ansys/systemcoupling/core/charts/message_dispatcher.py +1 -1
- ansys/systemcoupling/core/charts/plot_functions.py +1 -1
- ansys/systemcoupling/core/charts/plotdefinition_manager.py +1 -1
- ansys/systemcoupling/core/charts/plotter.py +1 -1
- ansys/systemcoupling/core/client/grpc_client.py +13 -4
- ansys/systemcoupling/core/client/services/command_query.py +4 -13
- ansys/systemcoupling/core/client/services/handle_rpc_error.py +64 -0
- ansys/systemcoupling/core/client/services/output_stream.py +1 -1
- ansys/systemcoupling/core/client/services/process.py +1 -1
- ansys/systemcoupling/core/client/services/solution.py +4 -13
- ansys/systemcoupling/core/client/syc_container.py +4 -1
- ansys/systemcoupling/core/client/syc_process.py +5 -1
- ansys/systemcoupling/core/client/variant.py +1 -1
- ansys/systemcoupling/core/examples/__init__.py +1 -1
- ansys/systemcoupling/core/examples/downloads.py +1 -1
- ansys/systemcoupling/core/native_api/__init__.py +1 -1
- ansys/systemcoupling/core/native_api/command_metadata.py +1 -1
- ansys/systemcoupling/core/native_api/datamodel_metadata.py +1 -1
- ansys/systemcoupling/core/native_api/meta_wrapper.py +1 -1
- ansys/systemcoupling/core/native_api/native_api.py +1 -1
- ansys/systemcoupling/core/native_api/object_path.py +1 -1
- ansys/systemcoupling/core/participant/manager.py +1 -1
- ansys/systemcoupling/core/participant/mapdl.py +1 -1
- ansys/systemcoupling/core/participant/protocol.py +1 -1
- ansys/systemcoupling/core/session.py +10 -3
- ansys/systemcoupling/core/syc_version.py +3 -3
- ansys/systemcoupling/core/util/file_transfer.py +22 -5
- ansys/systemcoupling/core/util/logging.py +1 -1
- ansys/systemcoupling/core/util/name_util.py +1 -1
- ansys/systemcoupling/core/util/pathstr.py +1 -1
- ansys/systemcoupling/core/util/state_keys.py +1 -1
- ansys/systemcoupling/core/util/yaml_helper.py +1 -1
- {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info}/METADATA +35 -21
- {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info}/RECORD +166 -53
- {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info}/WHEEL +1 -1
- {ansys_systemcoupling_core-0.7.0.dist-info → ansys_systemcoupling_core-0.9.0.dist-info/licenses}/LICENSE +7 -7
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This is an auto-generated file. DO NOT EDIT!
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
from ansys.systemcoupling.core.adaptor.impl.types import *
|
|
6
|
+
|
|
7
|
+
from .attribute import attribute
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class variable_child(Container):
|
|
11
|
+
"""
|
|
12
|
+
Configure a variable for the coupling participant.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
syc_name = "child_object_type"
|
|
16
|
+
|
|
17
|
+
child_names = ["attribute"]
|
|
18
|
+
|
|
19
|
+
attribute: attribute = attribute
|
|
20
|
+
"""
|
|
21
|
+
attribute child of variable_child.
|
|
22
|
+
"""
|
|
23
|
+
property_names_types = [
|
|
24
|
+
("quantity_type", "QuantityType", "str"),
|
|
25
|
+
("location", "Location", "str"),
|
|
26
|
+
("participant_display_name", "ParticipantDisplayName", "str"),
|
|
27
|
+
("display_name", "DisplayName", "str"),
|
|
28
|
+
("data_type", "DataType", "str"),
|
|
29
|
+
("real_initial_value", "RealInitialValue", "RealType"),
|
|
30
|
+
("integer_initial_value", "IntegerInitialValue", "int"),
|
|
31
|
+
("logical_initial_value", "LogicalInitialValue", "bool"),
|
|
32
|
+
("string_initial_value", "StringInitialValue", "str"),
|
|
33
|
+
("enumeration_initial_value", "EnumerationInitialValue", "int"),
|
|
34
|
+
("real_min", "RealMin", "RealType"),
|
|
35
|
+
("real_max", "RealMax", "RealType"),
|
|
36
|
+
("integer_min", "IntegerMin", "int"),
|
|
37
|
+
("integer_max", "IntegerMax", "int"),
|
|
38
|
+
("enumeration_min", "EnumerationMin", "int"),
|
|
39
|
+
("enumeration_max", "EnumerationMax", "int"),
|
|
40
|
+
("tensor_type", "TensorType", "str"),
|
|
41
|
+
("is_extensive", "IsExtensive", "bool"),
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def quantity_type(self) -> str:
|
|
46
|
+
"""Quantity type of the variable.
|
|
47
|
+
|
|
48
|
+
Allowed values:
|
|
49
|
+
|
|
50
|
+
- \"Unspecified\"
|
|
51
|
+
- \"Force\"
|
|
52
|
+
- \"Incremental Displacement\"
|
|
53
|
+
- \"Temperature\"
|
|
54
|
+
- \"Heat Rate\"
|
|
55
|
+
- \"Heat Transfer Coefficient\"
|
|
56
|
+
- \"Convection Reference Temperature\"
|
|
57
|
+
- \"Mode Shape\"
|
|
58
|
+
- \"Electrical Conductivity\" """
|
|
59
|
+
return self.get_property_state("quantity_type")
|
|
60
|
+
|
|
61
|
+
@quantity_type.setter
|
|
62
|
+
def quantity_type(self, value: str):
|
|
63
|
+
self.set_property_state("quantity_type", value)
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def location(self) -> str:
|
|
67
|
+
"""Data location of the variable (\"Node\" or \"Element\")."""
|
|
68
|
+
return self.get_property_state("location")
|
|
69
|
+
|
|
70
|
+
@location.setter
|
|
71
|
+
def location(self, value: str):
|
|
72
|
+
self.set_property_state("location", value)
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def participant_display_name(self) -> str:
|
|
76
|
+
"""Variable's display name as defined by the participant solver."""
|
|
77
|
+
return self.get_property_state("participant_display_name")
|
|
78
|
+
|
|
79
|
+
@participant_display_name.setter
|
|
80
|
+
def participant_display_name(self, value: str):
|
|
81
|
+
self.set_property_state("participant_display_name", value)
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def display_name(self) -> str:
|
|
85
|
+
"""Variable's display name as defined in System Coupling."""
|
|
86
|
+
return self.get_property_state("display_name")
|
|
87
|
+
|
|
88
|
+
@display_name.setter
|
|
89
|
+
def display_name(self, value: str):
|
|
90
|
+
self.set_property_state("display_name", value)
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def data_type(self) -> str:
|
|
94
|
+
"""Variable's data type as reported by the participant.
|
|
95
|
+
|
|
96
|
+
Allowed values (non-FMU case):
|
|
97
|
+
|
|
98
|
+
- Real
|
|
99
|
+
- Complex
|
|
100
|
+
|
|
101
|
+
Allowed values (FMU):
|
|
102
|
+
|
|
103
|
+
- Real
|
|
104
|
+
- Integer
|
|
105
|
+
- Logical
|
|
106
|
+
- String
|
|
107
|
+
- Enumeration"""
|
|
108
|
+
return self.get_property_state("data_type")
|
|
109
|
+
|
|
110
|
+
@data_type.setter
|
|
111
|
+
def data_type(self, value: str):
|
|
112
|
+
self.set_property_state("data_type", value)
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def real_initial_value(self) -> RealType:
|
|
116
|
+
"""Real data start value."""
|
|
117
|
+
return self.get_property_state("real_initial_value")
|
|
118
|
+
|
|
119
|
+
@real_initial_value.setter
|
|
120
|
+
def real_initial_value(self, value: RealType):
|
|
121
|
+
self.set_property_state("real_initial_value", value)
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
def integer_initial_value(self) -> int:
|
|
125
|
+
"""Integer data start value."""
|
|
126
|
+
return self.get_property_state("integer_initial_value")
|
|
127
|
+
|
|
128
|
+
@integer_initial_value.setter
|
|
129
|
+
def integer_initial_value(self, value: int):
|
|
130
|
+
self.set_property_state("integer_initial_value", value)
|
|
131
|
+
|
|
132
|
+
@property
|
|
133
|
+
def logical_initial_value(self) -> bool:
|
|
134
|
+
"""Logical data start value."""
|
|
135
|
+
return self.get_property_state("logical_initial_value")
|
|
136
|
+
|
|
137
|
+
@logical_initial_value.setter
|
|
138
|
+
def logical_initial_value(self, value: bool):
|
|
139
|
+
self.set_property_state("logical_initial_value", value)
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def string_initial_value(self) -> str:
|
|
143
|
+
"""String data start value."""
|
|
144
|
+
return self.get_property_state("string_initial_value")
|
|
145
|
+
|
|
146
|
+
@string_initial_value.setter
|
|
147
|
+
def string_initial_value(self, value: str):
|
|
148
|
+
self.set_property_state("string_initial_value", value)
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def enumeration_initial_value(self) -> int:
|
|
152
|
+
"""Enumeration data start value."""
|
|
153
|
+
return self.get_property_state("enumeration_initial_value")
|
|
154
|
+
|
|
155
|
+
@enumeration_initial_value.setter
|
|
156
|
+
def enumeration_initial_value(self, value: int):
|
|
157
|
+
self.set_property_state("enumeration_initial_value", value)
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
def real_min(self) -> RealType:
|
|
161
|
+
"""Real data minimum value."""
|
|
162
|
+
return self.get_property_state("real_min")
|
|
163
|
+
|
|
164
|
+
@real_min.setter
|
|
165
|
+
def real_min(self, value: RealType):
|
|
166
|
+
self.set_property_state("real_min", value)
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
def real_max(self) -> RealType:
|
|
170
|
+
"""Real data maximum value."""
|
|
171
|
+
return self.get_property_state("real_max")
|
|
172
|
+
|
|
173
|
+
@real_max.setter
|
|
174
|
+
def real_max(self, value: RealType):
|
|
175
|
+
self.set_property_state("real_max", value)
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
def integer_min(self) -> int:
|
|
179
|
+
"""Integer data minimum value."""
|
|
180
|
+
return self.get_property_state("integer_min")
|
|
181
|
+
|
|
182
|
+
@integer_min.setter
|
|
183
|
+
def integer_min(self, value: int):
|
|
184
|
+
self.set_property_state("integer_min", value)
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def integer_max(self) -> int:
|
|
188
|
+
"""Integer data maximum value."""
|
|
189
|
+
return self.get_property_state("integer_max")
|
|
190
|
+
|
|
191
|
+
@integer_max.setter
|
|
192
|
+
def integer_max(self, value: int):
|
|
193
|
+
self.set_property_state("integer_max", value)
|
|
194
|
+
|
|
195
|
+
@property
|
|
196
|
+
def enumeration_min(self) -> int:
|
|
197
|
+
"""Enumeration data minimum value."""
|
|
198
|
+
return self.get_property_state("enumeration_min")
|
|
199
|
+
|
|
200
|
+
@enumeration_min.setter
|
|
201
|
+
def enumeration_min(self, value: int):
|
|
202
|
+
self.set_property_state("enumeration_min", value)
|
|
203
|
+
|
|
204
|
+
@property
|
|
205
|
+
def enumeration_max(self) -> int:
|
|
206
|
+
"""Enumeration data maximum value."""
|
|
207
|
+
return self.get_property_state("enumeration_max")
|
|
208
|
+
|
|
209
|
+
@enumeration_max.setter
|
|
210
|
+
def enumeration_max(self, value: int):
|
|
211
|
+
self.set_property_state("enumeration_max", value)
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
def tensor_type(self) -> str:
|
|
215
|
+
"""Indicates the variable tensor type (\"Scalar\" or \"Vector\").
|
|
216
|
+
|
|
217
|
+
\"Vector\" is not supported for the FMU case."""
|
|
218
|
+
return self.get_property_state("tensor_type")
|
|
219
|
+
|
|
220
|
+
@tensor_type.setter
|
|
221
|
+
def tensor_type(self, value: str):
|
|
222
|
+
self.set_property_state("tensor_type", value)
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def is_extensive(self) -> bool:
|
|
226
|
+
"""Indicates whether this is an extensive property."""
|
|
227
|
+
return self.get_property_state("is_extensive")
|
|
228
|
+
|
|
229
|
+
@is_extensive.setter
|
|
230
|
+
def is_extensive(self, value: bool):
|
|
231
|
+
self.set_property_state("is_extensive", value)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This is an auto-generated file. DO NOT EDIT!
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
from ansys.systemcoupling.core.adaptor.impl.types import *
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class write_csv_chart_files(Command):
|
|
9
|
+
"""
|
|
10
|
+
For each coupling interface, exports a CSV file containing chart data
|
|
11
|
+
(convergence and source/target quantity transfer values) for
|
|
12
|
+
that interface.
|
|
13
|
+
|
|
14
|
+
Each file is named according to the convention ``<interface>.csv``, where
|
|
15
|
+
``<interface>`` is the object name of the corresponding coupling interface.
|
|
16
|
+
|
|
17
|
+
This command will overwrite any CSV charting files that already exist,
|
|
18
|
+
including any that were written during the solution.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
syc_name = "WriteCsvChartFiles"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This is an auto-generated file. DO NOT EDIT!
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
from ansys.systemcoupling.core.adaptor.impl.types import *
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class write_ensight(Command):
|
|
9
|
+
"""
|
|
10
|
+
Write a file with mesh and results which can be loaded into EnSight for
|
|
11
|
+
post processing.
|
|
12
|
+
|
|
13
|
+
Parameters
|
|
14
|
+
----------
|
|
15
|
+
file_name : str
|
|
16
|
+
Base name for EnSight files. It will generate <base>.encas file which
|
|
17
|
+
should be loaded into EnSight. Other files are generated for geometry
|
|
18
|
+
and variables.
|
|
19
|
+
binary : bool, optional
|
|
20
|
+
To control if file is to be written in binary format or ASCII. ASCII
|
|
21
|
+
slows down performance, but may be useful for debugging and seeing
|
|
22
|
+
raw data.
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
syc_name = "WriteEnSight"
|
|
27
|
+
|
|
28
|
+
argument_names = ["file_name", "binary"]
|
|
29
|
+
|
|
30
|
+
class file_name(String):
|
|
31
|
+
"""
|
|
32
|
+
Base name for EnSight files. It will generate <base>.encas file which
|
|
33
|
+
should be loaded into EnSight. Other files are generated for geometry
|
|
34
|
+
and variables.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
syc_name = "FileName"
|
|
38
|
+
|
|
39
|
+
class binary(Boolean):
|
|
40
|
+
"""
|
|
41
|
+
To control if file is to be written in binary format or ASCII. ASCII
|
|
42
|
+
slows down performance, but may be useful for debugging and seeing
|
|
43
|
+
raw data.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
syc_name = "Binary"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This is an auto-generated file. DO NOT EDIT!
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
from ansys.systemcoupling.core.adaptor.impl.types import *
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class write_target_data(Command):
|
|
9
|
+
"""
|
|
10
|
+
Command to write target data for target participant after mapping operation.
|
|
11
|
+
|
|
12
|
+
The purpose of this command is to write target mesh and target mapped data in
|
|
13
|
+
the target participant working directory and thus mapping results from SystemCoupling can
|
|
14
|
+
be check in the target participant.
|
|
15
|
+
|
|
16
|
+
Parameters
|
|
17
|
+
----------
|
|
18
|
+
overwrite : bool, optional
|
|
19
|
+
Flag indicating whether to overwrite the existing target data file. Default value is False.
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
syc_name = "WriteTargetData"
|
|
24
|
+
|
|
25
|
+
argument_names = ["overwrite"]
|
|
26
|
+
|
|
27
|
+
class overwrite(Boolean):
|
|
28
|
+
"""
|
|
29
|
+
Flag indicating whether to overwrite the existing target data file. Default value is False.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
syc_name = "Overwrite"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2023 -
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
#
|
|
4
4
|
#
|
|
@@ -148,9 +148,10 @@ def _wrap_add_participant(
|
|
|
148
148
|
)
|
|
149
149
|
|
|
150
150
|
if input_file := kwargs.get("input_file", None):
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
# In PIM-like scenario, the returned file name is what
|
|
152
|
+
# the container sees. Otherwise input_file should be
|
|
153
|
+
# unchanged by the upload call.
|
|
154
|
+
kwargs["input_file"] = session.upload_file(input_file)
|
|
154
155
|
|
|
155
156
|
return setup._add_participant(**kwargs)
|
|
156
157
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2023 -
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
#
|
|
4
4
|
#
|
|
@@ -312,14 +312,21 @@ def get_extended_cmd_metadata(api) -> list:
|
|
|
312
312
|
"""
|
|
313
313
|
|
|
314
314
|
def fix_up_doc(cmd_metadata):
|
|
315
|
-
|
|
315
|
+
version = get_syc_version(api)
|
|
316
|
+
if version not in ("24.2", "25.1"):
|
|
316
317
|
return cmd_metadata
|
|
317
318
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
command_to_fix = None
|
|
320
|
+
if version == "24.2":
|
|
321
|
+
command_to_fix = "add_participant"
|
|
322
|
+
elif version == "25.1":
|
|
323
|
+
command_to_fix = "update_participant"
|
|
324
|
+
|
|
325
|
+
# There are bugs in doc text queried from 24.2 and 25.1 SyC.
|
|
326
|
+
# The "*" need to be escaped to avoid issues in Sphinx. This
|
|
327
|
+
# can be a surgical fix because these versions are frozen now.
|
|
321
328
|
for cmd in cmd_metadata:
|
|
322
|
-
if cmd["pyname"] ==
|
|
329
|
+
if cmd["pyname"] == command_to_fix:
|
|
323
330
|
add_part_cmd = cmd
|
|
324
331
|
for arg_name, arg_info in add_part_cmd["args"]:
|
|
325
332
|
if arg_name == "InputFile":
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2023 -
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
#
|
|
4
4
|
#
|
|
@@ -245,6 +245,17 @@ def parse_csv_metadata(interface_name: str, headers: list[str]) -> InterfaceInfo
|
|
|
245
245
|
series_type, intf_or_part_disp_name, trans_disp_name = _parse_header(header)
|
|
246
246
|
if series_type == SeriesType.CONVERGENCE:
|
|
247
247
|
prev_part_name = ""
|
|
248
|
+
|
|
249
|
+
# If there are no convergence headings, transfer_disambig will
|
|
250
|
+
# remain unpopulated. In this case, assume for now that there
|
|
251
|
+
# is no ambiguity. Although not strictly correct, this is a
|
|
252
|
+
# reasonable assumption for the majority of cases.
|
|
253
|
+
# TODO: look for alternative method to determine a
|
|
254
|
+
# disambiguation index in the case of no convergence headers.
|
|
255
|
+
# If this is not possible, look for a way to detect that
|
|
256
|
+
# data transfers are ambiguous and raise an exception or
|
|
257
|
+
# warn and skip plotting.
|
|
258
|
+
|
|
248
259
|
if trans_disp_name in transfer_disambig:
|
|
249
260
|
transfer_disambig[trans_disp_name] += 1
|
|
250
261
|
else:
|
|
@@ -258,7 +269,8 @@ def parse_csv_metadata(interface_name: str, headers: list[str]) -> InterfaceInfo
|
|
|
258
269
|
data_index,
|
|
259
270
|
series_type,
|
|
260
271
|
transfer_display_name=trans_disp_name,
|
|
261
|
-
|
|
272
|
+
# get(..., 0) for case where transfer_disambig empty (see note above)
|
|
273
|
+
disambiguation_index=transfer_disambig.get(trans_disp_name, 0),
|
|
262
274
|
)
|
|
263
275
|
intf_info.transfer_info.append(series_info)
|
|
264
276
|
else:
|
|
@@ -276,7 +288,9 @@ def parse_csv_metadata(interface_name: str, headers: list[str]) -> InterfaceInfo
|
|
|
276
288
|
data_index,
|
|
277
289
|
series_type,
|
|
278
290
|
transfer_display_name=trans_disp_name,
|
|
279
|
-
disambiguation_index=transfer_disambig
|
|
291
|
+
disambiguation_index=transfer_disambig.get(
|
|
292
|
+
trans_disp_name, 0
|
|
293
|
+
),
|
|
280
294
|
participant_display_name=part_disp_name,
|
|
281
295
|
line_suffixes=[suffix],
|
|
282
296
|
)
|
|
@@ -292,7 +306,7 @@ def parse_csv_metadata(interface_name: str, headers: list[str]) -> InterfaceInfo
|
|
|
292
306
|
data_index,
|
|
293
307
|
series_type,
|
|
294
308
|
transfer_display_name=trans_disp_name,
|
|
295
|
-
disambiguation_index=transfer_disambig
|
|
309
|
+
disambiguation_index=transfer_disambig.get(trans_disp_name, 0),
|
|
296
310
|
participant_display_name=part_disp_name,
|
|
297
311
|
)
|
|
298
312
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2023 -
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
#
|
|
4
4
|
#
|
|
@@ -137,7 +137,16 @@ class SycGrpc(object):
|
|
|
137
137
|
_LOCALHOST_IP, port, working_dir, version, **kwargs
|
|
138
138
|
)
|
|
139
139
|
LOG.debug("...started")
|
|
140
|
-
|
|
140
|
+
try:
|
|
141
|
+
self._connect(_LOCALHOST_IP, port)
|
|
142
|
+
except Exception as e:
|
|
143
|
+
if "v251" in self.__process.path_to_system_coupling:
|
|
144
|
+
e.args += (
|
|
145
|
+
"Connection will fail if you are running an "
|
|
146
|
+
"unpatched version of System Coupling 25 R1. ",
|
|
147
|
+
)
|
|
148
|
+
raise
|
|
149
|
+
|
|
141
150
|
if start_output:
|
|
142
151
|
self.start_output()
|
|
143
152
|
|
|
@@ -177,12 +186,12 @@ class SycGrpc(object):
|
|
|
177
186
|
if start_output:
|
|
178
187
|
self.start_output()
|
|
179
188
|
|
|
180
|
-
def upload_file(self, *args, **kwargs):
|
|
189
|
+
def upload_file(self, *args, **kwargs) -> str:
|
|
181
190
|
"""Supports file upload to remote instance.
|
|
182
191
|
|
|
183
192
|
Currently for internal use only.
|
|
184
193
|
"""
|
|
185
|
-
file_transfer_service(self.__pim_instance).upload_file(*args, **kwargs)
|
|
194
|
+
return file_transfer_service(self.__pim_instance).upload_file(*args, **kwargs)
|
|
186
195
|
|
|
187
196
|
def download_file(self, *args, **kwargs):
|
|
188
197
|
"""Supports file download from remote instance.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2023 -
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
#
|
|
4
4
|
#
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
import ansys.api.systemcoupling.v0.command_pb2_grpc as command_pb2_grpc
|
|
24
|
-
import ansys.api.systemcoupling.v0.error_pb2 as syc_error_pb2
|
|
25
24
|
import grpc
|
|
26
|
-
|
|
25
|
+
|
|
26
|
+
from ansys.systemcoupling.core.client.services.handle_rpc_error import handle_rpc_error
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class CommandQueryService:
|
|
@@ -35,14 +35,5 @@ class CommandQueryService:
|
|
|
35
35
|
response, call = self.__stub.InvokeCommand.with_call(request)
|
|
36
36
|
return response, call.trailing_metadata()
|
|
37
37
|
except grpc.RpcError as rpc_error:
|
|
38
|
-
|
|
39
|
-
msg = f"Command execution failed: {status.message} (code={status.code})"
|
|
40
|
-
for detail in status.details:
|
|
41
|
-
if detail.Is(syc_error_pb2.ErrorDetails.DESCRIPTOR):
|
|
42
|
-
info = syc_error_pb2.ErrorDetails()
|
|
43
|
-
detail.Unpack(info)
|
|
44
|
-
msg += (
|
|
45
|
-
f"\n\nServer exception details:\n"
|
|
46
|
-
f"{info.exception_classname}\n{info.stack_trace}"
|
|
47
|
-
)
|
|
38
|
+
msg = handle_rpc_error(rpc_error)
|
|
48
39
|
raise RuntimeError(msg) from None
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
# copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
# SOFTWARE.
|
|
22
|
+
|
|
23
|
+
import ansys.api.systemcoupling.v0.error_pb2 as syc_error_pb2
|
|
24
|
+
import grpc
|
|
25
|
+
from grpc_status.rpc_status import from_call
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _error_details_msg(error_details: syc_error_pb2) -> str:
|
|
29
|
+
return (
|
|
30
|
+
f"Command or query execution failed with error: {error_details.exception_classname}"
|
|
31
|
+
f"\n\nServer stacktrace:\n{error_details.stack_trace}"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _check_for_syc_exception(rpc_error):
|
|
36
|
+
# grpc_status is not available in some server versions so
|
|
37
|
+
# check for bespoke method of returning error details via
|
|
38
|
+
# trailing metadata.
|
|
39
|
+
meta = rpc_error.trailing_metadata()
|
|
40
|
+
if meta is not None:
|
|
41
|
+
for key, value in meta:
|
|
42
|
+
if key == "syc-exception-bin":
|
|
43
|
+
error_details = syc_error_pb2.ErrorDetails()
|
|
44
|
+
error_details.ParseFromString(value)
|
|
45
|
+
return _error_details_msg(error_details)
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def handle_rpc_error(rpc_error: grpc.RpcError):
|
|
50
|
+
msg = _check_for_syc_exception(rpc_error)
|
|
51
|
+
if msg is not None:
|
|
52
|
+
return msg
|
|
53
|
+
|
|
54
|
+
status = from_call(rpc_error)
|
|
55
|
+
if status is None:
|
|
56
|
+
return "Command or query execution failed. No details available."
|
|
57
|
+
|
|
58
|
+
msg = f"Command execution failed: {status.message} (code={status.code})"
|
|
59
|
+
for detail in status.details:
|
|
60
|
+
if detail.Is(syc_error_pb2.ErrorDetails.DESCRIPTOR):
|
|
61
|
+
error_details = syc_error_pb2.ErrorDetails()
|
|
62
|
+
detail.Unpack(error_details)
|
|
63
|
+
msg += _error_details_msg(error_details)
|
|
64
|
+
return msg
|