Skip to content

Include rotation matrix in cell values#25

Open
DRollin wants to merge 8 commits intomainfrom
dr/rotationmatrix
Open

Include rotation matrix in cell values#25
DRollin wants to merge 8 commits intomainfrom
dr/rotationmatrix

Conversation

@DRollin
Copy link
Copy Markdown
Collaborator

@DRollin DRollin commented Dec 17, 2024

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 96.22642% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.24%. Comparing base (42da30d) to head (0e079b5).

Files with missing lines Patch % Lines
src/cellvalues.jl 96.22% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   88.61%   89.24%   +0.62%     
==========================================
  Files           5        5              
  Lines         281      316      +35     
==========================================
+ Hits          249      282      +33     
- Misses         32       34       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DRollin DRollin linked an issue Dec 17, 2024 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I could use some help defining a proper test case...
Not sure if the current one is fine.

@fredrikekre fredrikekre requested a review from kimauth December 17, 2024 13:06
Copy link
Copy Markdown
Member

@KnutAM KnutAM left a comment

Choose a reason for hiding this comment

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

For cohesive elements, this would be very useful to make the traction-separation implementation interface cleaner.

I believe there is a mistake (added a test proposal to show). I think the way one would need to calculate this would be (but haven't tested)

v1 = J[:, 1]
if 3d
    v3 = v1 × J[:, 2] # normal vector
    v2 = v3 × v1 # Ensures v2 perpendicular to v1 and v3
    R = Tensor{2, 3}((normalize(v1)..., normalize(v2)..., normalize(v3)...))
else if 2d
    v2 = Vec{2}(((-v[2], v[1]))
    R = Tensor{2, 2}((normalize(v1)..., normalize(v2)...))
end

DRollin and others added 2 commits January 21, 2025 12:15
Co-authored-by: Knut Andreas Meyer <knutam@gmail.com>
@DRollin
Copy link
Copy Markdown
Collaborator Author

DRollin commented Jan 21, 2025

Thanks for the feedback 👍
I updated the code and tests.

@KnutAM
Copy link
Copy Markdown
Member

KnutAM commented Jan 28, 2025

Regarding the notation here, I believe that formally this should always be a coordinate transformation tensor, $\boldsymbol{Q}$.

That has no practical meaning since Tensors.jl don't include the coordinate bases. But still wanted to put it out here, to maybe motivate calling it something like

  • coordinate_transformation
  • orientation or surface_orientation
    (could be potentially be owned by Ferrite to extend the current getnormal API for facetvalues). I would imagine this would be useful for e.g. contact simulations.
  • surface_transformation
  • facet_transformation / facet_orientation

(personally I think the midplane is implied by being an interface, and if needed on either "side", that could be given explicitly as extra argument).

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.

How to get the rotation matrix of interface cell?

2 participants