Skip to content

Commit

Permalink
bugfix:remove poisson ratio from initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
armantekinalp committed Jun 12, 2022
1 parent d3f91f2 commit e52ec2b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def simulate_helicalbucklin_beam_with(
number_of_rotations = 27
# For shear modulus of 1e4, nu is 99!
poisson_ratio = 99
shear_modulus = E / (poisson_ratio + 1.0)
shear_matrix = np.repeat(1e5 * np.identity((3))[:, :, np.newaxis], n_elem, axis=2)
temp_bend_matrix = np.zeros((3, 3))
np.fill_diagonal(temp_bend_matrix, [1.345, 1.345, 0.789])
Expand All @@ -60,7 +61,6 @@ def simulate_helicalbucklin_beam_with(
density,
nu,
E,
poisson_ratio,
)
# TODO: CosseratRod has to be able to take shear matrix as input, we should change it as done below

Expand Down
5 changes: 3 additions & 2 deletions examples/MuscularFlagella/muscular_flagella.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class MuscularFlagellaSimulator(
base_length_body = 1.927 # mm
E = 3.86e6 # MPa
poisson_ratio = 0.5
shear_modulus = E / (poisson_ratio + 1.0)

base_radius_head = 0.02 # mm
base_radius_tail = 0.007 # mm
Expand Down Expand Up @@ -67,7 +68,7 @@ class MuscularFlagellaSimulator(
density_body,
nu_body,
E,
poisson_ratio,
shear_modulus=shear_modulus,
)

# In order to match bending stiffness of the tail as given in below reference, recompute and
Expand Down Expand Up @@ -152,7 +153,7 @@ class MuscularFlagellaSimulator(
density_muscle,
nu_muscle,
E_muscle,
poisson_ratio,
shear_modulus=shear_modulus,
)

muscular_flagella_sim.append(flagella_muscle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def run_snake(b_coeff, SAVE_RESULTS=False):
nu = 5.0
E = 1e7
poisson_ratio = 0.5
shear_modulus = E / (poisson_ratio + 1.0)

shearable_rod = CosseratRod.straight_rod(
n_elem,
Expand All @@ -47,7 +48,7 @@ def run_snake(b_coeff, SAVE_RESULTS=False):
density,
nu,
E,
poisson_ratio,
shear_modulus=shear_modulus,
)

snake_sim.append(shearable_rod)
Expand Down

0 comments on commit e52ec2b

Please sign in to comment.