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

Fix FieldsMixed() for MINI-elements #538

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Fix FieldsMixed() for MINI-elements #538

merged 1 commit into from
Sep 22, 2023

Conversation

adtzlr
Copy link
Owner

@adtzlr adtzlr commented Sep 22, 2023

don't disconnect the dual mesh.

Description: Fix nearly-incompressible hyperelasticity on (bubble-enriched MINI) triangle/tetrahedrons.

Fixes #537

import felupe as fem
import pypardiso

mesh = fem.Cube(n=4).triangulate().add_midpoints_volumes(cell_type="tetra")
region = fem.RegionTetraMINI(mesh)
field = fem.FieldsMixed(region, n=3)

boundaries, loadcase = fem.dof.uniaxial(field, clamped=True)

umat = fem.ThreeFieldVariation(fem.NeoHooke(mu=1, bulk=5000))
solid = fem.SolidBody(umat, field)

move = fem.math.linsteps([0, 1], num=21)
step = fem.Step(items=[solid], ramp={boundaries["move"]: move}, boundaries=boundaries)

job = fem.CharacteristicCurve(steps=[step], boundary=boundaries["move"])
job.evaluate(tol=1e-3, solver=pypardiso.spsolve)
fig, ax = job.plot(
    xlabel="Displacement $u$ in mm $\longrightarrow$",
    ylabel="Normal Force $F$ in N $\longrightarrow$",
)

field.plot("Principal Values of Logarithmic Strain").show()

image

image

don't disconnect the dual mesh
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f048961) 97.95% compared to head (590e603) 97.95%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #538   +/-   ##
=======================================
  Coverage   97.95%   97.95%           
=======================================
  Files          85       85           
  Lines        4110     4114    +4     
=======================================
+ Hits         4026     4030    +4     
  Misses         84       84           
Files Changed Coverage Δ
src/felupe/_field/_fields.py 100.00% <100.00%> (ø)
src/felupe/mesh/_convert.py 96.46% <100.00%> (+0.09%) ⬆️
src/felupe/mesh/_mesh.py 98.92% <100.00%> (ø)

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

@adtzlr adtzlr merged commit f7dd1cb into main Sep 22, 2023
@adtzlr adtzlr deleted the fix-mini-fields branch September 22, 2023 13:46
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.

MINI elements: Weird deformation results
1 participant