Skip to content

Commit

Permalink
Update examples/gallery/08_lucid_generic_f1_rear_wing.py
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Walters <[email protected]>
  • Loading branch information
agvarghe and waltersma committed Jul 11, 2023
1 parent 3201c07 commit b9290b4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions examples/gallery/08_lucid_generic_f1_rear_wing.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# Import geometry
# ~~~~~~~~~~~~~~~
# Download the Generic F1 rear wing geometries (stl files).
# Import each geometry from the example folder.
# Import each geometry and append to the model.
# Display the imported geometry.

f1_rw_drs = prime.examples.download_f1_rw_drs_stl()
Expand All @@ -73,7 +73,7 @@

display = Graphics(model)
scope = prime.ScopeDefinition(model, part_expression="* !*enclosure*")

display(scope)
###############################################################################
# Merge Parts
# ~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -124,19 +124,7 @@
# mesh according to the curvature of the DRS surfaces.
# Additionally, to accurately capture the curved surfaces of other sections of the
# wing, curvature control is defined with a normal angle of 18 degrees.
# A volumetric size field is then computed based on the defined size control.

# Local Curvature size control on all components
curv_size_control_global = model.control_data.create_size_control(prime.SizingType.CURVATURE)
curv_size_params_global = prime.CurvatureSizingParams(model, normal_angle=18, min=8)
curv_size_control_global.set_curvature_sizing_params(curv_size_params_global)
curv_scope = prime.ScopeDefinition(
model,
entity_type=prime.ScopeEntity.FACEZONELETS,
part_expression="f1_car_rear_wing*",
)
curv_size_control_global.set_scope(curv_scope)
curv_size_control_global.set_suggested_name("curvature_global")
# A volumetric size field is then computed based on the defined size controls.

# local Curvature size control for DRS
curv_size_control = model.control_data.create_size_control(prime.SizingType.CURVATURE)
Expand All @@ -151,6 +139,18 @@
curv_size_control.set_scope(curv_scope)
curv_size_control.set_suggested_name("curvature_drs")

# Global Curvature size control on all face zones of the rear wing
curv_size_control_global = model.control_data.create_size_control(prime.SizingType.CURVATURE)
curv_size_params_global = prime.CurvatureSizingParams(model, normal_angle=18, min=8)
curv_size_control_global.set_curvature_sizing_params(curv_size_params_global)
curv_scope = prime.ScopeDefinition(
model,
entity_type=prime.ScopeEntity.FACEZONELETS,
part_expression="f1_car_rear_wing*",
)
curv_size_control_global.set_scope(curv_scope)
curv_size_control_global.set_suggested_name("curvature_global")

# Compute volumetric sizefield
compute_size = prime.SizeField(model)
vol_sf_params = prime.VolumetricSizeFieldComputeParams(model)
Expand Down

0 comments on commit b9290b4

Please sign in to comment.