ansys-systemcoupling-core 0.2.0__py3-none-any.whl → 0.3.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 -4
- ansys/systemcoupling/core/adaptor/api_23_2/_add_participant.py +70 -0
- ansys/systemcoupling/core/adaptor/api_23_2/_solve.py +13 -0
- ansys/systemcoupling/core/adaptor/api_23_2/add_participant.py +38 -2
- ansys/systemcoupling/core/adaptor/api_23_2/case_root.py +13 -13
- ansys/systemcoupling/core/adaptor/api_23_2/setup_root.py +55 -49
- ansys/systemcoupling/core/adaptor/api_23_2/solution_root.py +42 -36
- ansys/systemcoupling/core/adaptor/api_23_2/solve.py +1 -1
- ansys/systemcoupling/core/adaptor/api_24_1/_add_participant.py +70 -0
- ansys/systemcoupling/core/adaptor/api_24_1/_solve.py +13 -0
- ansys/systemcoupling/core/adaptor/api_24_1/abort.py +39 -0
- ansys/systemcoupling/core/adaptor/api_24_1/activate_hidden.py +46 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_data_transfer.py +190 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_data_transfer_by_display_names.py +191 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_expression_function.py +61 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_interface.py +77 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_interface_by_display_names.py +78 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_named_expression.py +42 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_participant.py +140 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_reference_frame.py +40 -0
- ansys/systemcoupling/core/adaptor/api_24_1/add_transformation.py +102 -0
- ansys/systemcoupling/core/adaptor/api_24_1/analysis_control.py +249 -0
- ansys/systemcoupling/core/adaptor/api_24_1/apip.py +33 -0
- ansys/systemcoupling/core/adaptor/api_24_1/ascii_output.py +44 -0
- ansys/systemcoupling/core/adaptor/api_24_1/attribute.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/attribute_child.py +54 -0
- ansys/systemcoupling/core/adaptor/api_24_1/automatic_alignment_options.py +46 -0
- ansys/systemcoupling/core/adaptor/api_24_1/available_ports.py +40 -0
- ansys/systemcoupling/core/adaptor/api_24_1/avoid_data_reconstruction.py +46 -0
- ansys/systemcoupling/core/adaptor/api_24_1/case_root.py +62 -0
- ansys/systemcoupling/core/adaptor/api_24_1/clear_state.py +16 -0
- ansys/systemcoupling/core/adaptor/api_24_1/coupling_interface.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/coupling_interface_child.py +42 -0
- ansys/systemcoupling/core/adaptor/api_24_1/coupling_participant.py +23 -0
- ansys/systemcoupling/core/adaptor/api_24_1/coupling_participant_child.py +230 -0
- ansys/systemcoupling/core/adaptor/api_24_1/create_restart_point.py +29 -0
- ansys/systemcoupling/core/adaptor/api_24_1/data_transfer.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/data_transfer_child.py +187 -0
- ansys/systemcoupling/core/adaptor/api_24_1/delete_snapshot.py +28 -0
- ansys/systemcoupling/core/adaptor/api_24_1/delete_transformation.py +42 -0
- ansys/systemcoupling/core/adaptor/api_24_1/dimensionality.py +96 -0
- ansys/systemcoupling/core/adaptor/api_24_1/execution_control.py +186 -0
- ansys/systemcoupling/core/adaptor/api_24_1/expression.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/expression_child.py +36 -0
- ansys/systemcoupling/core/adaptor/api_24_1/expression_function.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/expression_function_child.py +46 -0
- ansys/systemcoupling/core/adaptor/api_24_1/external_data_file.py +24 -0
- ansys/systemcoupling/core/adaptor/api_24_1/fluent_input.py +67 -0
- ansys/systemcoupling/core/adaptor/api_24_1/fmu_parameter.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/fmu_parameter_child.py +156 -0
- ansys/systemcoupling/core/adaptor/api_24_1/generate_input_file.py +41 -0
- ansys/systemcoupling/core/adaptor/api_24_1/get_execution_command.py +30 -0
- ansys/systemcoupling/core/adaptor/api_24_1/get_machines.py +13 -0
- ansys/systemcoupling/core/adaptor/api_24_1/get_region_names_for_participant.py +31 -0
- ansys/systemcoupling/core/adaptor/api_24_1/get_setup_summary.py +25 -0
- ansys/systemcoupling/core/adaptor/api_24_1/get_snapshots.py +14 -0
- ansys/systemcoupling/core/adaptor/api_24_1/get_status_messages.py +52 -0
- ansys/systemcoupling/core/adaptor/api_24_1/get_transformation.py +43 -0
- ansys/systemcoupling/core/adaptor/api_24_1/global_stabilization.py +143 -0
- ansys/systemcoupling/core/adaptor/api_24_1/has_input_file_changed.py +36 -0
- ansys/systemcoupling/core/adaptor/api_24_1/import_system_coupling_input_file.py +36 -0
- ansys/systemcoupling/core/adaptor/api_24_1/initialize.py +27 -0
- ansys/systemcoupling/core/adaptor/api_24_1/instancing.py +23 -0
- ansys/systemcoupling/core/adaptor/api_24_1/instancing_child.py +62 -0
- ansys/systemcoupling/core/adaptor/api_24_1/interrupt.py +39 -0
- ansys/systemcoupling/core/adaptor/api_24_1/library.py +37 -0
- ansys/systemcoupling/core/adaptor/api_24_1/live_visualization.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/live_visualization_child.py +72 -0
- ansys/systemcoupling/core/adaptor/api_24_1/mapping_control.py +229 -0
- ansys/systemcoupling/core/adaptor/api_24_1/open.py +102 -0
- ansys/systemcoupling/core/adaptor/api_24_1/open_results_in_en_sight.py +56 -0
- ansys/systemcoupling/core/adaptor/api_24_1/open_snapshot.py +37 -0
- ansys/systemcoupling/core/adaptor/api_24_1/output_control.py +134 -0
- ansys/systemcoupling/core/adaptor/api_24_1/parameter.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/parameter_child.py +64 -0
- ansys/systemcoupling/core/adaptor/api_24_1/partition_participants.py +138 -0
- ansys/systemcoupling/core/adaptor/api_24_1/reference_frame.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/reference_frame_child.py +71 -0
- ansys/systemcoupling/core/adaptor/api_24_1/region.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/region_child.py +72 -0
- ansys/systemcoupling/core/adaptor/api_24_1/reload_expression_function_modules.py +14 -0
- ansys/systemcoupling/core/adaptor/api_24_1/results.py +89 -0
- ansys/systemcoupling/core/adaptor/api_24_1/save.py +51 -0
- ansys/systemcoupling/core/adaptor/api_24_1/save_snapshot.py +54 -0
- ansys/systemcoupling/core/adaptor/api_24_1/setup_root.py +195 -0
- ansys/systemcoupling/core/adaptor/api_24_1/shutdown.py +25 -0
- ansys/systemcoupling/core/adaptor/api_24_1/side.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/side_child.py +56 -0
- ansys/systemcoupling/core/adaptor/api_24_1/solution_control.py +103 -0
- ansys/systemcoupling/core/adaptor/api_24_1/solution_root.py +110 -0
- ansys/systemcoupling/core/adaptor/api_24_1/solve.py +30 -0
- ansys/systemcoupling/core/adaptor/api_24_1/stabilization.py +157 -0
- ansys/systemcoupling/core/adaptor/api_24_1/start_participants.py +47 -0
- ansys/systemcoupling/core/adaptor/api_24_1/step.py +57 -0
- ansys/systemcoupling/core/adaptor/api_24_1/transformation.py +21 -0
- ansys/systemcoupling/core/adaptor/api_24_1/transformation_child.py +62 -0
- ansys/systemcoupling/core/adaptor/api_24_1/type.py +38 -0
- ansys/systemcoupling/core/adaptor/api_24_1/unmapped_value_options.py +158 -0
- ansys/systemcoupling/core/adaptor/api_24_1/update_control.py +44 -0
- ansys/systemcoupling/core/adaptor/api_24_1/update_participant.py +61 -0
- ansys/systemcoupling/core/adaptor/api_24_1/variable.py +20 -0
- ansys/systemcoupling/core/adaptor/api_24_1/variable_child.py +232 -0
- ansys/systemcoupling/core/adaptor/api_24_1/write_csv_chart_files.py +21 -0
- ansys/systemcoupling/core/adaptor/api_24_1/write_ensight.py +46 -0
- ansys/systemcoupling/core/adaptor/impl/get_syc_version.py +35 -0
- ansys/systemcoupling/core/adaptor/impl/injected_commands.py +97 -5
- ansys/systemcoupling/core/adaptor/impl/root_source.py +2 -0
- ansys/systemcoupling/core/adaptor/impl/static_info.py +69 -41
- ansys/systemcoupling/core/adaptor/impl/syc_proxy.py +1 -1
- ansys/systemcoupling/core/adaptor/impl/types.py +12 -0
- ansys/systemcoupling/core/client/syc_container.py +2 -0
- ansys/systemcoupling/core/participant/manager.py +198 -0
- ansys/systemcoupling/core/participant/protocol.py +51 -0
- ansys/systemcoupling/core/session.py +7 -1
- ansys/systemcoupling/core/syc_version.py +26 -2
- {ansys_systemcoupling_core-0.2.0.dist-info → ansys_systemcoupling_core-0.3.0.dist-info}/METADATA +9 -9
- ansys_systemcoupling_core-0.3.0.dist-info/RECORD +230 -0
- ansys_systemcoupling_core-0.2.0.dist-info/RECORD +0 -129
- /ansys/systemcoupling/core/adaptor/{api_23_2 → api_24_1}/open_results_in_ensight.py +0 -0
- {ansys_systemcoupling_core-0.2.0.dist-info → ansys_systemcoupling_core-0.3.0.dist-info}/LICENSE +0 -0
- {ansys_systemcoupling_core-0.2.0.dist-info → ansys_systemcoupling_core-0.3.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
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 update_control(Container):
|
|
9
|
+
"""
|
|
10
|
+
Configure update controls.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
syc_name = "UpdateControl"
|
|
14
|
+
|
|
15
|
+
property_names_types = [
|
|
16
|
+
("option", "Option", "str"),
|
|
17
|
+
("update_frequency", "UpdateFrequency", "int"),
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def option(self) -> str:
|
|
22
|
+
"""Specifies how often the participant will perform updates.
|
|
23
|
+
|
|
24
|
+
Possible values:
|
|
25
|
+
|
|
26
|
+
- \"ProgramControlled\"
|
|
27
|
+
- \"EveryIteration\"
|
|
28
|
+
- \"StepInterval\"
|
|
29
|
+
- \"Suspended\"
|
|
30
|
+
- \"FirstCouplingIteration\" """
|
|
31
|
+
return self.get_property_state("option")
|
|
32
|
+
|
|
33
|
+
@option.setter
|
|
34
|
+
def option(self, value: str):
|
|
35
|
+
self.set_property_state("option", value)
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def update_frequency(self) -> int:
|
|
39
|
+
"""Specify update frequency."""
|
|
40
|
+
return self.get_property_state("update_frequency")
|
|
41
|
+
|
|
42
|
+
@update_frequency.setter
|
|
43
|
+
def update_frequency(self, value: int):
|
|
44
|
+
self.set_property_state("update_frequency", value)
|
|
@@ -0,0 +1,61 @@
|
|
|
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 update_participant(Command):
|
|
9
|
+
"""
|
|
10
|
+
Given the name of a server participant, updates the state of the participant.
|
|
11
|
+
|
|
12
|
+
Available for server participants. Currently, only DEFAULT-SRV,
|
|
13
|
+
CFD-SRV, MECH-SRV, and SCDT-SRV participants may be updated.
|
|
14
|
+
|
|
15
|
+
As part of the update, System Coupling updates all regions and
|
|
16
|
+
variables defined in the participant, including all variable
|
|
17
|
+
attributes. Variables and regions may be added to the participant but
|
|
18
|
+
may not be removed.
|
|
19
|
+
|
|
20
|
+
You may specify an input file using an optional argument. If an input
|
|
21
|
+
file is not provided, then the original input file will be reimported.
|
|
22
|
+
|
|
23
|
+
If the update process fails, System Coupling displays an error. In this
|
|
24
|
+
case, you can either update the setup in the participant application to
|
|
25
|
+
remove any issues with the update process or delete the participant
|
|
26
|
+
from the analysis and then re-add it using the updated input file.
|
|
27
|
+
|
|
28
|
+
Parameters
|
|
29
|
+
----------
|
|
30
|
+
participant_name : str
|
|
31
|
+
Participant name. Must be the name of an existing participant.
|
|
32
|
+
Participant type can be either DEFAULT-SRV, CFD-SRV, MECH-SRV, or SCDT-SRV.
|
|
33
|
+
input_file : str, optional
|
|
34
|
+
Name of the input file for the participant to be added.
|
|
35
|
+
Currently supported formats are SCP files, Forte input (FTSIM)
|
|
36
|
+
files, mechanical server (\*.rst) files, cfd server (\*.csv) files,
|
|
37
|
+
FMU (.fmu) files (Beta), and system coupling data server (\*.scdt/axdt/csv) files.
|
|
38
|
+
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
syc_name = "UpdateParticipant"
|
|
42
|
+
|
|
43
|
+
argument_names = ["participant_name", "input_file"]
|
|
44
|
+
|
|
45
|
+
class participant_name(String):
|
|
46
|
+
"""
|
|
47
|
+
Participant name. Must be the name of an existing participant.
|
|
48
|
+
Participant type can be either DEFAULT-SRV, CFD-SRV, MECH-SRV, or SCDT-SRV.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
syc_name = "ParticipantName"
|
|
52
|
+
|
|
53
|
+
class input_file(String):
|
|
54
|
+
"""
|
|
55
|
+
Name of the input file for the participant to be added.
|
|
56
|
+
Currently supported formats are SCP files, Forte input (FTSIM)
|
|
57
|
+
files, mechanical server (\*.rst) files, cfd server (\*.csv) files,
|
|
58
|
+
FMU (.fmu) files (Beta), and system coupling data server (\*.scdt/axdt/csv) files.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
syc_name = "InputFile"
|
|
@@ -0,0 +1,20 @@
|
|
|
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 .variable_child import variable_child
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class variable(NamedContainer[variable_child]):
|
|
11
|
+
"""
|
|
12
|
+
Configure a variable for the coupling participant.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
syc_name = "Variable"
|
|
16
|
+
|
|
17
|
+
child_object_type: variable_child = variable_child
|
|
18
|
+
"""
|
|
19
|
+
child_object_type of variable.
|
|
20
|
+
"""
|
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
- None"""
|
|
109
|
+
return self.get_property_state("data_type")
|
|
110
|
+
|
|
111
|
+
@data_type.setter
|
|
112
|
+
def data_type(self, value: str):
|
|
113
|
+
self.set_property_state("data_type", value)
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def real_initial_value(self) -> RealType:
|
|
117
|
+
"""Real data start value."""
|
|
118
|
+
return self.get_property_state("real_initial_value")
|
|
119
|
+
|
|
120
|
+
@real_initial_value.setter
|
|
121
|
+
def real_initial_value(self, value: RealType):
|
|
122
|
+
self.set_property_state("real_initial_value", value)
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def integer_initial_value(self) -> int:
|
|
126
|
+
"""Integer data start value."""
|
|
127
|
+
return self.get_property_state("integer_initial_value")
|
|
128
|
+
|
|
129
|
+
@integer_initial_value.setter
|
|
130
|
+
def integer_initial_value(self, value: int):
|
|
131
|
+
self.set_property_state("integer_initial_value", value)
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
def logical_initial_value(self) -> bool:
|
|
135
|
+
"""Logical data start value."""
|
|
136
|
+
return self.get_property_state("logical_initial_value")
|
|
137
|
+
|
|
138
|
+
@logical_initial_value.setter
|
|
139
|
+
def logical_initial_value(self, value: bool):
|
|
140
|
+
self.set_property_state("logical_initial_value", value)
|
|
141
|
+
|
|
142
|
+
@property
|
|
143
|
+
def string_initial_value(self) -> str:
|
|
144
|
+
"""String data start value."""
|
|
145
|
+
return self.get_property_state("string_initial_value")
|
|
146
|
+
|
|
147
|
+
@string_initial_value.setter
|
|
148
|
+
def string_initial_value(self, value: str):
|
|
149
|
+
self.set_property_state("string_initial_value", value)
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
def enumeration_initial_value(self) -> int:
|
|
153
|
+
"""Enumeration data start value."""
|
|
154
|
+
return self.get_property_state("enumeration_initial_value")
|
|
155
|
+
|
|
156
|
+
@enumeration_initial_value.setter
|
|
157
|
+
def enumeration_initial_value(self, value: int):
|
|
158
|
+
self.set_property_state("enumeration_initial_value", value)
|
|
159
|
+
|
|
160
|
+
@property
|
|
161
|
+
def real_min(self) -> RealType:
|
|
162
|
+
"""Real data minimum value."""
|
|
163
|
+
return self.get_property_state("real_min")
|
|
164
|
+
|
|
165
|
+
@real_min.setter
|
|
166
|
+
def real_min(self, value: RealType):
|
|
167
|
+
self.set_property_state("real_min", value)
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def real_max(self) -> RealType:
|
|
171
|
+
"""Real data maximum value."""
|
|
172
|
+
return self.get_property_state("real_max")
|
|
173
|
+
|
|
174
|
+
@real_max.setter
|
|
175
|
+
def real_max(self, value: RealType):
|
|
176
|
+
self.set_property_state("real_max", value)
|
|
177
|
+
|
|
178
|
+
@property
|
|
179
|
+
def integer_min(self) -> int:
|
|
180
|
+
"""Integer data minimum value."""
|
|
181
|
+
return self.get_property_state("integer_min")
|
|
182
|
+
|
|
183
|
+
@integer_min.setter
|
|
184
|
+
def integer_min(self, value: int):
|
|
185
|
+
self.set_property_state("integer_min", value)
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def integer_max(self) -> int:
|
|
189
|
+
"""Integer data maximum value."""
|
|
190
|
+
return self.get_property_state("integer_max")
|
|
191
|
+
|
|
192
|
+
@integer_max.setter
|
|
193
|
+
def integer_max(self, value: int):
|
|
194
|
+
self.set_property_state("integer_max", value)
|
|
195
|
+
|
|
196
|
+
@property
|
|
197
|
+
def enumeration_min(self) -> int:
|
|
198
|
+
"""Enumeration data minimum value."""
|
|
199
|
+
return self.get_property_state("enumeration_min")
|
|
200
|
+
|
|
201
|
+
@enumeration_min.setter
|
|
202
|
+
def enumeration_min(self, value: int):
|
|
203
|
+
self.set_property_state("enumeration_min", value)
|
|
204
|
+
|
|
205
|
+
@property
|
|
206
|
+
def enumeration_max(self) -> int:
|
|
207
|
+
"""Enumeration data maximum value."""
|
|
208
|
+
return self.get_property_state("enumeration_max")
|
|
209
|
+
|
|
210
|
+
@enumeration_max.setter
|
|
211
|
+
def enumeration_max(self, value: int):
|
|
212
|
+
self.set_property_state("enumeration_max", value)
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def tensor_type(self) -> str:
|
|
216
|
+
"""Indicates the variable tensor type (\"Scalar\" or \"Vector\").
|
|
217
|
+
|
|
218
|
+
\"Vector\" is not supported for the FMU case."""
|
|
219
|
+
return self.get_property_state("tensor_type")
|
|
220
|
+
|
|
221
|
+
@tensor_type.setter
|
|
222
|
+
def tensor_type(self, value: str):
|
|
223
|
+
self.set_property_state("tensor_type", value)
|
|
224
|
+
|
|
225
|
+
@property
|
|
226
|
+
def is_extensive(self) -> bool:
|
|
227
|
+
"""Indicates whether this is an extensive property."""
|
|
228
|
+
return self.get_property_state("is_extensive")
|
|
229
|
+
|
|
230
|
+
@is_extensive.setter
|
|
231
|
+
def is_extensive(self, value: bool):
|
|
232
|
+
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,35 @@
|
|
|
1
|
+
from ansys.systemcoupling.core.syc_version import SYC_VERSION_DOT
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def get_syc_version(api) -> str:
|
|
5
|
+
"""Get the System Coupling version.
|
|
6
|
+
|
|
7
|
+
The version is returned in a string like ``"23.2"``.
|
|
8
|
+
|
|
9
|
+
System Coupling versions earlier than 23.2 (2023 R2) do not expose
|
|
10
|
+
the ``GetVersion`` query. Because the first version of the server
|
|
11
|
+
that PySystemCoupling is able to connect to is 23.1 (2023 R1), the
|
|
12
|
+
version is assumed to be 23.1 if no version query exists.
|
|
13
|
+
|
|
14
|
+
Parameters
|
|
15
|
+
----------
|
|
16
|
+
api : NativeApi
|
|
17
|
+
Object providing access to the System Coupling *native API* .
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def clean_version_string(version_in: str) -> str:
|
|
21
|
+
year, _, release = version_in.partition(" ")
|
|
22
|
+
if len(year) == 4 and year.startswith("20") and release.startswith("R"):
|
|
23
|
+
try:
|
|
24
|
+
year = int(year[2:])
|
|
25
|
+
release = int(release[1:])
|
|
26
|
+
return f"{year}.{release}"
|
|
27
|
+
except:
|
|
28
|
+
pass
|
|
29
|
+
raise RuntimeError(
|
|
30
|
+
f"Version string {version_in} has invalid format (expect '20yy Rn')."
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
cmds = api.GetCommandAndQueryMetadata()
|
|
34
|
+
exists = any(cmd["name"] == "GetVersion" for cmd in cmds)
|
|
35
|
+
return clean_version_string(api.GetVersion()) if exists else SYC_VERSION_DOT
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from copy import deepcopy
|
|
2
2
|
from typing import Callable, Dict
|
|
3
3
|
|
|
4
|
+
from ansys.systemcoupling.core.participant.manager import ParticipantManager
|
|
5
|
+
from ansys.systemcoupling.core.syc_version import compare_versions
|
|
4
6
|
from ansys.systemcoupling.core.util.yaml_helper import yaml_load_from_string
|
|
5
7
|
|
|
6
8
|
from .get_status_messages import get_status_messages
|
|
@@ -8,26 +10,74 @@ from .types import Container
|
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
def get_injected_cmd_map(
|
|
11
|
-
|
|
13
|
+
version: str,
|
|
14
|
+
category: str,
|
|
15
|
+
root_object: Container,
|
|
16
|
+
part_mgr: ParticipantManager,
|
|
17
|
+
rpc,
|
|
12
18
|
) -> Dict[str, Callable]:
|
|
13
19
|
"""Gets a dictionary that maps names to functions that implement the injected command.
|
|
14
20
|
|
|
15
21
|
The map returned pertains to the commands in the specified category.
|
|
16
22
|
"""
|
|
23
|
+
ret = {}
|
|
24
|
+
|
|
17
25
|
if category == "setup":
|
|
18
|
-
|
|
26
|
+
ret = {
|
|
19
27
|
"get_setup_summary": lambda **kwargs: rpc.GetSetupSummary(**kwargs),
|
|
20
28
|
"get_status_messages": lambda **kwargs: get_status_messages(
|
|
21
29
|
rpc, root_object, **kwargs
|
|
22
30
|
),
|
|
31
|
+
"add_participant": lambda **kwargs: _wrap_add_participant(
|
|
32
|
+
version, root_object, part_mgr, **kwargs
|
|
33
|
+
),
|
|
23
34
|
}
|
|
35
|
+
|
|
24
36
|
if category == "solution":
|
|
25
|
-
|
|
26
|
-
"solve": lambda **kwargs:
|
|
37
|
+
ret = {
|
|
38
|
+
"solve": lambda **kwargs: _wrap_solve(root_object, part_mgr, **kwargs),
|
|
27
39
|
"interrupt": lambda **kwargs: rpc.interrupt(**kwargs),
|
|
28
40
|
"abort": lambda **kwargs: rpc.abort(**kwargs),
|
|
29
41
|
}
|
|
30
|
-
|
|
42
|
+
|
|
43
|
+
return ret
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _wrap_add_participant(
|
|
47
|
+
server_version: str, root_object: Container, part_mgr: ParticipantManager, **kwargs
|
|
48
|
+
) -> str:
|
|
49
|
+
if session := kwargs.get("participant_session", None):
|
|
50
|
+
if len(kwargs) != 1:
|
|
51
|
+
raise RuntimeError(
|
|
52
|
+
"If a 'participant_session' argument is passed to "
|
|
53
|
+
"'add_participant', it must be the only argument."
|
|
54
|
+
)
|
|
55
|
+
if part_mgr is None:
|
|
56
|
+
raise RuntimeError("Internal error: participant manager is not available.")
|
|
57
|
+
|
|
58
|
+
if compare_versions(server_version, "24.1") < 0:
|
|
59
|
+
raise RuntimeError(
|
|
60
|
+
f"System Coupling server version '{server_version}' is too low to"
|
|
61
|
+
"support this form of 'add_participant'. Minimum version is '24.1'."
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
if not hasattr(session, "system_coupling"):
|
|
65
|
+
raise RuntimeError(
|
|
66
|
+
"The 'participant_session' parameter does not provide a "
|
|
67
|
+
"'system_coupling' attribute and therefore cannot support this "
|
|
68
|
+
"form of 'add_participant'."
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return part_mgr.add_participant(participant_session=session.system_coupling)
|
|
72
|
+
|
|
73
|
+
return root_object._add_participant(**kwargs)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _wrap_solve(root_object: Container, part_mgr: ParticipantManager) -> None:
|
|
77
|
+
if part_mgr is None:
|
|
78
|
+
root_object._solve()
|
|
79
|
+
else:
|
|
80
|
+
part_mgr.solve()
|
|
31
81
|
|
|
32
82
|
|
|
33
83
|
def get_injected_cmd_data() -> list:
|
|
@@ -60,6 +110,48 @@ _cmd_yaml = """
|
|
|
60
110
|
- name: Solve
|
|
61
111
|
pyname: solve
|
|
62
112
|
isInjected: true
|
|
113
|
+
pysyc_internal_name: _solve
|
|
114
|
+
- name: AddParticipant
|
|
115
|
+
pyname: add_participant
|
|
116
|
+
isInjected: true
|
|
117
|
+
pysyc_internal_name: _add_participant
|
|
118
|
+
doc_prefix: |-
|
|
119
|
+
This command operates in one of two modes, depending on how it is called.
|
|
120
|
+
*Either* a single argument, ``participant_session``, should be provided, *or* some
|
|
121
|
+
combination of the other optional arguments not including ``participant_session``
|
|
122
|
+
should be provided.
|
|
123
|
+
|
|
124
|
+
In the ``participant_session`` mode, the session object is queried to
|
|
125
|
+
extract the information needed to define a new ``coupling_participant``
|
|
126
|
+
object in the setup datamodel. A reference to the session is also retained,
|
|
127
|
+
and this will play a further role if ``solve`` is called later. In that case,
|
|
128
|
+
the participant solver will be driven from the Python environment in which the
|
|
129
|
+
participant and PySystemCoupling sessions are active and System Coupling will
|
|
130
|
+
regard the participant solver as "externally managed" (see the `execution_control`
|
|
131
|
+
settings in `coupling_participant` for details of this mode).
|
|
132
|
+
|
|
133
|
+
.. note::
|
|
134
|
+
The ``participant_session`` mode currently has limited support in the
|
|
135
|
+
broader Ansys Python ecosystem - at present, only PyFluent supports
|
|
136
|
+
the API required of the session object and product versions of Fluent and
|
|
137
|
+
System Coupling need to be at least 24.1. This capability should be
|
|
138
|
+
regarded as *Beta* as it may be subject to revision when extended to other
|
|
139
|
+
products.
|
|
140
|
+
|
|
141
|
+
The remainder of the documentation describes the more usual non-session mode.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
essentialArgNames_extra: []
|
|
145
|
+
optionalArgNames_extra:
|
|
146
|
+
- participant_session
|
|
147
|
+
args_extra:
|
|
148
|
+
- #!!python/tuple
|
|
149
|
+
- participant_session
|
|
150
|
+
- pyname: participant_session
|
|
151
|
+
Type: <class 'object'>
|
|
152
|
+
type: ParticipantSession
|
|
153
|
+
doc: |-
|
|
154
|
+
Participant session object conforming to the ``ParticipantProtocol`` protocol class.
|
|
63
155
|
- name: interrupt
|
|
64
156
|
pyname: interrupt
|
|
65
157
|
exposure: solution
|
|
@@ -46,6 +46,7 @@ _property_types = {
|
|
|
46
46
|
|
|
47
47
|
# Command arguments still defined as settings classes
|
|
48
48
|
_arg_types = {
|
|
49
|
+
"ParticipantSession": ParticipantSession,
|
|
49
50
|
"Integer": Integer,
|
|
50
51
|
"Logical": Boolean,
|
|
51
52
|
"Real": Real,
|
|
@@ -211,6 +212,7 @@ def _get_cls(name, info, parent):
|
|
|
211
212
|
# pylint: disable=no-member
|
|
212
213
|
cls.command_names.append(ccls.__name__)
|
|
213
214
|
setattr(cls, ccls.__name__, ccls)
|
|
215
|
+
cls.command_names.sort()
|
|
214
216
|
|
|
215
217
|
arguments = info.get("args")
|
|
216
218
|
if arguments:
|