Skip to content

Commit

Permalink
revert to kappa_L etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Jan 7, 2025
1 parent bedbddf commit 5305e0f
Show file tree
Hide file tree
Showing 7 changed files with 2,372 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Worm2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,7 @@ par.names = {"Medium", "L_worm", "R_min", "C_agar_par_total",
"kappa_M0_fact", "beta_L_fact", "beta_D_fact", "beta_M0_fact", "delta_M"};

par.vals = {Medium, L_worm, R_min, C_agar_par_total, C_agar_perp_total,
C_water_par_total, C_water_perp_total, kappa_L_fact, kappa_D_fact, kappa_M0_fact, beta_L_fact,
beta_D_fact, beta_M0_fact, delta_M};
C_water_par_total, C_water_perp_total};

par.messages_inds.resize(par.vals.size());

Expand Down
22 changes: 9 additions & 13 deletions WormBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,15 @@ const double C_agar_par_total = 3.2e-3; // Total tangenti
const double C_agar_perp_total = 128e-3; // Total rod normal drag coefficient in agar in kg/s
const double C_water_par_total = 3.3e-6; // Total rod tangential drag coefficient for water in kg/s
const double C_water_perp_total = 5.2e-6; // Total rod normal drag coefficient for water in kg/s
const double kappa_L_fact = (10.0e-3/24);
const double kappa_L = kappa_L_fact*N_segments;
const double kappa_D_fact = 350; // Lateral spring constant in kg/s
const double kappa_D = kappa_D_fact*kappa_L; // Diagonal spring constant in kg/s
const double kappa_M0_fact = 20;
const double kappa_M0 = kappa_M0_fact*kappa_L; // Baseline active muscle spring constant in kg/s
const double beta_L_fact = 0.25;
const double beta_L = beta_L_fact*kappa_L; // Lateral passive damping constant in s
const double beta_D_fact = 0.01;
const double beta_D = beta_D_fact*kappa_D; // Diagonal passive damping constant in s
const double beta_M0_fact = 100;
const double beta_M0 = beta_M0_fact*beta_L; // Baseline active damping constant in s
const double delta_M = 0.65; // Rest muscle length scaling constant

const double kappa_L = (10.0e-3*N_segments)/24; // Lateral spring constant in kg/s
const double kappa_D = 350*kappa_L; // Diagonal spring constant in kg/s
const double kappa_M0 = 20*kappa_L; // Baseline active muscle spring constant in kg/s
const double beta_L = 0.025*kappa_L; // Lateral passive damping constant in s
const double beta_D = 0.01*kappa_D; // Diagonal passive damping constant in s
const double beta_M0 = 100*beta_L; // Baseline active damping constant in s
const double delta_M = 0.65; // Rest muscle length scaling constant



// Derived constants
Expand Down
129 changes: 129 additions & 0 deletions exampleRun/nv.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
60 3 2

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3.2383099999999997997690570628038 4.4307400000000001227817847393453 -2.3628900000000001568878360558301 -2.3628900000000001568878360558301 3.2383099999999997997690570628038 4.4307400000000001227817847393453 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176 3.2383060568517976207658648490906 4.4307422221935679473858726851176 -2.3628925164111382883902479079552 -2.3628925164111382883902479079552 3.2383060568517976207658648490906 4.4307422221935679473858726851176

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

2 1 -2.5283099999999998352961938508088 3 -14.672044016483777539860966498964
2 2 -5.431569999999999787121396366274 3 -1.1100754441638871483633010939229
3 3 0.43417800000000000837374614093278 5 1.6884312476801932589864918554667 6 5.0389267036545186684293184953276
3 4 0.43417800000000000837374614093278 1 1.6884312476801932589864918554667 2 5.0389267036545186684293184953276
2 5 -2.5283099999999998352961938508088 4 -14.672044016483777539860966498964
2 6 -5.431569999999999787121396366274 4 -1.1100754441638871483633010939229
2 7 -2.5283114462615907669373882526997 9 -14.672044016483777539860966498964
2 8 -5.4315736785631587579814549826551 9 -1.1100754441638871483633010939229
3 9 0.4341778043258703867479653126793 11 1.6884312476801932589864918554667 12 5.0389267036545186684293184953276
3 10 0.4341778043258703867479653126793 7 1.6884312476801932589864918554667 8 5.0389267036545186684293184953276
2 11 -2.5283114462615907669373882526997 10 -14.672044016483777539860966498964
2 12 -5.4315736785631587579814549826551 10 -1.1100754441638871483633010939229
2 13 -2.5283114462615907669373882526997 15 -14.672044016483777539860966498964
2 14 -5.4315736785631587579814549826551 15 -1.1100754441638871483633010939229
3 15 0.4341778043258703867479653126793 17 1.6884312476801932589864918554667 18 5.0389267036545186684293184953276
3 16 0.4341778043258703867479653126793 13 1.6884312476801932589864918554667 14 5.0389267036545186684293184953276
2 17 -2.5283114462615907669373882526997 16 -14.672044016483777539860966498964
2 18 -5.4315736785631587579814549826551 16 -1.1100754441638871483633010939229
2 19 -2.5283114462615907669373882526997 21 -14.672044016483777539860966498964
2 20 -5.4315736785631587579814549826551 21 -1.1100754441638871483633010939229
3 21 0.4341778043258703867479653126793 23 1.6884312476801932589864918554667 24 5.0389267036545186684293184953276
3 22 0.4341778043258703867479653126793 19 1.6884312476801932589864918554667 20 5.0389267036545186684293184953276
2 23 -2.5283114462615907669373882526997 22 -14.672044016483777539860966498964
2 24 -5.4315736785631587579814549826551 22 -1.1100754441638871483633010939229
2 25 -2.5283114462615907669373882526997 27 -14.672044016483777539860966498964
2 26 -5.4315736785631587579814549826551 27 -1.1100754441638871483633010939229
3 27 0.4341778043258703867479653126793 29 1.6884312476801932589864918554667 30 5.0389267036545186684293184953276
3 28 0.4341778043258703867479653126793 25 1.6884312476801932589864918554667 26 5.0389267036545186684293184953276
2 29 -2.5283114462615907669373882526997 28 -14.672044016483777539860966498964
2 30 -5.4315736785631587579814549826551 28 -1.1100754441638871483633010939229
2 31 -2.5283114462615907669373882526997 33 -14.672044016483777539860966498964
2 32 -5.4315736785631587579814549826551 33 -1.1100754441638871483633010939229
3 33 0.4341778043258703867479653126793 35 1.6884312476801932589864918554667 36 5.0389267036545186684293184953276
3 34 0.4341778043258703867479653126793 31 1.6884312476801932589864918554667 32 5.0389267036545186684293184953276
2 35 -2.5283114462615907669373882526997 34 -14.672044016483777539860966498964
2 36 -5.4315736785631587579814549826551 34 -1.1100754441638871483633010939229
2 37 -2.5283114462615907669373882526997 39 -14.672044016483777539860966498964
2 38 -5.4315736785631587579814549826551 39 -1.1100754441638871483633010939229
3 39 0.4341778043258703867479653126793 41 1.6884312476801932589864918554667 42 5.0389267036545186684293184953276
3 40 0.4341778043258703867479653126793 37 1.6884312476801932589864918554667 38 5.0389267036545186684293184953276
2 41 -2.5283114462615907669373882526997 40 -14.672044016483777539860966498964
2 42 -5.4315736785631587579814549826551 40 -1.1100754441638871483633010939229
2 43 -2.5283114462615907669373882526997 45 -14.672044016483777539860966498964
2 44 -5.4315736785631587579814549826551 45 -1.1100754441638871483633010939229
3 45 0.4341778043258703867479653126793 47 1.6884312476801932589864918554667 48 5.0389267036545186684293184953276
3 46 0.4341778043258703867479653126793 43 1.6884312476801932589864918554667 44 5.0389267036545186684293184953276
2 47 -2.5283114462615907669373882526997 46 -14.672044016483777539860966498964
2 48 -5.4315736785631587579814549826551 46 -1.1100754441638871483633010939229
2 49 -2.5283114462615907669373882526997 51 -14.672044016483777539860966498964
2 50 -5.4315736785631587579814549826551 51 -1.1100754441638871483633010939229
3 51 0.4341778043258703867479653126793 53 1.6884312476801932589864918554667 54 5.0389267036545186684293184953276
3 52 0.4341778043258703867479653126793 49 1.6884312476801932589864918554667 50 5.0389267036545186684293184953276
2 53 -2.5283114462615907669373882526997 52 -14.672044016483777539860966498964
2 54 -5.4315736785631587579814549826551 52 -1.1100754441638871483633010939229
2 55 -2.5283114462615907669373882526997 57 -14.672044016483777539860966498964
2 56 -5.4315736785631587579814549826551 57 -1.1100754441638871483633010939229
3 57 0.4341778043258703867479653126793 59 1.6884312476801932589864918554667 60 5.0389267036545186684293184953276
3 58 0.4341778043258703867479653126793 55 1.6884312476801932589864918554667 56 5.0389267036545186684293184953276
2 59 -2.5283114462615907669373882526997 58 -14.672044016483777539860966498964
2 60 -5.4315736785631587579814549826551 58 -1.1100754441638871483633010939229

0
1 8 0.11189374855879519188306403520983
1 9 1.6268824586493839667866723175393
1 10 1.6268824586493839667866723175393
0
1 12 0.11189374855879519188306403520983
0
2 2 0.11189374855879519188306403520983 14 0.11189374855879519188306403520983
2 3 1.6268824586493839667866723175393 15 1.6268824586493839667866723175393
2 4 1.6268824586493839667866723175393 16 1.6268824586493839667866723175393
0
2 6 0.11189374855879519188306403520983 18 0.11189374855879519188306403520983
0
2 8 0.11189374855879519188306403520983 20 0.11189374855879519188306403520983
2 9 1.6268824586493839667866723175393 21 1.6268824586493839667866723175393
2 10 1.6268824586493839667866723175393 22 1.6268824586493839667866723175393
0
2 12 0.11189374855879519188306403520983 24 0.11189374855879519188306403520983
0
2 14 0.11189374855879519188306403520983 26 0.11189374855879519188306403520983
2 15 1.6268824586493839667866723175393 27 1.6268824586493839667866723175393
2 16 1.6268824586493839667866723175393 28 1.6268824586493839667866723175393
0
2 18 0.11189374855879519188306403520983 30 0.11189374855879519188306403520983
0
2 20 0.11189374855879519188306403520983 32 0.11189374855879519188306403520983
2 21 1.6268824586493839667866723175393 33 1.6268824586493839667866723175393
2 22 1.6268824586493839667866723175393 34 1.6268824586493839667866723175393
0
2 24 0.11189374855879519188306403520983 36 0.11189374855879519188306403520983
0
2 26 0.11189374855879519188306403520983 38 0.11189374855879519188306403520983
2 27 1.6268824586493839667866723175393 39 1.6268824586493839667866723175393
2 28 1.6268824586493839667866723175393 40 1.6268824586493839667866723175393
0
2 30 0.11189374855879519188306403520983 42 0.11189374855879519188306403520983
0
2 32 0.11189374855879519188306403520983 44 0.11189374855879519188306403520983
2 33 1.6268824586493839667866723175393 45 1.6268824586493839667866723175393
2 34 1.6268824586493839667866723175393 46 1.6268824586493839667866723175393
0
2 36 0.11189374855879519188306403520983 48 0.11189374855879519188306403520983
0
2 38 0.11189374855879519188306403520983 50 0.11189374855879519188306403520983
2 39 1.6268824586493839667866723175393 51 1.6268824586493839667866723175393
2 40 1.6268824586493839667866723175393 52 1.6268824586493839667866723175393
0
2 42 0.11189374855879519188306403520983 54 0.11189374855879519188306403520983
0
2 44 0.11189374855879519188306403520983 56 0.11189374855879519188306403520983
2 45 1.6268824586493839667866723175393 57 1.6268824586493839667866723175393
2 46 1.6268824586493839667866723175393 58 1.6268824586493839667866723175393
0
2 48 0.11189374855879519188306403520983 60 0.11189374855879519188306403520983
0
1 50 0.11189374855879519188306403520983
1 51 1.6268824586493839667866723175393
1 52 1.6268824586493839667866723175393
0
1 54 0.11189374855879519188306403520983
Loading

0 comments on commit 5305e0f

Please sign in to comment.