Closed
Conversation
- Add GapConfig dataclass for configuring gap geometry with: - Absolute gap width (m) - Fractional gap (as fraction of nominal width) - Gap extent from root (m) - Add piezoresistor gap configuration (gap_config property): - Maintains backward compatibility via air_gap_width property - Adds effective_pr_width_at(x) for spatially varying PR width - Add beam gap configuration (beam_gap_config property): - Reduces effective beam width in root region - Affects stiffness via _calculate_stiffness_with_beam_gap() - Affects effective mass via _calculate_effective_mass_with_beam_gap() - Affects resonant frequency via _omega_vacuum_with_beam_gap() - Update calculateEnergies() to support spatially varying width for Rayleigh-Ritz frequency calculations - Add comprehensive tests for all gap configurations This addresses PZ-12: Generalize gap handling for cantilever beam multi-turn models. Co-authored-by: jcdoll <jcdoll@vonkconsulting.com>
|
Cursor Agent can help with this pull request. Just |
Collaborator
Author
|
Needs a fresh approach after rework |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generalize cantilever gap handling to support spatially varying width for both piezoresistors and beam mechanics.
This PR introduces a
GapConfigdataclass to unify gap definitions. It refactors the existing piezoresistorair_gap_widthinto this new system and, more significantly, adds abeam_gap_config. Thisbeam_gap_configallows for modeling a reduction in the cantilever's structural width in the root region, which is crucial for accurate Rayleigh-Ritz frequency calculations for designs like tuning forks, addressing a previous limitation whereair_gap_widthonly affected piezoresistor geometry.Slack Thread