Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/GazzolaLab/PyElastica
Browse files Browse the repository at this point in the history
  • Loading branch information
armantekinalp committed May 23, 2022
2 parents e5b8692 + 5203746 commit 2022949
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/AxialStretchingCase/axial_stretching.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class StretchingBeamSimulator(BaseSystemCollection, Constraints, Forcing, CallBa
youngs_modulus = 1e4
# For shear modulus of 1e4, nu is 99!
poisson_ratio = 0.5
shear_modulus = youngs_modulus / (poisson_ratio + 1.0)

stretchable_rod = CosseratRod.straight_rod(
n_elem,
Expand All @@ -72,7 +73,7 @@ class StretchingBeamSimulator(BaseSystemCollection, Constraints, Forcing, CallBa
density,
nu,
youngs_modulus,
poisson_ratio,
shear_modulus=shear_modulus,
)

stretch_sim.append(stretchable_rod)
Expand Down
3 changes: 2 additions & 1 deletion examples/ButterflyCase/butterfly.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class ButterflySimulator(BaseSystemCollection, CallBacks):
nu = 0.0
youngs_modulus = 1e4
poisson_ratio = 0.5
shear_modulus = youngs_modulus / (poisson_ratio + 1.0)

positions = np.empty((MaxDimension.value(), n_elem + 1))
dl = total_length / n_elem
Expand Down Expand Up @@ -77,7 +78,7 @@ class ButterflySimulator(BaseSystemCollection, CallBacks):
density=density,
nu=nu,
youngs_modulus=youngs_modulus,
poisson_ratio=poisson_ratio,
shear_modulus=shear_modulus,
position=positions,
)

Expand Down
2 changes: 2 additions & 0 deletions examples/ContinuumSnakeCase/continuum_snake.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
__doc__ = """Snake friction case from X. Zhang et. al. Nat. Comm. 2021"""

import sys
import os
import numpy as np

sys.path.append("../../")
from elastica import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# from collections import defaultdict

# import numpy as np
import numpy as np
from matplotlib import pyplot as plt

from elastica import *
Expand Down
1 change: 1 addition & 0 deletions examples/MuscularFlagella/muscular_flagella.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
__doc__ = """Muscular flagella example from Zhang et. al. Nature Comm 2019 paper."""

import sys
import numpy as np

sys.path.append("../../")

Expand Down
1 change: 1 addition & 0 deletions examples/MuscularSnake/muscular_snake.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__doc__ = """Muscular snake example from Zhang et. al. Nature Comm 2019 paper."""
import sys
import numpy as np

sys.path.append("../../")
from elastica import *
Expand Down
1 change: 1 addition & 0 deletions examples/RestartExample/restart_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import sys
import numpy as np

sys.path.append("../../")
from elastica import *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import numpy as np

sys.path.append("../../")

Expand Down

0 comments on commit 2022949

Please sign in to comment.