Skip to content
Merged

Hgo #44

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ post_model = PostProcessor(comp_model, driverpost; is_vtk=true, filepath=simdir)
x = solve!(comp_model; stepping=(nsteps=5, maxbisec=5), post=post_model)
```

## HyperFEM Gallery


<p align="center">
&nbsp; &nbsp; &nbsp; &nbsp;
<img alt="Dark"
src="https://github.com/MultiSimOLab/HyperFEM/blob/HGO/docs/imgs/sims_.png?raw=true" width="110%">
</p>



## How to cite HyperFEM

In order to give credit to the HyperFEM contributors, we ask that you please reference the paper:
Expand All @@ -138,7 +149,7 @@ along with the required citations for [Gridap](https://github.com/gridap/Gridap.
<p align="center">
&nbsp; &nbsp; &nbsp; &nbsp;
<img alt="Dark"
src="https://github.com/jmartfrut/HyperFEM/blob/main/docs/imgs/aei.png?raw=true" width="70%">
src="https://github.com/MultiSimOLab/HyperFEM/blob/main/docs/imgs/aei.png?raw=true" width="70%">
</p>

# Contact
Expand Down
Binary file added docs/imgs/sims_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 30 additions & 14 deletions src/PhysicalModels/MechanicalModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -718,22 +718,38 @@ struct HGO_4Fibers <: AnisoElastic
function (obj::HGO_4Fibers)(Λ::Float64=1.0; Threshold=0.01)
c1, c2 = obj.c1, obj.c2

Ψ(F, M1, M2, M3, M4) = c1[1] / (4 * c2[1]) * (exp(c2[1] * ((F * M1) ⋅ (F * M1) - 1.0)^2.0) - 1.0) +
c1[2] / (4 * c2[2]) * (exp(c2[2] * ((F * M2) ⋅ (F * M2) - 1.0)^2.0) - 1.0) +
c1[3] / (4 * c2[3]) * (exp(c2[3] * ((F * M3) ⋅ (F * M3) - 1.0)^2.0) - 1.0) +
c1[4] / (4 * c2[4]) * (exp(c2[4] * ((F * M4) ⋅ (F * M4) - 1.0)^2.0) - 1.0)

∂Ψ∂F(F, M1, M2, M3, M4) = c1[1] * exp(c2[1] * ((F * M1) ⋅ (F * M1) - 1.0)^2.0) * ((F * M1) ⋅ (F * M1) - 1.0) * ((F * M1) ⊗ M1) +
c1[2] * exp(c2[2] * ((F * M2) ⋅ (F * M2) - 1.0)^2.0) * ((F * M2) ⋅ (F * M2) - 1.0) * ((F * M2) ⊗ M2) +
c1[3] * exp(c2[3] * ((F * M3) ⋅ (F * M3) - 1.0)^2.0) * ((F * M3) ⋅ (F * M3) - 1.0) * ((F * M3) ⊗ M3) +
c1[4] * exp(c2[4] * ((F * M4) ⋅ (F * M4) - 1.0)^2.0) * ((F * M4) ⋅ (F * M4) - 1.0) * ((F * M4) ⊗ M4)

Ψ(F, N1, N2, N3, N4) = begin
M1 = N1 / norm(N1)
M2 = N2 / norm(N2)
M3 = N3 / norm(N3)
M4 = N4 / norm(N4)
c1[1] / (4 * c2[1]) * (exp(c2[1] * ((F * M1) ⋅ (F * M1) - 1.0)^2.0) - 1.0) +
c1[2] / (4 * c2[2]) * (exp(c2[2] * ((F * M2) ⋅ (F * M2) - 1.0)^2.0) - 1.0) +
c1[3] / (4 * c2[3]) * (exp(c2[3] * ((F * M3) ⋅ (F * M3) - 1.0)^2.0) - 1.0) +
c1[4] / (4 * c2[4]) * (exp(c2[4] * ((F * M4) ⋅ (F * M4) - 1.0)^2.0) - 1.0)
end

∂Ψ2∂F∂F(F, M1, M2, M3, M4) = c1[1] * exp(c2[1] * ((F * M1) ⋅ (F * M1) - 1.0)^2.0) * ((4 * c2[1] * (((F * M1) ⋅ (F * M1) - 1.0)^2.0) + 2.0) * (((F * M1) ⊗ M1) ⊗ ((F * M1) ⊗ M1)) + ((F * M1) ⋅ (F * M1) - 1.0) * (I3 ⊗₁₃²⁴ (M1 ⊗ M1))) +
c1[2] * exp(c2[2] * ((F * M2) ⋅ (F * M2) - 1.0)^2.0) * ((4 * c2[2] * (((F * M2) ⋅ (F * M2) - 1.0)^2.0) + 2.0) * (((F * M2) ⊗ M2) ⊗ ((F * M2) ⊗ M2)) + ((F * M2) ⋅ (F * M2) - 1.0) * (I3 ⊗₁₃²⁴ (M2 ⊗ M2))) +
c1[3] * exp(c2[3] * ((F * M3) ⋅ (F * M3) - 1.0)^2.0) * ((4 * c2[3] * (((F * M3) ⋅ (F * M3) - 1.0)^2.0) + 2.0) * (((F * M3) ⊗ M3) ⊗ ((F * M3) ⊗ M3)) + ((F * M3) ⋅ (F * M3) - 1.0) * (I3 ⊗₁₃²⁴ (M3 ⊗ M3))) +
c1[4] * exp(c2[4] * ((F * M4) ⋅ (F * M4) - 1.0)^2.0) * ((4 * c2[4] * (((F * M4) ⋅ (F * M4) - 1.0)^2.0) + 2.0) * (((F * M4) ⊗ M4) ⊗ ((F * M4) ⊗ M4)) + ((F * M4) ⋅ (F * M4) - 1.0) * (I3 ⊗₁₃²⁴ (M4 ⊗ M4)))
∂Ψ∂F(F, N1, N2, N3, N4) = begin
M1 = N1 / norm(N1)
M2 = N2 / norm(N2)
M3 = N3 / norm(N3)
M4 = N4 / norm(N4)
c1[1] * exp(c2[1] * ((F * M1) ⋅ (F * M1) - 1.0)^2.0) * ((F * M1) ⋅ (F * M1) - 1.0) * ((F * M1) ⊗ M1) +
c1[2] * exp(c2[2] * ((F * M2) ⋅ (F * M2) - 1.0)^2.0) * ((F * M2) ⋅ (F * M2) - 1.0) * ((F * M2) ⊗ M2) +
c1[3] * exp(c2[3] * ((F * M3) ⋅ (F * M3) - 1.0)^2.0) * ((F * M3) ⋅ (F * M3) - 1.0) * ((F * M3) ⊗ M3) +
c1[4] * exp(c2[4] * ((F * M4) ⋅ (F * M4) - 1.0)^2.0) * ((F * M4) ⋅ (F * M4) - 1.0) * ((F * M4) ⊗ M4)
end

∂Ψ2∂F∂F(F, N1, N2, N3, N4) = begin
M1 = N1 / norm(N1)
M2 = N2 / norm(N2)
M3 = N3 / norm(N3)
M4 = N4 / norm(N4)
c1[1] * exp(c2[1] * ((F * M1) ⋅ (F * M1) - 1.0)^2.0) * ((4 * c2[1] * (((F * M1) ⋅ (F * M1) - 1.0)^2.0) + 2.0) * (((F * M1) ⊗ M1) ⊗ ((F * M1) ⊗ M1)) + ((F * M1) ⋅ (F * M1) - 1.0) * (I3 ⊗₁₃²⁴ (M1 ⊗ M1))) +
c1[2] * exp(c2[2] * ((F * M2) ⋅ (F * M2) - 1.0)^2.0) * ((4 * c2[2] * (((F * M2) ⋅ (F * M2) - 1.0)^2.0) + 2.0) * (((F * M2) ⊗ M2) ⊗ ((F * M2) ⊗ M2)) + ((F * M2) ⋅ (F * M2) - 1.0) * (I3 ⊗₁₃²⁴ (M2 ⊗ M2))) +
c1[3] * exp(c2[3] * ((F * M3) ⋅ (F * M3) - 1.0)^2.0) * ((4 * c2[3] * (((F * M3) ⋅ (F * M3) - 1.0)^2.0) + 2.0) * (((F * M3) ⊗ M3) ⊗ ((F * M3) ⊗ M3)) + ((F * M3) ⋅ (F * M3) - 1.0) * (I3 ⊗₁₃²⁴ (M3 ⊗ M3))) +
c1[4] * exp(c2[4] * ((F * M4) ⋅ (F * M4) - 1.0)^2.0) * ((4 * c2[4] * (((F * M4) ⋅ (F * M4) - 1.0)^2.0) + 2.0) * (((F * M4) ⊗ M4) ⊗ ((F * M4) ⊗ M4)) + ((F * M4) ⋅ (F * M4) - 1.0) * (I3 ⊗₁₃²⁴ (M4 ⊗ M4)))
end

return (Ψ, ∂Ψ∂F, ∂Ψ2∂F∂F)
end
Expand Down