Skip to content
Open
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
6 changes: 6 additions & 0 deletions flow360/component/simulation/meshing_param/face_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from flow360.component.simulation.framework.entity_base import EntityList
from flow360.component.simulation.primitives import Surface
from flow360.component.simulation.unit_system import LengthType
import flow360.component.simulation.units as u
from flow360.component.simulation.validation.validation_context import (
get_validation_info,
)
Expand Down Expand Up @@ -77,6 +78,11 @@ class GeometryRefinement(Flow360BaseModel):
+ "to geometry_accuracy should be resolved accurately during the surface meshing process.",
)

healing_gap_size: Optional[LengthType.NonNegative] = pd.Field(
0.0 * u.m,
description="FFlag that defines the threshold size below which all geometry gaps are automatically closed..",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate "F" and "."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Threshold size below which all geometry gaps are automatically closed. Zero is deactivated."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to decide if we're going to call this feature gap healing or gap sealing. I prefer the latter since it will seal physical gaps, even if the input geometry is completely clean and there's nothing to heal.

)

# Note: No checking on deleted surfaces since geometry accuracy on deleted surface does impact the volume mesh.

@pd.model_validator(mode="after")
Expand Down
7 changes: 7 additions & 0 deletions flow360/component/simulation/meshing_param/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ class MeshingDefaults(Flow360BaseModel):
+ "This can be overridden with class: ~flow360.GeometryRefinement",
)

healing_gap_size: Optional[LengthType.NonNegative] = pd.Field(
0.0 * u.m,
description="FFlag that defines the threshold size below which all geometry gaps are automatically closed..",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate "F" and "."

)


@pd.field_validator("number_of_boundary_layers", mode="after")
@classmethod
def invalid_number_of_boundary_layers(cls, value):
Expand Down Expand Up @@ -201,6 +207,7 @@ def invalid_geometry_accuracy(cls, value):
"surface_max_aspect_ratio",
"surface_max_adaptation_iterations",
"preserve_thin_geometry",
"healing_gap_size",
mode="after",
)
@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def _get_surface_refinements(refinement_list: list[dict]):
"preserve_thin_geometry": None,
"surface_max_aspect_ratio": None,
"surface_max_adaptation_iterations": None,
"healing_gap_size": None
},
"refinements": _get_surface_refinements,
},
Expand Down
3 changes: 2 additions & 1 deletion tests/ref/simulation/service_init_geometry.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"value": 12.0,
"units": "degree"
},
"preserve_thin_geometry": false
"preserve_thin_geometry": false,
"healing_gap_size": 0.0
},
"refinements": [],
"volume_zones": [
Expand Down
3 changes: 2 additions & 1 deletion tests/ref/simulation/service_init_surface_mesh.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"value": 12.0,
"units": "degree"
},
"preserve_thin_geometry": false
"preserve_thin_geometry": false,
"healing_gap_size": 0.0
},
"refinements": [],
"volume_zones": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"preserve_thin_geometry": false,
"surface_max_aspect_ratio": 0.01,
"surface_max_adaptation_iterations": 19
"surface_max_adaptation_iterations": 19,
"healing_gap_size": 0.0
},
"refinements": [
{
Expand Down Expand Up @@ -179,6 +180,7 @@
]
},
"preserve_thin_geometry": false,
"healing_gap_size": 0.0,
"geometry_accuracy": {
"value": 0.05,
"units": "flow360_length_unit"
Expand Down
Loading