ansys-fluent-core 0.29.dev0__py3-none-any.whl → 0.29.dev2__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-fluent-core might be problematic. Click here for more details.
- ansys/fluent/core/__init__.py +1 -1
- ansys/fluent/core/_version.py +2 -2
- ansys/fluent/core/codegen/tuigen.py +1 -1
- ansys/fluent/core/codegen/walk_api.py +45 -18
- ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
- ansys/fluent/core/generated/datamodel_252/meshing.py +1 -0
- ansys/fluent/core/generated/datamodel_252/preferences.py +7 -0
- ansys/fluent/core/generated/fluent_version_252.py +3 -3
- ansys/fluent/core/generated/meshing/tui_252.py +395 -390
- ansys/fluent/core/generated/solver/settings_252.py +782 -306
- ansys/fluent/core/generated/solver/settings_252.pyi +442 -133
- ansys/fluent/core/generated/solver/tui_252.py +4046 -3737
- ansys/fluent/core/launcher/container_launcher.py +4 -3
- ansys/fluent/core/launcher/fluent_container.py +22 -19
- ansys/fluent/core/launcher/launcher.py +2 -2
- ansys/fluent/core/launcher/pim_launcher.py +2 -2
- ansys/fluent/core/launcher/slurm_launcher.py +2 -2
- ansys/fluent/core/launcher/standalone_launcher.py +2 -2
- ansys/fluent/core/logging.py +2 -0
- ansys/fluent/core/logging_config.yaml +3 -0
- ansys/fluent/core/services/app_utilities.py +2 -1
- ansys/fluent/core/services/datamodel_se.py +141 -61
- ansys/fluent/core/services/field_data.py +252 -0
- ansys/fluent/core/services/interceptors.py +28 -2
- ansys/fluent/core/session.py +7 -2
- ansys/fluent/core/session_solver.py +21 -0
- ansys/fluent/core/streaming_services/datamodel_event_streaming.py +12 -12
- {ansys_fluent_core-0.29.dev0.dist-info → ansys_fluent_core-0.29.dev2.dist-info}/LICENSE +1 -1
- {ansys_fluent_core-0.29.dev0.dist-info → ansys_fluent_core-0.29.dev2.dist-info}/METADATA +53 -31
- {ansys_fluent_core-0.29.dev0.dist-info → ansys_fluent_core-0.29.dev2.dist-info}/RECORD +65 -141
- {ansys_fluent_core-0.29.dev0.dist-info → ansys_fluent_core-0.29.dev2.dist-info}/WHEEL +1 -1
- ansys/fluent/core/docs/README.rst +0 -155
- ansys/fluent/tests/conftest.py +0 -415
- ansys/fluent/tests/fluent_fixtures.py +0 -195
- ansys/fluent/tests/integration/test_optislang/test_optislang_integration.py +0 -263
- ansys/fluent/tests/parametric/test_local_parametric_run.py +0 -36
- ansys/fluent/tests/parametric/test_local_parametric_setup.py +0 -34
- ansys/fluent/tests/parametric/test_parametric_workflow.py +0 -279
- ansys/fluent/tests/test_aero_session.py +0 -88
- ansys/fluent/tests/test_batch_ops.py +0 -39
- ansys/fluent/tests/test_builtin_settings.py +0 -761
- ansys/fluent/tests/test_cad_to_post_ftm.py +0 -525
- ansys/fluent/tests/test_cad_to_post_wtm.py +0 -250
- ansys/fluent/tests/test_casereader.py +0 -324
- ansys/fluent/tests/test_codegen.py +0 -783
- ansys/fluent/tests/test_creatable.py +0 -31
- ansys/fluent/tests/test_data_model_cache.py +0 -434
- ansys/fluent/tests/test_datamodel_api.py +0 -449
- ansys/fluent/tests/test_datamodel_service.py +0 -814
- ansys/fluent/tests/test_datareader.py +0 -103
- ansys/fluent/tests/test_error_handling.py +0 -24
- ansys/fluent/tests/test_events_manager.py +0 -214
- ansys/fluent/tests/test_field_data.py +0 -466
- ansys/fluent/tests/test_file_session.py +0 -355
- ansys/fluent/tests/test_file_transfer_service.py +0 -165
- ansys/fluent/tests/test_fix_doc.py +0 -29
- ansys/fluent/tests/test_flobject.py +0 -1235
- ansys/fluent/tests/test_fluent_fixes.py +0 -106
- ansys/fluent/tests/test_fluent_session.py +0 -270
- ansys/fluent/tests/test_fluent_version.py +0 -66
- ansys/fluent/tests/test_fluent_version_marker.py +0 -65
- ansys/fluent/tests/test_icing_session.py +0 -9
- ansys/fluent/tests/test_launcher.py +0 -529
- ansys/fluent/tests/test_launcher_remote.py +0 -272
- ansys/fluent/tests/test_lispy.py +0 -40
- ansys/fluent/tests/test_logging.py +0 -16
- ansys/fluent/tests/test_mapped_api.py +0 -774
- ansys/fluent/tests/test_meshing_utilities.py +0 -2436
- ansys/fluent/tests/test_meshing_workflow.py +0 -421
- ansys/fluent/tests/test_meshingmode/test_meshing_launch.py +0 -168
- ansys/fluent/tests/test_new_meshing_workflow.py +0 -1801
- ansys/fluent/tests/test_preferences.py +0 -89
- ansys/fluent/tests/test_pure_mesh_vs_mesh_workflow.py +0 -101
- ansys/fluent/tests/test_reduction.py +0 -484
- ansys/fluent/tests/test_rp_vars.py +0 -77
- ansys/fluent/tests/test_scheduler.py +0 -471
- ansys/fluent/tests/test_scheme_eval_222.py +0 -338
- ansys/fluent/tests/test_scheme_eval_231.py +0 -243
- ansys/fluent/tests/test_search.py +0 -344
- ansys/fluent/tests/test_session.py +0 -594
- ansys/fluent/tests/test_settings_api.py +0 -606
- ansys/fluent/tests/test_settings_reader.py +0 -85
- ansys/fluent/tests/test_slurm_future.py +0 -67
- ansys/fluent/tests/test_solution_variables.py +0 -241
- ansys/fluent/tests/test_solver_monitors.py +0 -83
- ansys/fluent/tests/test_solvermode/boundaries_periodic_expDict +0 -1712
- ansys/fluent/tests/test_solvermode/test_boundaries.py +0 -127
- ansys/fluent/tests/test_solvermode/test_calculationactivities.py +0 -20
- ansys/fluent/tests/test_solvermode/test_controls.py +0 -131
- ansys/fluent/tests/test_solvermode/test_general.py +0 -109
- ansys/fluent/tests/test_solvermode/test_initialization.py +0 -83
- ansys/fluent/tests/test_solvermode/test_materials.py +0 -40
- ansys/fluent/tests/test_solvermode/test_methods.py +0 -65
- ansys/fluent/tests/test_solvermode/test_models.py +0 -99
- ansys/fluent/tests/test_solvermode/test_named_expressions.py +0 -35
- ansys/fluent/tests/test_solvermode/test_post_vector.py +0 -22
- ansys/fluent/tests/test_solvermode/test_species_model.py +0 -67
- ansys/fluent/tests/test_streaming_services.py +0 -52
- ansys/fluent/tests/test_systemcoupling.py +0 -44
- ansys/fluent/tests/test_topy.py +0 -179
- ansys/fluent/tests/test_tui_api.py +0 -70
- ansys/fluent/tests/test_type_stub.py +0 -37
- ansys/fluent/tests/test_utils.py +0 -82
- ansys/fluent/tests/util/__init__.py +0 -36
- ansys/fluent/tests/util/meshing_workflow.py +0 -33
- ansys/fluent/tests/util/solver.py +0 -72
- ansys_fluent_core-0.29.dev0.dist-info/AUTHORS +0 -12
|
@@ -1,761 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
import tempfile
|
|
3
|
-
|
|
4
|
-
import pytest
|
|
5
|
-
|
|
6
|
-
try:
|
|
7
|
-
from ansys.fluent.core.solver import (
|
|
8
|
-
Ablation,
|
|
9
|
-
Battery,
|
|
10
|
-
BoundaryCondition,
|
|
11
|
-
BoundaryConditions,
|
|
12
|
-
CalculationActivity,
|
|
13
|
-
CaseModification,
|
|
14
|
-
CellRegister,
|
|
15
|
-
CellRegisters,
|
|
16
|
-
CellZoneCondition,
|
|
17
|
-
CellZoneConditions,
|
|
18
|
-
Contour,
|
|
19
|
-
Contours,
|
|
20
|
-
Controls,
|
|
21
|
-
ConvergenceConditions,
|
|
22
|
-
CumulativePlots,
|
|
23
|
-
CustomFieldFunctions,
|
|
24
|
-
CustomVectors,
|
|
25
|
-
DesignPoint,
|
|
26
|
-
DesignPoints,
|
|
27
|
-
DiscretePhase,
|
|
28
|
-
DiscretePhaseHistogram,
|
|
29
|
-
DynamicMesh,
|
|
30
|
-
EChemistry,
|
|
31
|
-
Energy,
|
|
32
|
-
ExecuteCommands,
|
|
33
|
-
ExpressionVolumes,
|
|
34
|
-
FluidCellZone,
|
|
35
|
-
FluidCellZones,
|
|
36
|
-
FluidMaterial,
|
|
37
|
-
FluidMaterials,
|
|
38
|
-
Fluxes,
|
|
39
|
-
General,
|
|
40
|
-
Graphics,
|
|
41
|
-
GroupSurfaces,
|
|
42
|
-
Histogram,
|
|
43
|
-
ImprintSurfaces,
|
|
44
|
-
Initialization,
|
|
45
|
-
Injections,
|
|
46
|
-
InputParameters,
|
|
47
|
-
InteriorBoundaries,
|
|
48
|
-
InteriorBoundary,
|
|
49
|
-
InterpolatedData,
|
|
50
|
-
IsoClips,
|
|
51
|
-
IsoSurfaces,
|
|
52
|
-
LICs,
|
|
53
|
-
LineSurfaces,
|
|
54
|
-
Materials,
|
|
55
|
-
Meshes,
|
|
56
|
-
MeshInterfaces,
|
|
57
|
-
Methods,
|
|
58
|
-
Models,
|
|
59
|
-
Monitor,
|
|
60
|
-
Multiphase,
|
|
61
|
-
NamedExpressions,
|
|
62
|
-
Optics,
|
|
63
|
-
OutputParameters,
|
|
64
|
-
ParametricStudies,
|
|
65
|
-
ParametricStudy,
|
|
66
|
-
ParticleTracks,
|
|
67
|
-
PartitionSurfaces,
|
|
68
|
-
Pathlines,
|
|
69
|
-
Pemfc,
|
|
70
|
-
PlaneSlices,
|
|
71
|
-
PlaneSurface,
|
|
72
|
-
PlaneSurfaces,
|
|
73
|
-
Plots,
|
|
74
|
-
PointSurfaces,
|
|
75
|
-
PressureOutlet,
|
|
76
|
-
PressureOutlets,
|
|
77
|
-
ProfileData,
|
|
78
|
-
QuadricSurfaces,
|
|
79
|
-
Radiation,
|
|
80
|
-
RakeSurfaces,
|
|
81
|
-
ReferenceFrame,
|
|
82
|
-
ReferenceFrames,
|
|
83
|
-
ReferenceValues,
|
|
84
|
-
Report,
|
|
85
|
-
ReportDefinitions,
|
|
86
|
-
ReportFile,
|
|
87
|
-
ReportFiles,
|
|
88
|
-
ReportPlot,
|
|
89
|
-
ReportPlots,
|
|
90
|
-
Residual,
|
|
91
|
-
Results,
|
|
92
|
-
RunCalculation,
|
|
93
|
-
SceneAnimation,
|
|
94
|
-
Scenes,
|
|
95
|
-
Setup,
|
|
96
|
-
SimulationReports,
|
|
97
|
-
Sofc,
|
|
98
|
-
SolidMaterial,
|
|
99
|
-
SolidMaterials,
|
|
100
|
-
Solution,
|
|
101
|
-
Species,
|
|
102
|
-
SphereSlices,
|
|
103
|
-
Structure,
|
|
104
|
-
SurfaceCells,
|
|
105
|
-
SurfaceIntegrals,
|
|
106
|
-
Surfaces,
|
|
107
|
-
SystemCoupling,
|
|
108
|
-
TransformSurfaces,
|
|
109
|
-
Vectors,
|
|
110
|
-
VelocityInlet,
|
|
111
|
-
VelocityInlets,
|
|
112
|
-
VirtualBladeModel,
|
|
113
|
-
Viscous,
|
|
114
|
-
VolumeIntegrals,
|
|
115
|
-
WallBoundaries,
|
|
116
|
-
WallBoundary,
|
|
117
|
-
XYPlots,
|
|
118
|
-
ZoneSurfaces,
|
|
119
|
-
)
|
|
120
|
-
except ImportError:
|
|
121
|
-
pass # for no-codegen testing workflow
|
|
122
|
-
import ansys.fluent.core as pyfluent
|
|
123
|
-
from ansys.fluent.core.examples import download_file
|
|
124
|
-
from ansys.fluent.core.utils.fluent_version import FluentVersion
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
@pytest.mark.codegen_required
|
|
128
|
-
def test_builtin_settings(mixing_elbow_case_data_session):
|
|
129
|
-
solver = mixing_elbow_case_data_session
|
|
130
|
-
fluent_version = solver.get_fluent_version()
|
|
131
|
-
assert Setup(settings_source=solver) == solver.setup
|
|
132
|
-
assert General(settings_source=solver) == solver.setup.general
|
|
133
|
-
assert Models(settings_source=solver) == solver.setup.models
|
|
134
|
-
assert Multiphase(settings_source=solver) == solver.setup.models.multiphase
|
|
135
|
-
assert Energy(settings_source=solver) == solver.setup.models.energy
|
|
136
|
-
assert Viscous(settings_source=solver) == solver.setup.models.viscous
|
|
137
|
-
if fluent_version >= FluentVersion.v232:
|
|
138
|
-
assert Radiation(settings_source=solver) == solver.setup.models.radiation
|
|
139
|
-
else:
|
|
140
|
-
with pytest.raises(RuntimeError):
|
|
141
|
-
Radiation(settings_source=solver)
|
|
142
|
-
if fluent_version >= FluentVersion.v232:
|
|
143
|
-
assert Species(settings_source=solver) == solver.setup.models.species
|
|
144
|
-
else:
|
|
145
|
-
with pytest.raises(RuntimeError):
|
|
146
|
-
Species(settings_source=solver)
|
|
147
|
-
if fluent_version >= FluentVersion.v231:
|
|
148
|
-
assert (
|
|
149
|
-
DiscretePhase(settings_source=solver) == solver.setup.models.discrete_phase
|
|
150
|
-
)
|
|
151
|
-
else:
|
|
152
|
-
with pytest.raises(RuntimeError):
|
|
153
|
-
DiscretePhase(settings_source=solver)
|
|
154
|
-
if fluent_version >= FluentVersion.v231:
|
|
155
|
-
assert (
|
|
156
|
-
Injections(settings_source=solver)
|
|
157
|
-
== solver.setup.models.discrete_phase.injections
|
|
158
|
-
)
|
|
159
|
-
else:
|
|
160
|
-
with pytest.raises(RuntimeError):
|
|
161
|
-
Injections(settings_source=solver)
|
|
162
|
-
if fluent_version >= FluentVersion.v231:
|
|
163
|
-
assert (
|
|
164
|
-
VirtualBladeModel(settings_source=solver)
|
|
165
|
-
== solver.setup.models.virtual_blade_model
|
|
166
|
-
)
|
|
167
|
-
else:
|
|
168
|
-
with pytest.raises(RuntimeError):
|
|
169
|
-
VirtualBladeModel(settings_source=solver)
|
|
170
|
-
if fluent_version >= FluentVersion.v231:
|
|
171
|
-
assert Optics(settings_source=solver) == solver.setup.models.optics
|
|
172
|
-
else:
|
|
173
|
-
with pytest.raises(RuntimeError):
|
|
174
|
-
Optics(settings_source=solver)
|
|
175
|
-
if fluent_version >= FluentVersion.v232:
|
|
176
|
-
assert Structure(settings_source=solver) == solver.setup.models.structure
|
|
177
|
-
else:
|
|
178
|
-
with pytest.raises(RuntimeError):
|
|
179
|
-
Structure(settings_source=solver)
|
|
180
|
-
if fluent_version >= FluentVersion.v232:
|
|
181
|
-
assert Ablation(settings_source=solver) == solver.setup.models.ablation
|
|
182
|
-
else:
|
|
183
|
-
with pytest.raises(RuntimeError):
|
|
184
|
-
Ablation(settings_source=solver)
|
|
185
|
-
if fluent_version >= FluentVersion.v241:
|
|
186
|
-
assert EChemistry(settings_source=solver) == solver.setup.models.echemistry
|
|
187
|
-
else:
|
|
188
|
-
with pytest.raises(RuntimeError):
|
|
189
|
-
EChemistry(settings_source=solver)
|
|
190
|
-
if fluent_version >= FluentVersion.v241:
|
|
191
|
-
assert Battery(settings_source=solver) == solver.setup.models.battery
|
|
192
|
-
else:
|
|
193
|
-
with pytest.raises(RuntimeError):
|
|
194
|
-
Battery(settings_source=solver)
|
|
195
|
-
if fluent_version >= FluentVersion.v241:
|
|
196
|
-
assert (
|
|
197
|
-
SystemCoupling(settings_source=solver)
|
|
198
|
-
== solver.setup.models.system_coupling
|
|
199
|
-
)
|
|
200
|
-
else:
|
|
201
|
-
with pytest.raises(RuntimeError):
|
|
202
|
-
SystemCoupling(settings_source=solver)
|
|
203
|
-
if fluent_version >= FluentVersion.v241:
|
|
204
|
-
assert Sofc(settings_source=solver) == solver.setup.models.sofc
|
|
205
|
-
else:
|
|
206
|
-
with pytest.raises(RuntimeError):
|
|
207
|
-
Sofc(settings_source=solver)
|
|
208
|
-
if fluent_version >= FluentVersion.v242:
|
|
209
|
-
assert Pemfc(settings_source=solver) == solver.setup.models.pemfc
|
|
210
|
-
else:
|
|
211
|
-
with pytest.raises(RuntimeError):
|
|
212
|
-
Pemfc(settings_source=solver)
|
|
213
|
-
assert Materials(settings_source=solver) == solver.setup.materials
|
|
214
|
-
assert FluidMaterials(settings_source=solver) == solver.setup.materials.fluid
|
|
215
|
-
assert (
|
|
216
|
-
FluidMaterial(settings_source=solver, name="air")
|
|
217
|
-
== solver.setup.materials.fluid["air"]
|
|
218
|
-
)
|
|
219
|
-
assert SolidMaterials(settings_source=solver) == solver.setup.materials.solid
|
|
220
|
-
assert (
|
|
221
|
-
SolidMaterial(settings_source=solver, name="aluminum")
|
|
222
|
-
== solver.setup.materials.solid["aluminum"]
|
|
223
|
-
)
|
|
224
|
-
assert (
|
|
225
|
-
CellZoneConditions(settings_source=solver) == solver.setup.cell_zone_conditions
|
|
226
|
-
)
|
|
227
|
-
if fluent_version >= FluentVersion.v231:
|
|
228
|
-
assert (
|
|
229
|
-
CellZoneCondition(settings_source=solver, name="elbow-fluid")
|
|
230
|
-
== solver.setup.cell_zone_conditions["elbow-fluid"]
|
|
231
|
-
)
|
|
232
|
-
else:
|
|
233
|
-
with pytest.raises(RuntimeError):
|
|
234
|
-
CellZoneCondition(settings_source=solver, name="elbow-fluid")
|
|
235
|
-
assert (
|
|
236
|
-
FluidCellZones(settings_source=solver)
|
|
237
|
-
== solver.setup.cell_zone_conditions.fluid
|
|
238
|
-
)
|
|
239
|
-
assert (
|
|
240
|
-
FluidCellZone(settings_source=solver, name="elbow-fluid")
|
|
241
|
-
== solver.setup.cell_zone_conditions.fluid["elbow-fluid"]
|
|
242
|
-
)
|
|
243
|
-
assert (
|
|
244
|
-
BoundaryConditions(settings_source=solver) == solver.setup.boundary_conditions
|
|
245
|
-
)
|
|
246
|
-
if fluent_version >= FluentVersion.v231:
|
|
247
|
-
assert (
|
|
248
|
-
BoundaryCondition(settings_source=solver, name="cold-inlet")
|
|
249
|
-
== solver.setup.boundary_conditions["cold-inlet"]
|
|
250
|
-
)
|
|
251
|
-
else:
|
|
252
|
-
with pytest.raises(RuntimeError):
|
|
253
|
-
BoundaryCondition(settings_source=solver, name="cold-inlet")
|
|
254
|
-
with pytest.raises(TypeError):
|
|
255
|
-
BoundaryCondition(settings_source=solver, new_instance_name="bc-1")
|
|
256
|
-
assert (
|
|
257
|
-
VelocityInlets(settings_source=solver)
|
|
258
|
-
== solver.setup.boundary_conditions.velocity_inlet
|
|
259
|
-
)
|
|
260
|
-
assert (
|
|
261
|
-
VelocityInlet(settings_source=solver, name="cold-inlet")
|
|
262
|
-
== solver.setup.boundary_conditions.velocity_inlet["cold-inlet"]
|
|
263
|
-
)
|
|
264
|
-
assert (
|
|
265
|
-
InteriorBoundaries(settings_source=solver)
|
|
266
|
-
== solver.setup.boundary_conditions.interior
|
|
267
|
-
)
|
|
268
|
-
assert (
|
|
269
|
-
InteriorBoundary(settings_source=solver, name="interior--elbow-fluid")
|
|
270
|
-
== solver.setup.boundary_conditions.interior["interior--elbow-fluid"]
|
|
271
|
-
)
|
|
272
|
-
assert (
|
|
273
|
-
PressureOutlets(settings_source=solver)
|
|
274
|
-
== solver.setup.boundary_conditions.pressure_outlet
|
|
275
|
-
)
|
|
276
|
-
assert (
|
|
277
|
-
PressureOutlet(settings_source=solver, name="outlet")
|
|
278
|
-
== solver.setup.boundary_conditions.pressure_outlet["outlet"]
|
|
279
|
-
)
|
|
280
|
-
assert (
|
|
281
|
-
WallBoundaries(settings_source=solver) == solver.setup.boundary_conditions.wall
|
|
282
|
-
)
|
|
283
|
-
assert (
|
|
284
|
-
WallBoundary(settings_source=solver, name="wall-elbow")
|
|
285
|
-
== solver.setup.boundary_conditions.wall["wall-elbow"]
|
|
286
|
-
)
|
|
287
|
-
if fluent_version >= FluentVersion.v231 and fluent_version < FluentVersion.v251:
|
|
288
|
-
with pytest.raises(AttributeError):
|
|
289
|
-
WallBoundary(settings_source=solver, new_instance_name="wall-1")
|
|
290
|
-
if fluent_version >= FluentVersion.v232:
|
|
291
|
-
assert MeshInterfaces(settings_source=solver) == solver.setup.mesh_interfaces
|
|
292
|
-
else:
|
|
293
|
-
with pytest.raises(RuntimeError):
|
|
294
|
-
MeshInterfaces(settings_source=solver)
|
|
295
|
-
if fluent_version >= FluentVersion.v251:
|
|
296
|
-
assert DynamicMesh(settings_source=solver) == solver.setup.dynamic_mesh
|
|
297
|
-
else:
|
|
298
|
-
with pytest.raises(RuntimeError):
|
|
299
|
-
DynamicMesh(settings_source=solver)
|
|
300
|
-
assert ReferenceValues(settings_source=solver) == solver.setup.reference_values
|
|
301
|
-
if fluent_version >= FluentVersion.v232:
|
|
302
|
-
assert ReferenceFrames(settings_source=solver) == solver.setup.reference_frames
|
|
303
|
-
else:
|
|
304
|
-
with pytest.raises(RuntimeError):
|
|
305
|
-
ReferenceFrames(settings_source=solver)
|
|
306
|
-
if fluent_version >= FluentVersion.v232:
|
|
307
|
-
# Fluent 25.1 issue
|
|
308
|
-
if fluent_version != FluentVersion.v251:
|
|
309
|
-
assert (
|
|
310
|
-
ReferenceFrame(settings_source=solver, name="global")
|
|
311
|
-
== solver.setup.reference_frames["global"]
|
|
312
|
-
)
|
|
313
|
-
else:
|
|
314
|
-
with pytest.raises(RuntimeError):
|
|
315
|
-
ReferenceFrame(settings_source=solver, name="global")
|
|
316
|
-
if fluent_version >= FluentVersion.v232:
|
|
317
|
-
assert (
|
|
318
|
-
NamedExpressions(settings_source=solver) == solver.setup.named_expressions
|
|
319
|
-
)
|
|
320
|
-
else:
|
|
321
|
-
with pytest.raises(RuntimeError):
|
|
322
|
-
NamedExpressions(settings_source=solver)
|
|
323
|
-
assert Methods(settings_source=solver) == solver.solution.methods
|
|
324
|
-
assert Controls(settings_source=solver) == solver.solution.controls
|
|
325
|
-
assert (
|
|
326
|
-
ReportDefinitions(settings_source=solver) == solver.solution.report_definitions
|
|
327
|
-
)
|
|
328
|
-
if fluent_version >= FluentVersion.v231:
|
|
329
|
-
assert Monitor(settings_source=solver) == solver.solution.monitor
|
|
330
|
-
if fluent_version >= FluentVersion.v241:
|
|
331
|
-
assert Residual(settings_source=solver) == solver.solution.monitor.residual
|
|
332
|
-
else:
|
|
333
|
-
with pytest.raises(RuntimeError):
|
|
334
|
-
Residual(settings_source=solver)
|
|
335
|
-
assert (
|
|
336
|
-
ReportFiles(settings_source=solver) == solver.solution.monitor.report_files
|
|
337
|
-
)
|
|
338
|
-
assert (
|
|
339
|
-
ReportFile(settings_source=solver, new_instance_name="report-file-1")
|
|
340
|
-
== solver.solution.monitor.report_files["report-file-1"]
|
|
341
|
-
)
|
|
342
|
-
assert (
|
|
343
|
-
ReportFile(settings_source=solver, name="report-file-1")
|
|
344
|
-
== solver.solution.monitor.report_files["report-file-1"]
|
|
345
|
-
)
|
|
346
|
-
if fluent_version >= FluentVersion.v251:
|
|
347
|
-
assert (
|
|
348
|
-
ReportFile(settings_source=solver)
|
|
349
|
-
== solver.solution.monitor.report_files["report-file-2"]
|
|
350
|
-
)
|
|
351
|
-
assert (
|
|
352
|
-
ReportPlots(settings_source=solver) == solver.solution.monitor.report_plots
|
|
353
|
-
)
|
|
354
|
-
assert (
|
|
355
|
-
ReportPlot(settings_source=solver, new_instance_name="report-plot-1")
|
|
356
|
-
== solver.solution.monitor.report_plots["report-plot-1"]
|
|
357
|
-
)
|
|
358
|
-
assert (
|
|
359
|
-
ReportPlot(settings_source=solver, name="report-plot-1")
|
|
360
|
-
== solver.solution.monitor.report_plots["report-plot-1"]
|
|
361
|
-
)
|
|
362
|
-
if fluent_version >= FluentVersion.v251:
|
|
363
|
-
assert (
|
|
364
|
-
ReportPlot(settings_source=solver)
|
|
365
|
-
== solver.solution.monitor.report_plots["report-plot-2"]
|
|
366
|
-
)
|
|
367
|
-
assert (
|
|
368
|
-
ConvergenceConditions(settings_source=solver)
|
|
369
|
-
== solver.solution.monitor.convergence_conditions
|
|
370
|
-
)
|
|
371
|
-
else:
|
|
372
|
-
with pytest.raises(RuntimeError):
|
|
373
|
-
Monitor(settings_source=solver)
|
|
374
|
-
if fluent_version >= FluentVersion.v231:
|
|
375
|
-
assert CellRegisters(settings_source=solver) == solver.solution.cell_registers
|
|
376
|
-
assert (
|
|
377
|
-
CellRegister(settings_source=solver, new_instance_name="cell_register_1")
|
|
378
|
-
== solver.solution.cell_registers["cell_register_1"]
|
|
379
|
-
)
|
|
380
|
-
assert (
|
|
381
|
-
CellRegister(settings_source=solver, name="cell_register_1")
|
|
382
|
-
== solver.solution.cell_registers["cell_register_1"]
|
|
383
|
-
)
|
|
384
|
-
if fluent_version >= FluentVersion.v251:
|
|
385
|
-
assert (
|
|
386
|
-
CellRegister(settings_source=solver)
|
|
387
|
-
== solver.solution.cell_registers["cell_register_2"]
|
|
388
|
-
)
|
|
389
|
-
else:
|
|
390
|
-
with pytest.raises(RuntimeError):
|
|
391
|
-
CellRegisters(settings_source=solver)
|
|
392
|
-
assert Initialization(settings_source=solver) == solver.solution.initialization
|
|
393
|
-
if fluent_version >= FluentVersion.v231:
|
|
394
|
-
assert (
|
|
395
|
-
CalculationActivity(settings_source=solver)
|
|
396
|
-
== solver.solution.calculation_activity
|
|
397
|
-
)
|
|
398
|
-
assert (
|
|
399
|
-
ExecuteCommands(settings_source=solver)
|
|
400
|
-
== solver.solution.calculation_activity.execute_commands
|
|
401
|
-
)
|
|
402
|
-
if fluent_version >= FluentVersion.v241:
|
|
403
|
-
assert (
|
|
404
|
-
CaseModification(settings_source=solver)
|
|
405
|
-
== solver.solution.calculation_activity.case_modification
|
|
406
|
-
)
|
|
407
|
-
else:
|
|
408
|
-
with pytest.raises(RuntimeError):
|
|
409
|
-
CaseModification(settings_source=solver)
|
|
410
|
-
else:
|
|
411
|
-
with pytest.raises(RuntimeError):
|
|
412
|
-
CalculationActivity(settings_source=solver)
|
|
413
|
-
assert RunCalculation(settings_source=solver) == solver.solution.run_calculation
|
|
414
|
-
assert Solution(settings_source=solver) == solver.solution
|
|
415
|
-
assert Results(settings_source=solver) == solver.results
|
|
416
|
-
assert Surfaces(settings_source=solver) == solver.results.surfaces
|
|
417
|
-
if fluent_version >= FluentVersion.v232:
|
|
418
|
-
assert (
|
|
419
|
-
PointSurfaces(settings_source=solver)
|
|
420
|
-
== solver.results.surfaces.point_surface
|
|
421
|
-
)
|
|
422
|
-
assert (
|
|
423
|
-
LineSurfaces(settings_source=solver) == solver.results.surfaces.line_surface
|
|
424
|
-
)
|
|
425
|
-
assert (
|
|
426
|
-
RakeSurfaces(settings_source=solver) == solver.results.surfaces.rake_surface
|
|
427
|
-
)
|
|
428
|
-
assert (
|
|
429
|
-
IsoSurfaces(settings_source=solver) == solver.results.surfaces.iso_surface
|
|
430
|
-
)
|
|
431
|
-
else:
|
|
432
|
-
with pytest.raises(RuntimeError):
|
|
433
|
-
PointSurfaces(settings_source=solver)
|
|
434
|
-
with pytest.raises(RuntimeError):
|
|
435
|
-
LineSurfaces(settings_source=solver)
|
|
436
|
-
with pytest.raises(RuntimeError):
|
|
437
|
-
RakeSurfaces(settings_source=solver)
|
|
438
|
-
with pytest.raises(RuntimeError):
|
|
439
|
-
IsoSurfaces(settings_source=solver)
|
|
440
|
-
assert (
|
|
441
|
-
PlaneSurfaces(settings_source=solver) == solver.results.surfaces.plane_surface
|
|
442
|
-
)
|
|
443
|
-
assert (
|
|
444
|
-
PlaneSurface(settings_source=solver, new_instance_name="plane-1")
|
|
445
|
-
== solver.results.surfaces.plane_surface["plane-1"]
|
|
446
|
-
)
|
|
447
|
-
assert (
|
|
448
|
-
PlaneSurface(settings_source=solver, name="plane-1")
|
|
449
|
-
== solver.results.surfaces.plane_surface["plane-1"]
|
|
450
|
-
)
|
|
451
|
-
if fluent_version >= FluentVersion.v241:
|
|
452
|
-
assert IsoClips(settings_source=solver) == solver.results.surfaces.iso_clip
|
|
453
|
-
else:
|
|
454
|
-
with pytest.raises(RuntimeError):
|
|
455
|
-
IsoClips(settings_source=solver)
|
|
456
|
-
if fluent_version >= FluentVersion.v241:
|
|
457
|
-
assert (
|
|
458
|
-
ZoneSurfaces(settings_source=solver) == solver.results.surfaces.zone_surface
|
|
459
|
-
)
|
|
460
|
-
assert (
|
|
461
|
-
PartitionSurfaces(settings_source=solver)
|
|
462
|
-
== solver.results.surfaces.partition_surface
|
|
463
|
-
)
|
|
464
|
-
assert (
|
|
465
|
-
TransformSurfaces(settings_source=solver)
|
|
466
|
-
== solver.results.surfaces.transform_surface
|
|
467
|
-
)
|
|
468
|
-
assert (
|
|
469
|
-
ImprintSurfaces(settings_source=solver)
|
|
470
|
-
== solver.results.surfaces.imprint_surface
|
|
471
|
-
)
|
|
472
|
-
assert (
|
|
473
|
-
PlaneSlices(settings_source=solver) == solver.results.surfaces.plane_slice
|
|
474
|
-
)
|
|
475
|
-
assert (
|
|
476
|
-
SphereSlices(settings_source=solver) == solver.results.surfaces.sphere_slice
|
|
477
|
-
)
|
|
478
|
-
assert (
|
|
479
|
-
QuadricSurfaces(settings_source=solver)
|
|
480
|
-
== solver.results.surfaces.quadric_surface
|
|
481
|
-
)
|
|
482
|
-
assert (
|
|
483
|
-
SurfaceCells(settings_source=solver)
|
|
484
|
-
== solver.results.surfaces.surface_cells
|
|
485
|
-
)
|
|
486
|
-
else:
|
|
487
|
-
with pytest.raises(RuntimeError):
|
|
488
|
-
ZoneSurfaces(settings_source=solver)
|
|
489
|
-
with pytest.raises(RuntimeError):
|
|
490
|
-
PartitionSurfaces(settings_source=solver)
|
|
491
|
-
with pytest.raises(RuntimeError):
|
|
492
|
-
TransformSurfaces(settings_source=solver)
|
|
493
|
-
with pytest.raises(RuntimeError):
|
|
494
|
-
ImprintSurfaces(settings_source=solver)
|
|
495
|
-
with pytest.raises(RuntimeError):
|
|
496
|
-
PlaneSlices(settings_source=solver)
|
|
497
|
-
with pytest.raises(RuntimeError):
|
|
498
|
-
SphereSlices(settings_source=solver)
|
|
499
|
-
with pytest.raises(RuntimeError):
|
|
500
|
-
QuadricSurfaces(settings_source=solver)
|
|
501
|
-
with pytest.raises(RuntimeError):
|
|
502
|
-
SurfaceCells(settings_source=solver)
|
|
503
|
-
if fluent_version >= FluentVersion.v251:
|
|
504
|
-
assert (
|
|
505
|
-
ExpressionVolumes(settings_source=solver)
|
|
506
|
-
== solver.results.surfaces.expression_volume
|
|
507
|
-
)
|
|
508
|
-
assert (
|
|
509
|
-
GroupSurfaces(settings_source=solver)
|
|
510
|
-
== solver.results.surfaces.group_surface
|
|
511
|
-
)
|
|
512
|
-
else:
|
|
513
|
-
with pytest.raises(RuntimeError):
|
|
514
|
-
ExpressionVolumes(settings_source=solver)
|
|
515
|
-
with pytest.raises(RuntimeError):
|
|
516
|
-
GroupSurfaces(settings_source=solver)
|
|
517
|
-
assert Graphics(settings_source=solver) == solver.results.graphics
|
|
518
|
-
assert Meshes(settings_source=solver) == solver.results.graphics.mesh
|
|
519
|
-
assert Contours(settings_source=solver) == solver.results.graphics.contour
|
|
520
|
-
assert (
|
|
521
|
-
Contour(settings_source=solver, new_instance_name="contour-1")
|
|
522
|
-
== solver.results.graphics.contour["contour-1"]
|
|
523
|
-
)
|
|
524
|
-
assert (
|
|
525
|
-
Contour(settings_source=solver, name="contour-1")
|
|
526
|
-
== solver.results.graphics.contour["contour-1"]
|
|
527
|
-
)
|
|
528
|
-
assert Vectors(settings_source=solver) == solver.results.graphics.vector
|
|
529
|
-
assert LICs(settings_source=solver) == solver.results.graphics.lic
|
|
530
|
-
if fluent_version >= FluentVersion.v231:
|
|
531
|
-
assert Pathlines(settings_source=solver) == solver.results.graphics.pathline
|
|
532
|
-
assert (
|
|
533
|
-
ParticleTracks(settings_source=solver)
|
|
534
|
-
== solver.results.graphics.particle_track
|
|
535
|
-
)
|
|
536
|
-
assert Plots(settings_source=solver) == solver.results.plot
|
|
537
|
-
assert XYPlots(settings_source=solver) == solver.results.plot.xy_plot
|
|
538
|
-
else:
|
|
539
|
-
with pytest.raises(RuntimeError):
|
|
540
|
-
Pathlines(settings_source=solver)
|
|
541
|
-
with pytest.raises(RuntimeError):
|
|
542
|
-
ParticleTracks(settings_source=solver)
|
|
543
|
-
with pytest.raises(RuntimeError):
|
|
544
|
-
Plots(settings_source=solver)
|
|
545
|
-
with pytest.raises(RuntimeError):
|
|
546
|
-
XYPlots(settings_source=solver)
|
|
547
|
-
if fluent_version >= FluentVersion.v241:
|
|
548
|
-
assert Histogram(settings_source=solver) == solver.results.plot.histogram
|
|
549
|
-
assert (
|
|
550
|
-
CumulativePlots(settings_source=solver)
|
|
551
|
-
== solver.results.plot.cumulative_plot
|
|
552
|
-
)
|
|
553
|
-
else:
|
|
554
|
-
with pytest.raises(RuntimeError):
|
|
555
|
-
Histogram(settings_source=solver)
|
|
556
|
-
with pytest.raises(RuntimeError):
|
|
557
|
-
CumulativePlots(settings_source=solver)
|
|
558
|
-
if fluent_version >= FluentVersion.v242:
|
|
559
|
-
assert ProfileData(settings_source=solver) == solver.results.plot.profile_data
|
|
560
|
-
assert (
|
|
561
|
-
InterpolatedData(settings_source=solver)
|
|
562
|
-
== solver.results.plot.interpolated_data
|
|
563
|
-
)
|
|
564
|
-
else:
|
|
565
|
-
with pytest.raises(RuntimeError):
|
|
566
|
-
ProfileData(settings_source=solver)
|
|
567
|
-
with pytest.raises(RuntimeError):
|
|
568
|
-
InterpolatedData(settings_source=solver)
|
|
569
|
-
if fluent_version >= FluentVersion.v231:
|
|
570
|
-
assert Scenes(settings_source=solver) == solver.results.scene
|
|
571
|
-
else:
|
|
572
|
-
with pytest.raises(RuntimeError):
|
|
573
|
-
Scenes(settings_source=solver)
|
|
574
|
-
if fluent_version >= FluentVersion.v241:
|
|
575
|
-
assert (
|
|
576
|
-
SceneAnimation(settings_source=solver)
|
|
577
|
-
== solver.results.animations.scene_animation
|
|
578
|
-
)
|
|
579
|
-
else:
|
|
580
|
-
with pytest.raises(RuntimeError):
|
|
581
|
-
SceneAnimation(settings_source=solver)
|
|
582
|
-
if fluent_version >= FluentVersion.v231:
|
|
583
|
-
assert Report(settings_source=solver) == solver.results.report
|
|
584
|
-
assert (
|
|
585
|
-
DiscretePhaseHistogram(settings_source=solver)
|
|
586
|
-
== solver.results.report.discrete_phase.histogram
|
|
587
|
-
)
|
|
588
|
-
assert Fluxes(settings_source=solver) == solver.results.report.fluxes
|
|
589
|
-
assert (
|
|
590
|
-
SurfaceIntegrals(settings_source=solver)
|
|
591
|
-
== solver.results.report.surface_integrals
|
|
592
|
-
)
|
|
593
|
-
assert (
|
|
594
|
-
VolumeIntegrals(settings_source=solver)
|
|
595
|
-
== solver.results.report.volume_integrals
|
|
596
|
-
)
|
|
597
|
-
assert (
|
|
598
|
-
SimulationReports(settings_source=solver)
|
|
599
|
-
== solver.results.report.simulation_reports
|
|
600
|
-
)
|
|
601
|
-
else:
|
|
602
|
-
with pytest.raises(RuntimeError):
|
|
603
|
-
Report(settings_source=solver)
|
|
604
|
-
with pytest.raises(RuntimeError):
|
|
605
|
-
DiscretePhaseHistogram(settings_source=solver)
|
|
606
|
-
with pytest.raises(RuntimeError):
|
|
607
|
-
Fluxes(settings_source=solver)
|
|
608
|
-
with pytest.raises(RuntimeError):
|
|
609
|
-
SurfaceIntegrals(settings_source=solver)
|
|
610
|
-
with pytest.raises(RuntimeError):
|
|
611
|
-
VolumeIntegrals(settings_source=solver)
|
|
612
|
-
with pytest.raises(RuntimeError):
|
|
613
|
-
SimulationReports(settings_source=solver)
|
|
614
|
-
if fluent_version >= FluentVersion.v241:
|
|
615
|
-
assert (
|
|
616
|
-
InputParameters(settings_source=solver)
|
|
617
|
-
== solver.parameters.input_parameters
|
|
618
|
-
)
|
|
619
|
-
assert (
|
|
620
|
-
OutputParameters(settings_source=solver)
|
|
621
|
-
== solver.parameters.output_parameters
|
|
622
|
-
)
|
|
623
|
-
else:
|
|
624
|
-
with pytest.raises(RuntimeError):
|
|
625
|
-
InputParameters(settings_source=solver)
|
|
626
|
-
with pytest.raises(RuntimeError):
|
|
627
|
-
OutputParameters(settings_source=solver)
|
|
628
|
-
if fluent_version >= FluentVersion.v251:
|
|
629
|
-
assert (
|
|
630
|
-
CustomFieldFunctions(settings_source=solver)
|
|
631
|
-
== solver.results.custom_field_functions
|
|
632
|
-
)
|
|
633
|
-
else:
|
|
634
|
-
with pytest.raises(RuntimeError):
|
|
635
|
-
CustomFieldFunctions(settings_source=solver)
|
|
636
|
-
if fluent_version >= FluentVersion.v241:
|
|
637
|
-
assert CustomVectors(settings_source=solver) == solver.results.custom_vectors
|
|
638
|
-
else:
|
|
639
|
-
with pytest.raises(RuntimeError):
|
|
640
|
-
CustomVectors(settings_source=solver)
|
|
641
|
-
tmp_save_path = tempfile.mkdtemp(dir=pyfluent.EXAMPLES_PATH)
|
|
642
|
-
project_file = Path(tmp_save_path) / "mixing_elbow_param.flprj"
|
|
643
|
-
solver.settings.parametric_studies.initialize(project_filename=str(project_file))
|
|
644
|
-
assert ParametricStudies(settings_source=solver) == solver.parametric_studies
|
|
645
|
-
assert (
|
|
646
|
-
ParametricStudy(settings_source=solver, name="mixing_elbow-Solve")
|
|
647
|
-
== solver.parametric_studies["mixing_elbow-Solve"]
|
|
648
|
-
)
|
|
649
|
-
assert (
|
|
650
|
-
DesignPoints(settings_source=solver, parametric_studies="mixing_elbow-Solve")
|
|
651
|
-
== solver.parametric_studies["mixing_elbow-Solve"].design_points
|
|
652
|
-
)
|
|
653
|
-
assert (
|
|
654
|
-
DesignPoint(
|
|
655
|
-
settings_source=solver,
|
|
656
|
-
parametric_studies="mixing_elbow-Solve",
|
|
657
|
-
name="Base DP",
|
|
658
|
-
)
|
|
659
|
-
== solver.parametric_studies["mixing_elbow-Solve"].design_points["Base DP"]
|
|
660
|
-
)
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
@pytest.mark.codegen_required
|
|
664
|
-
@pytest.mark.fluent_version(">=23.2")
|
|
665
|
-
def test_builtin_singleton_setting_assign_session(
|
|
666
|
-
new_meshing_session, new_solver_session
|
|
667
|
-
):
|
|
668
|
-
meshing = new_meshing_session
|
|
669
|
-
solver = new_solver_session
|
|
670
|
-
|
|
671
|
-
models = Models()
|
|
672
|
-
assert isinstance(models, Models)
|
|
673
|
-
with pytest.raises(TypeError):
|
|
674
|
-
models.settings_source = meshing
|
|
675
|
-
models.settings_source = solver
|
|
676
|
-
assert models.settings_source == solver.settings
|
|
677
|
-
assert not isinstance(models, Models)
|
|
678
|
-
assert models.path == "setup/models"
|
|
679
|
-
assert not models.is_active()
|
|
680
|
-
case_name = download_file("Static_Mixer_main.cas.h5", "pyfluent/static_mixer")
|
|
681
|
-
solver.file.read(
|
|
682
|
-
file_type="case",
|
|
683
|
-
file_name=case_name,
|
|
684
|
-
lightweight_setup=True,
|
|
685
|
-
)
|
|
686
|
-
assert models.is_active()
|
|
687
|
-
assert models == solver.setup.models
|
|
688
|
-
# TODO: Ideally an AttributeError should be raised here from flobject.py
|
|
689
|
-
with pytest.raises(RuntimeError): # re-assignment is not allowed
|
|
690
|
-
models.settings_source = solver
|
|
691
|
-
|
|
692
|
-
models = Models()
|
|
693
|
-
assert isinstance(models, Models)
|
|
694
|
-
models.settings_source = solver.settings
|
|
695
|
-
assert models == solver.setup.models
|
|
696
|
-
assert models.settings_source == solver.settings
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
@pytest.mark.codegen_required
|
|
700
|
-
@pytest.mark.fluent_version(">=23.2")
|
|
701
|
-
def test_builtin_non_creatable_named_object_setting_assign_session(
|
|
702
|
-
new_meshing_session, static_mixer_case_session
|
|
703
|
-
):
|
|
704
|
-
meshing = new_meshing_session
|
|
705
|
-
solver = static_mixer_case_session
|
|
706
|
-
|
|
707
|
-
inlet = BoundaryCondition(name="inlet1")
|
|
708
|
-
assert isinstance(inlet, BoundaryCondition)
|
|
709
|
-
with pytest.raises(TypeError):
|
|
710
|
-
inlet.settings_source = meshing
|
|
711
|
-
inlet.settings_source = solver
|
|
712
|
-
assert inlet == solver.settings.setup.boundary_conditions["inlet1"]
|
|
713
|
-
assert inlet.settings_source == solver.settings
|
|
714
|
-
# TODO: Ideally an AttributeError should be raised here from flobject.py
|
|
715
|
-
with pytest.raises(RuntimeError): # re-assignment is not allowed
|
|
716
|
-
inlet.settings_source = solver
|
|
717
|
-
|
|
718
|
-
inlet = BoundaryCondition(name="inlet1")
|
|
719
|
-
assert isinstance(inlet, BoundaryCondition)
|
|
720
|
-
inlet.settings_source = solver.settings
|
|
721
|
-
assert inlet == solver.settings.setup.boundary_conditions["inlet1"]
|
|
722
|
-
assert inlet.settings_source == solver.settings
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
@pytest.mark.codegen_required
|
|
726
|
-
@pytest.mark.fluent_version(">=23.2")
|
|
727
|
-
def test_builtin_creatable_named_object_setting_assign_session(
|
|
728
|
-
new_meshing_session, static_mixer_case_session
|
|
729
|
-
):
|
|
730
|
-
meshing = new_meshing_session
|
|
731
|
-
solver = static_mixer_case_session
|
|
732
|
-
|
|
733
|
-
report_file = ReportFile(new_instance_name="report-file-1")
|
|
734
|
-
assert isinstance(report_file, ReportFile)
|
|
735
|
-
with pytest.raises(TypeError):
|
|
736
|
-
report_file.settings_source = meshing
|
|
737
|
-
report_file.settings_source = solver
|
|
738
|
-
assert report_file == solver.solution.monitor.report_files["report-file-1"]
|
|
739
|
-
assert report_file.settings_source == solver.settings
|
|
740
|
-
# TODO: Ideally an AttributeError should be raised here from flobject.py
|
|
741
|
-
with pytest.raises(RuntimeError): # re-assignment is not allowed
|
|
742
|
-
report_file.settings_source = solver
|
|
743
|
-
|
|
744
|
-
report_file = ReportFile(name="report-file-1")
|
|
745
|
-
assert isinstance(report_file, ReportFile)
|
|
746
|
-
report_file.settings_source = solver
|
|
747
|
-
assert report_file == solver.solution.monitor.report_files["report-file-1"]
|
|
748
|
-
assert report_file.settings_source == solver.settings
|
|
749
|
-
|
|
750
|
-
report_file = ReportFile(name="report-file-1")
|
|
751
|
-
assert isinstance(report_file, ReportFile)
|
|
752
|
-
report_file.settings_source = solver.settings
|
|
753
|
-
assert report_file == solver.solution.monitor.report_files["report-file-1"]
|
|
754
|
-
assert report_file.settings_source == solver.settings
|
|
755
|
-
|
|
756
|
-
if solver.get_fluent_version() >= FluentVersion.v251:
|
|
757
|
-
report_file = ReportFile()
|
|
758
|
-
assert isinstance(report_file, ReportFile)
|
|
759
|
-
report_file.settings_source = solver
|
|
760
|
-
assert report_file == solver.solution.monitor.report_files["report-file-2"]
|
|
761
|
-
assert report_file.settings_source == solver.settings
|