Improve physics accuracy and enhance dark UI theme#87
Merged
5 commits merged intomainfrom Mar 5, 2026
Merged
Conversation
- Replace simple Euler with Velocity Verlet for better accuracy - Add material-physics.js with advanced models (Ramberg-Osgood, Ludwik-Hollomon) - Enhance dark theme with deeper colors and flatter design - Fix UI overlaps with dynamic positioning - Improve mobile layout spacing Co-authored-by: ovtdadt <264236209+ovtdadt@users.noreply.github.com>
- Use Ludwik-Hollomon for realistic strain hardening - Implement proper necking with Considère criterion - Add accurate Euler buckling analysis for compression - Update all simulation HTMLs to load material-physics.js Co-authored-by: ovtdadt <264236209+ovtdadt@users.noreply.github.com>
- Apply deeper backgrounds and flatter design to all simulations - Update color gradients (emerald instead of bright green) - Remove backdrop-filter blur effects - Flatten yield indicators and buttons - Update index.css with new theme variables Co-authored-by: ovtdadt <264236209+ovtdadt@users.noreply.github.com>
- Add material-physics.js to remaining HTML files (torsion, shear, fatigue) - Fix duplicate script tag in fatica-termica.html - All 7 mechanical simulations now have advanced physics - Enhanced dark theme applied across all pages - UI overlaps fixed with dynamic positioning Co-authored-by: ovtdadt <264236209+ovtdadt@users.noreply.github.com>
This pull request was closed.
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.
The simulations used oversimplified physics (simple Euler integration, linear plastic models) and the UI had visibility issues (overlapping elements, insufficient contrast, heavy visual effects).
Physics Improvements
Integration Method
physics.jsfor 2nd-order accuracy and better energy conservationstepEuler()for backwards compatibilityMaterial Behavior Models (
material-physics.js)σ = K·εⁿfor realistic strain hardeningPcr = π²EI/(KL)²with slenderness checksSimulation Integration
F > Pcrinstead of arbitrary thresholdscrossSectionAreaaffecting stress calculationsExample from
sim-tensile.js:UI Enhancements
Dark Theme
#08090b(was#0c0d10)0.05(was0.06)#10b981(was bright green#22c55e)backdrop-filter: blur()for performanceLayout Fixes
calc()for dynamic positioning below info-popupmax-width: calc(50% - 30px)Visual Simplification