Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linear elasticity example #799

Merged
merged 39 commits into from
Aug 19, 2024
Merged

Linear elasticity example #799

merged 39 commits into from
Aug 19, 2024

Conversation

kimauth
Copy link
Member

@kimauth kimauth commented Sep 27, 2023

Here is a first suggestion for a linear elasticity example. The explanations could probably use a bit more work and I believe the logo.geo file for generating the mesh should be stored somewhere else? It's a start anyways :)

@termi-official
Copy link
Member

I guess this should be the second tutorial and it is the step from a scalar-valued linear PDE to a vector-valued linear PDE? So the "new concents" would be a first contact with Tensors.jl and how to treat vector-valued problems in general?

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.67%. Comparing base (b6976d3) to head (f5796ef).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #799   +/-   ##
=======================================
  Coverage   93.67%   93.67%           
=======================================
  Files          39       39           
  Lines        6004     6004           
=======================================
  Hits         5624     5624           
  Misses        380      380           

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

Copy link
Member

@fredrikekre fredrikekre left a comment

Choose a reason for hiding this comment

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

I think it would be good to add a note about plane strain/stress in this example too.

docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
@kimauth
Copy link
Member Author

kimauth commented Nov 2, 2023

Added a Neumann boundary condition instead of the Dirichlet boundary condition. Still need to add some explanation for that + a new picture.

@KnutAM
Copy link
Member

KnutAM commented Aug 4, 2024

Updated the example to master and tried to make it more complete, as promised during the Swedish Mechanics days...
Test functions are now on the left, CC @fredrikekre and @KristofferC :)

@KnutAM KnutAM marked this pull request as ready for review August 10, 2024 12:05
@KnutAM KnutAM added docs awaiting review PR is finished from the authors POV, waiting for feedback labels Aug 10, 2024
# For fun we'll color the logo, and thus create cell data with numbers according
# to the logo colors.
color_data = zeros(Int, getncells(grid))
colors = Dict(
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Julia logo colors are cute but I wonder if not showing how to output the stress or strain would be more instructive for your typical FEM beginner.

Copy link
Member

Choose a reason for hiding this comment

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

Hid this now then, and added stress calculation and export as both cell data and L2Projection.

docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
Copy link
Member

@termi-official termi-official left a comment

Choose a reason for hiding this comment

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

I think we are getting closer. Also, can you run a on the file spell-checker locally?

docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
docs/src/literate-tutorials/linear_elasticity.jl Outdated Show resolved Hide resolved
@KnutAM
Copy link
Member

KnutAM commented Aug 19, 2024

Thanks!

Also, can you run a on the file spell-checker locally?

typos gives no errors

@KnutAM KnutAM merged commit 5d9fe59 into master Aug 19, 2024
11 checks passed
@KnutAM KnutAM deleted the ka/elasticity_example branch August 19, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review PR is finished from the authors POV, waiting for feedback docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants