tspecify that the stiffness refers to the spring in the Kelvin-Voigt model - slidergrid - grid of elastic sliders on a frictional surface
(HTM) git clone git://src.adamsgaard.dk/slidergrid
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit a4d6a166ba3981c6da4c01752f698f466c21a27e
(DIR) parent 3f9329b2ef127c8ae24bb399ebbf3697fda31011
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Wed, 23 Mar 2016 13:36:46 -0700
specify that the stiffness refers to the spring in the Kelvin-Voigt model
Diffstat:
M slidergrid/simulation.c | 8 ++++----
M slidergrid/slider.c | 22 ++++++++++++----------
M slidergrid/slider.h | 6 +++---
3 files changed, 19 insertions(+), 17 deletions(-)
---
(DIR) diff --git a/slidergrid/simulation.c b/slidergrid/simulation.c
t@@ -95,8 +95,8 @@ Float find_time_step(const slider* sliders, const int N, const Float safety)
for (i=0; i<N; i++) {
if (sliders[i].mass < smallest_mass)
smallest_mass = sliders[i].mass;
- if (sliders[i].bond_parallel_stiffness > largest_stiffness)
- largest_stiffness = sliders[i].bond_parallel_stiffness;
+ if (sliders[i].bond_parallel_kv_stiffness > largest_stiffness)
+ largest_stiffness = sliders[i].bond_parallel_kv_stiffness;
}
return safety/sqrt(largest_stiffness/smallest_mass);
t@@ -267,7 +267,7 @@ int save_sliders_to_vtk_file(
"Name=\"Bond-parallel stiffness [N/m]\" format=\"ascii\">\n");
fprintf(f, "\n ");
for (i=0; i<N; i++)
- fprintf(f, "%f ", sliders[i].bond_parallel_stiffness);
+ fprintf(f, "%f ", sliders[i].bond_parallel_kv_stiffness);
fprintf(f, " </DataArray>\n");
// bond-parallel viscosity
t@@ -275,7 +275,7 @@ int save_sliders_to_vtk_file(
"Name=\"Bond-parallel viscosity [N/(m/s)]\" format=\"ascii\">\n");
fprintf(f, " ");
for (i=0; i<N; i++)
- fprintf(f, "%f ", sliders[i].bond_parallel_viscosity);
+ fprintf(f, "%f ", sliders[i].bond_parallel_kv_viscosity);
fprintf(f, "\n </DataArray>\n");
fprintf(f, " </PointData>\n");
(DIR) diff --git a/slidergrid/slider.c b/slidergrid/slider.c
t@@ -24,8 +24,8 @@ void initialize_slider_values(slider* s)
s->mass = 0.0;
s->moment_of_inertia = 0.0;
- s->bond_parallel_stiffness = 0.0;
- s->bond_parallel_viscosity = 0.0;
+ s->bond_parallel_kv_stiffness = 0.0;
+ s->bond_parallel_kv_viscosity = 0.0;
// define all entries in neighbor list as empty
int i;
t@@ -195,23 +195,25 @@ void slider_interaction(slider* s1, const slider s2, const int idx_neighbor)
// determine the bond stiffness from the harmonic mean.
// differs from Potyondy & Stack 2004, eq. 6.
- const Float bond_parallel_stiffness =
- 2.*s1->bond_parallel_stiffness*s2.bond_parallel_stiffness/
- (s1->bond_parallel_stiffness + s2.bond_parallel_stiffness + 1.0e-40);
+ const Float bond_parallel_kv_stiffness =
+ 2.*s1->bond_parallel_kv_stiffness*s2.bond_parallel_kv_stiffness/
+ (s1->bond_parallel_kv_stiffness + s2.bond_parallel_kv_stiffness
+ + 1.0e-40);
// determine the bond viscosity from the harmonic mean.
- const Float bond_parallel_viscosity =
- 2.*s1->bond_parallel_viscosity*s2.bond_parallel_viscosity/
- (s1->bond_parallel_viscosity + s2.bond_parallel_viscosity + 1.0e-40);
+ const Float bond_parallel_kv_viscosity =
+ 2.*s1->bond_parallel_kv_viscosity*s2.bond_parallel_kv_viscosity/
+ (s1->bond_parallel_kv_viscosity + s2.bond_parallel_kv_viscosity
+ + 1.0e-40);
// bond-parallel elasticity
const Float3 f_n_elastic =
- multiply_scalar_float3(bond_parallel_stiffness,
+ multiply_scalar_float3(bond_parallel_kv_stiffness,
s1->neighbor_relative_distance_displacement[idx_neighbor]);
// bond-parallel viscosity
const Float3 f_n_viscous =
- multiply_scalar_float3(bond_parallel_viscosity,
+ multiply_scalar_float3(bond_parallel_kv_viscosity,
s1->neighbor_relative_distance_velocity[idx_neighbor]);
// bond-parallel force, counteracts tension and compression
(DIR) diff --git a/slidergrid/slider.h b/slidergrid/slider.h
t@@ -31,9 +31,9 @@ typedef struct {
// moment of inertia [kg m*m]
Float moment_of_inertia;
- // inter-slider contact model parameters
- Float bond_parallel_stiffness; // Hookean elastic stiffness [N/m]
- Float bond_parallel_viscosity; // viscosity [N/(m*s)]
+ // inter-slider bond-parallel Kelvin-Voigt contact model parameters
+ Float bond_parallel_kv_stiffness; // Hookean elastic stiffness [N/m]
+ Float bond_parallel_kv_viscosity; // viscosity [N/(m*s)]
// The uniquely identifying indexes of the slider neighbors which are bonded
// to this slider. A value of -1 denotes an empty field. Preallocated for