Skip to content

[FXC-5449] allow varying refinements on axisymmetric body faces#1882

Open
alexxu-flex wants to merge 13 commits intomainfrom
alexxu/varying-refinement-faces
Open

[FXC-5449] allow varying refinements on axisymmetric body faces#1882
alexxu-flex wants to merge 13 commits intomainfrom
alexxu/varying-refinement-faces

Conversation

@alexxu-flex
Copy link
Copy Markdown
Collaborator

@alexxu-flex alexxu-flex commented Mar 9, 2026

Note

Medium Risk
Adds new per-face refinement spacing behavior for AxisymmetricBody and changes nested preprocessing to recurse through dicts as well as lists, affecting meshing JSON generation and unit conversion paths. Risk is moderate due to new validation/translation logic and potential schema/output differences for volume meshing.

Overview
Enables per-face spacing overrides for UniformRefinement on AxisymmetricBody via a new Face reference (AxisymmetricBody.face(i)) and UniformRefinement.face_spacing, with validation to ensure referenced bodies/faces are in-range and part of the refinement.

Updates volume-meshing translation to emit dense faceSpacings arrays for axisymmetric refinements (derived from sparse overrides) while keeping default spacing for unspecified faces, and extends Flow360BaseModel.preprocess recursion to also preprocess nested dict values (not just lists) for unit conversion. Adds comprehensive tests for the new Face type, validation, translation output, unit handling, and JSON round-trips.

Written by Cursor Bugbot for commit b19cd53. This will update automatically on new commits. Configure here.

@alexxu-flex alexxu-flex marked this pull request as ready for review March 11, 2026 20:01
... entities=[cylinder, box, axisymmetric_body, sphere],
... spacing=1*fl.u.cm
... spacing=1*fl.u.cm,
... face_spacing={
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is too nested and confusing. We need to redesign the interface.

Copy link
Copy Markdown
Collaborator Author

@alexxu-flex alexxu-flex Mar 13, 2026

Choose a reason for hiding this comment

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

//User interface
face_spacing={
axisymmetric_body.segments[1] : 0.2*fl.u.cm
}
// Storage side
"face_spacing":{
("entioty_id":"$axisymmetric_body.private_attribute_id", "segment_index": 1) : {"value": 0.2, "units":"cm"}
}

Copy link
Copy Markdown
Collaborator Author

@alexxu-flex alexxu-flex Mar 13, 2026

Choose a reason for hiding this comment

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

Then you need a Pydantic model for the "segment" class.

It will be similar relationship between Windtunnel farfield and the windtunnel ghost surfaces.

class Segment(BaseModel):
    type_name:Literal["Segment"]
    entity_id:str
    segment_index: int =pd.Field(min=..., )

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants