Fiber Stretch and Stretch Rate Computations#550
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #550 +/- ##
==========================================
+ Coverage 68.80% 69.02% +0.21%
==========================================
Files 181 181
Lines 34157 34128 -29
Branches 5903 5904 +1
==========================================
+ Hits 23503 23557 +54
+ Misses 10517 10434 -83
Partials 137 137 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aabrown100-git
left a comment
There was a problem hiding this comment.
Nice work, made a few suggestions
michelebucelli
left a comment
There was a problem hiding this comment.
Thank you @kko27! I have left a few suggestions and comments.
|
Hey @kko27, thanks for working on this. Besides the comments I left, I asked Codex to run a review, and it found this issue:
I think it's right. You are passing the EP index equation, not the mechanics, to |
There was a problem hiding this comment.
Pull request overview
Adds solver support and a new integration case to compute and validate fiber stretch and fiber stretch rate outputs needed for electromechanics post-processing (resolves #544).
Changes:
- Introduces
Fiber_stretchandFiber_stretch_rateoutputs end-to-end (enums, output properties, VTU writer, post-processing routines). - Refactors deformation gradient computation into a shared helper and implements stretch rate via backward finite difference.
- Adds a new structural integration test case (
uniaxial_block_stretch) with reference results for both fields.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Code/Source/solver/post.cpp |
Adds fiber stretch + stretch-rate post routines; refactors deformation gradient usage. |
Code/Source/solver/post.h |
Declares new/renamed post-processing APIs (fib_stretch, fib_stretch_rate). |
Code/Source/solver/vtk_xml.cpp |
Writes new scalar nodal outputs to VTU (Fiber_stretch, Fiber_stretch_rate). |
Code/Source/solver/consts.h |
Extends OutputNameType with new output groups and output names. |
Code/Source/solver/set_output_props.h |
Registers output props (group, length, VTK name strings) for new outputs. |
Code/Source/solver/set_equation_props.h |
Adds new outputs to struct/ustruct default output lists and updates nDOP. |
Code/Source/solver/cep_ion.cpp |
Updates call site to renamed post::fib_stretch(). |
tests/conftest.py |
Adds absolute tolerances for the new output fields in reference comparisons. |
tests/test_struct.py |
Adds integration test entry for the new uniaxial block stretch case. |
tests/cases/struct/uniaxial_block_stretch/* |
New integration test case assets (solver input, mesh, load, reference VTU, docs/media). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Oh dear, this will definitely become a problem for coupling. We don't need to address this in this issue as right now users cannot enable electromechanics coupling, but I will add this note to the main issue #523 |
|
@michelebucelli and @javijv4 I think this is ready for final review and approval |
michelebucelli
left a comment
There was a problem hiding this comment.
Looks good to me!
Current situation
Resolves #544
Release Notes
post.cpp. Stretch rate is computed as a FD of fiber stretchTesting
Integration test has been added that checks if the stretch and stretch rates computed by the code match reference solutions that were obtained analytically.
Code of Conduct & Contributing Guidelines