Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions examples/00-fluent/brake.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@
"filled": True,
}

session.settings.results.graphics.contour["temperature"] = {}
session.settings.results.graphics.contour["temperature"] = {
"field": "temperature",
"surfaces_list": "wall*",
Expand All @@ -233,19 +232,21 @@
"bground_color": "#CCD3E2",
"title_elements": "Variable and Object Name",
},
"range_option": {
"option": "auto-range-off",
"auto_range_off": {"maximum": 400.0, "minimum": 300, "clip_to_range": False},
},
}

session.settings.results.graphics.contour["temperature"].range_option.option = (
"auto-range-off"
)
session.settings.results.graphics.contour["temperature"].range_option.set_state(
{
"auto_range_off": {"maximum": 400.0, "minimum": 300, "clip_to_range": False},
}
)

session.settings.results.graphics.views.restore_view(view_name="top")
session.settings.results.graphics.views.camera.zoom(factor=2)
session.settings.results.graphics.views.save_view(view_name="animation-view")

session.settings.solution.calculation_activity.solution_animations[
"animate-temperature"
] = {}
session.settings.solution.calculation_activity.solution_animations[
"animate-temperature"
] = {
Expand Down
6 changes: 4 additions & 2 deletions examples/00-fluent/parametric_static_mixer_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@

solver_session.settings.parametric_studies[
"Static_Mixer_main-Solve"
].design_points.create_1(write_data=False, capture_simulation_report_data=True)
].design_points.create(write_data=False, capture_simulation_report_data=True)

solver_session.settings.parametric_studies["Static_Mixer_main-Solve"].design_points[
"DP1"
Expand Down Expand Up @@ -319,7 +319,9 @@
precision="double", processor_count=2, mode="solver"
)

project_filepath_read = str(Path(pyfluent.EXAMPLES_PATH) / "static_mixer_study.flprj")
project_filepath_read = str(
Path(pyfluent.EXAMPLES_PATH) / "static_mixer_study_save.flprj"
)

solver_session.settings.file.parametric_project.open(
project_filename=project_filepath_read, load_case=True
Expand Down
16 changes: 11 additions & 5 deletions examples/00-fluent/radiation_headlamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
bezel_enc_bc.thermal.material = "plastic"
bezel_enc_bc.radiation.radiation_bc = "Opaque"
bezel_enc_bc.radiation.internal_emissivity = 1
bezel_enc_bc.radiation.diffuse_fraction_band = {"s-": 1}
bezel_enc_bc.radiation.diffuse_irradiation_settings.diffuse_fraction_band = {"s-": 1}

# Get list of wall zones
bc_state = solver.settings.setup.boundary_conditions.get_state()
Expand All @@ -389,7 +389,7 @@
enc_lens_bc = solver.settings.setup.boundary_conditions.wall["enclosure-lens"]
enc_lens_bc.thermal.material = "glass"
enc_lens_bc.radiation.radiation_bc = "Semi Transparent"
enc_lens_bc.radiation.diffuse_fraction_band = {"s-": 0}
enc_lens_bc.radiation.diffuse_irradiation_settings.diffuse_fraction_band = {"s-": 0}

# Copy enclosure-lens BC to other lens boundary
solver.settings.setup.boundary_conditions.copy(
Expand All @@ -407,7 +407,9 @@
enc_rim_bezel_bc.thermal.material = "plastic"
enc_rim_bezel_bc.radiation.radiation_bc = "Opaque"
enc_rim_bezel_bc.radiation.internal_emissivity = 0.16
enc_rim_bezel_bc.radiation.diffuse_fraction_band = {"s-": 0.1}
enc_rim_bezel_bc.radiation.diffuse_irradiation_settings.diffuse_fraction_band = {
"s-": 0.1
}

# Copy enclosure-rim-bezel BC to other rim bezel boundaries
solver.settings.setup.boundary_conditions.copy(
Expand Down Expand Up @@ -440,8 +442,12 @@
rad_input_bc.thermal.thermal_condition = "Temperature"
rad_input_bc.thermal.temperature.value = 298.15
rad_input_bc.radiation.boundary_source = True
rad_input_bc.radiation.direct_irradiation = {"s-": 1200}
rad_input_bc.radiation.reference_direction = [-0.848, 0, -0.53]
rad_input_bc.radiation.direct_irradiation_settings.direct_irradiation = {"s-": 1200}
rad_input_bc.radiation.direct_irradiation_settings.reference_direction = [
-0.848,
0,
-0.53,
]

###########################################################################################################
# Set convergence criteria
Expand Down