Skip to content
Open
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
074e5a6
general snappy framework, does not work
piotrkluba Jul 9, 2025
a95f5e7
basic translator functionality
piotrkluba Jul 10, 2025
712b515
tests repaired
piotrkluba Jul 10, 2025
5717d7a
reversed unnecessary changes
piotrkluba Jul 10, 2025
2465712
reversed unnecessary changes again
piotrkluba Jul 10, 2025
be7d991
reversed unnecessary changes yet again
piotrkluba Jul 10, 2025
c6e41e0
points in mesh added
piotrkluba Jul 10, 2025
9893ea2
added strictRegionSnap
piotrkluba Jul 11, 2025
bf593c9
implemented initial validators
piotrkluba Jul 11, 2025
757ed1f
corrected errors with validators and included angle
piotrkluba Jul 11, 2025
4499e0f
always include strictFeatureSnap
piotrkluba Jul 11, 2025
645adbf
pulled snappy clases to main namespace
piotrkluba Jul 11, 2025
5ecbaed
repaired handlin volume meshing params and empty edge lists
piotrkluba Jul 11, 2025
8c44b58
fixed volume meshing in modular workflow
piotrkluba Jul 14, 2025
253e538
fixed Self import error
piotrkluba Jul 14, 2025
7687b49
added a test
piotrkluba Jul 15, 2025
b531409
fixes to translator
piotrkluba Jul 15, 2025
bb6d9ae
fixed empty regions and bodies n edge refinement
piotrkluba Jul 15, 2025
1e5d3bf
additional fixe with more tests coverage
piotrkluba Jul 15, 2025
3f44994
draft change
piotrkluba Jul 16, 2025
e4a8953
fixed turning off edges at smoothing
piotrkluba Jul 16, 2025
3c1af03
added validators to quality metrics
piotrkluba Jul 16, 2025
b8db661
added more validators
piotrkluba Jul 17, 2025
9600a3b
Use original edges for smoothing - snappy (#1304)
piotrkluba Jul 29, 2025
89673f2
Added UniformRefinement to snappy (#1331)
piotrkluba Aug 6, 2025
f75697b
Merge rc/25.6 to snappy main branch (#1347)
piotrkluba Aug 13, 2025
4bc6ee1
bumped version for beta publish
maciej-flexcompute Aug 18, 2025
54fa8bc
Squashed commit of the following:
piotrkluba Aug 28, 2025
ebc9e18
merge addition
piotrkluba Aug 28, 2025
b3b6911
merging kinks repaired
piotrkluba Aug 28, 2025
a09705a
Revert "Ensure the geometry tolerance and the planar tolerance are co…
benflexcompute Aug 27, 2025
ddca991
Skip boundaries during translation if the boundary is not found in vo…
benflexcompute Aug 28, 2025
100e1bb
validation context extracts also from ModularMeshingWorkflow
piotrkluba Aug 29, 2025
b3d86ef
validation of volume zones corrected for different meshing shemes
piotrkluba Sep 1, 2025
34ecc84
bump version to 25.8.0b2, formatter changes
piotrkluba Sep 2, 2025
a159f21
fixed planar_face_tolerance context bug
piotrkluba Sep 9, 2025
c375ce8
Python meshing refactor (#1415)
piotrkluba Sep 25, 2025
4ea8698
user defined farfield no longer required when using custom volume or …
piotrkluba Sep 26, 2025
81cf82a
Rebased snappy to main (#1449)
piotrkluba Sep 26, 2025
7eca1e1
revert fix of translating missing boundaries as it was done in main
piotrkluba Sep 29, 2025
7aa255d
Merge branch 'develop' into snappy-main
piotrkluba Oct 1, 2025
abe9e77
formatter
piotrkluba Oct 1, 2025
b53f2dd
unnecessary warnings removed
piotrkluba Oct 1, 2025
e87dffd
added SeedpointZone to rotation
piotrkluba Oct 3, 2025
2f6b5e0
formatter
piotrkluba Oct 3, 2025
957a663
Renaming on _get_boundary_full_name
benflexcompute Oct 3, 2025
517624d
Some renaming
benflexcompute Oct 6, 2025
f32de54
changed type to type_name as a discriminator in added types
piotrkluba Oct 8, 2025
6302aee
Merge branch 'snappy-main' of github.com:flexcompute/Flow360 into sna…
piotrkluba Oct 8, 2025
85c576d
farfield cosmetic changes
piotrkluba Oct 8, 2025
cf9a46f
revertet some weird change to base model
piotrkluba Oct 9, 2025
0c8c532
Rebase to newest develop (#1485)
piotrkluba Oct 9, 2025
735cf9f
Added the base_spacing parameter to control snappy octree (#1495)
piotrkluba Oct 14, 2025
de73fbe
exposed octree spacing
piotrkluba Oct 14, 2025
9976667
inverted the spacing convention
piotrkluba Oct 14, 2025
9ae168c
changed warning formatting
piotrkluba Oct 14, 2025
9369ca0
add condition for SnappySurfaceEdgeRefinement validation
piotrkluba Oct 14, 2025
587165c
removed the optional annotation from boundary first layer thickness
piotrkluba Oct 14, 2025
6dfde38
Fix spacings not being translated in list (#1500)
piotrkluba Oct 16, 2025
d3ae923
Two level structure for geometry referencing snappy (#1465)
piotrkluba Oct 16, 2025
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
440 changes: 440 additions & 0 deletions examples/basic_simulations/meshing/cube_snappy.ipynb

Large diffs are not rendered by default.

34 changes: 33 additions & 1 deletion flow360/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,25 @@
PassiveSpacing,
SurfaceRefinement,
)
from flow360.component.simulation.meshing_param.params import (
from flow360.component.simulation.meshing_param.meshing_specs import (
BetaVolumeMeshingDefaults,
MeshingDefaults,
SnappyCastellatedMeshControls,
SnappyQualityMetrics,
SnappySmoothControls,
SnappySnapControls,
SnappySurfaceMeshingDefaults,
)
from flow360.component.simulation.meshing_param.params import (
BetaVolumeMeshingParams,
MeshingParams,
ModularMeshingWorkflow,
SnappySurfaceMeshingParams,
)
from flow360.component.simulation.meshing_param.surface_mesh_refinements import (
SnappyBodyRefinement,
SnappyRegionRefinement,
SnappySurfaceEdgeRefinement,
)
from flow360.component.simulation.meshing_param.volume_params import (
AutomatedFarfield,
Expand Down Expand Up @@ -145,6 +161,8 @@
Cylinder,
ImportedSurface,
ReferenceGeometry,
SeedpointZone,
SnappyBody,
)
from flow360.component.simulation.simulation_params import SimulationParams
from flow360.component.simulation.time_stepping.time_stepping import (
Expand Down Expand Up @@ -306,6 +324,20 @@
"math",
"solution",
"report",
"ModularMeshingWorkflow",
"SnappySurfaceMeshingDefaults",
"SnappySnapControls",
"SnappyCastellatedMeshControls",
"SnappyQualityMetrics",
"SnappySmoothControls",
"SnappyBodyRefinement",
"SnappyRegionRefinement",
"SnappySurfaceEdgeRefinement",
"SnappyBody",
"SeedpointZone",
"SnappySurfaceMeshingParams",
"BetaVolumeMeshingParams",
"BetaVolumeMeshingDefaults",
"get_user_variable",
"show_user_variables",
"remove_user_variable",
Expand Down
2 changes: 1 addition & 1 deletion flow360/component/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def to_case(self) -> Case:
@before_submit_only
def submit(self, force_submit: bool = False) -> Case:
"""
submits case to cloud for running
Submits case to cloud for running.
"""
assert self.name
assert self.volume_mesh_id or self.other_case or self.parent_id or self.parent_case
Expand Down
2 changes: 1 addition & 1 deletion flow360/component/simulation/framework/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def preprocess(
exclude=exclude,
registry_lookup=registry_lookup,
)
elif isinstance(value, list):
elif isinstance(value, (list, tuple)):
Copy link
Collaborator

Choose a reason for hiding this comment

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

_preprocess_nested_list returns a list, if value is a tuple then we are changing the data type by assigning a list back to it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not remember altering that, I changed that back to its brevious form and tests passed, I hope it does not break things, but then i do not thing changing tuple into list would necessairly have any consequences

# Use the helper to handle nested lists.
solver_values[property_name] = _preprocess_nested_list(
value, [loc_name], params, exclude, registry_lookup
Expand Down
23 changes: 20 additions & 3 deletions flow360/component/simulation/framework/param_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def register_entity_list(model: Flow360BaseModel, registry: EntityRegistry) -> N
register_entity_list(field, registry)


# pylint: disable=too-many-branches
def _update_entity_full_name(
model: Flow360BaseModel,
target_entity_type: Union[type[_SurfaceEntityBase], type[_VolumeEntityBase]],
Expand All @@ -170,20 +171,36 @@ def _update_entity_full_name(
field._update_entity_info_with_metadata(volume_mesh_meta_data)

if isinstance(field, EntityList):
added_entities = []
for entity in field.stored_entities:
if isinstance(entity, target_entity_type):
# pylint: disable=protected-access
entity._update_entity_info_with_metadata(volume_mesh_meta_data)
partial_additions = entity._update_entity_info_with_metadata(
volume_mesh_meta_data
)
if partial_additions is not None:
added_entities.extend(partial_additions)
field.stored_entities.extend(added_entities)

elif isinstance(field, (list, tuple)):
added_entities = []
for item in field:
if isinstance(item, target_entity_type):
item._update_entity_info_with_metadata( # pylint: disable=protected-access
volume_mesh_meta_data
partial_additions = (
item._update_entity_info_with_metadata( # pylint: disable=protected-access
volume_mesh_meta_data
)
)
if partial_additions is not None:
added_entities.extend(partial_additions)
elif isinstance(item, Flow360BaseModel):
_update_entity_full_name(item, target_entity_type, volume_mesh_meta_data)

if isinstance(field, list):
field.extend(added_entities)
if isinstance(field, tuple):
field += tuple(added_entities)

elif isinstance(field, Flow360BaseModel):
_update_entity_full_name(field, target_entity_type, volume_mesh_meta_data)

Expand Down
10 changes: 10 additions & 0 deletions flow360/component/simulation/framework/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@ def _to_25_7_2(params_as_dict):
return params_as_dict


def _to_25_8_0(params_as_dict):
# new method of specifying meshing was added, as well as the method discriminator
meshing = params_as_dict.get("meshing")
if meshing:
meshing["type"] = "MeshingParams"

return params_as_dict


VERSION_MILESTONES = [
(Flow360Version("24.11.1"), _to_24_11_1),
(Flow360Version("24.11.7"), _to_24_11_7),
Expand All @@ -380,6 +389,7 @@ def _to_25_7_2(params_as_dict):
(Flow360Version("25.6.5"), _to_25_6_5),
(Flow360Version("25.6.6"), _to_25_6_6),
(Flow360Version("25.7.2"), _to_25_7_2),
(Flow360Version("25.8.0"), _to_25_8_0),
] # A list of the Python API version tuple with there corresponding updaters.


Expand Down
Loading