tdisable tensile strength by default, update vtk checksum - Granular.jl - Julia… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 2a4dadc0b0be793174bfbfbb1a7491908d15c05a | |
parent 6250a89c16baa8c912f836f2586cc9dc8e9537b6 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 25 May 2017 15:35:48 -0400 | |
disable tensile strength by default, update vtk checksum | |
Diffstat: | |
M src/icefloe.jl | 3 ++- | |
M src/interaction.jl | 2 +- | |
M test/cohesion.jl | 19 ++++++++++++++++++- | |
M test/vtk.jl | 2 +- | |
4 files changed, 22 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/src/icefloe.jl b/src/icefloe.jl | |
t@@ -30,7 +30,8 @@ function addIceFloeCylindrical(simulation::Simulation, | |
youngs_modulus::float = 2e7, | |
#youngs_modulus::float = 2e9, # Hopkins 2004 | |
poissons_ratio::float = 0.185, # Hopkins 2004 | |
- tensile_strength::float = 500e3, # Hopkins 2004 | |
+ #tensile_strength::float = 500e3, # Hopkins 20… | |
+ tensile_strength::float = 0., # Hopkins 2004 | |
compressive_strength_prefactor::float = 1285e3,… | |
# Hopkins 2004 | |
ocean_drag_coeff_vert::float = 0.85, # H&C 2011 | |
diff --git a/src/interaction.jl b/src/interaction.jl | |
t@@ -141,7 +141,7 @@ function interactIceFloes!(simulation::Simulation, i::Int,… | |
simulation.ice_floes[i].thickness | |
# break bond | |
- if abs(force_n) > tensile_strength*A_ij | |
+ if abs(force_n) >= tensile_strength*A_ij | |
force_n = 0. | |
force_t = 0. | |
simulation.ice_floes[i].contacts[ic] = 0 # remove contact | |
diff --git a/test/cohesion.jl b/test/cohesion.jl | |
t@@ -7,7 +7,7 @@ info("#### $(basename(@__FILE__)) ####") | |
verbose=false | |
-sim_init = SeaIce.createSimulation(id="test") | |
+sim_init = SeaIce.createSimulation() | |
SeaIce.addIceFloeCylindrical(sim_init, [0., 0.], 10., 1., verbose=verbose) | |
SeaIce.addIceFloeCylindrical(sim_init, [18., 0.], 10., 1., verbose=verbose) | |
sim_init.ice_floes[1].youngs_modulus = 1e-5 # repulsion is negligible | |
t@@ -20,3 +20,20 @@ SeaIce.setTotalTime!(sim, 10.) | |
sim.time_step = 1. | |
SeaIce.run!(sim, verbose=verbose) | |
@test sim.ice_floes[1].contact_age[1] ≈ sim.time | |
+ | |
+info("# Check if cohesion increases with time") | |
+sim = SeaIce.createSimulation(id="cohesion") | |
+SeaIce.addIceFloeCylindrical(sim, [0., 0.], 10., 1., verbose=verbose) | |
+SeaIce.addIceFloeCylindrical(sim, [19.5, 0.], 10., 1., verbose=verbose) | |
+sim.ice_floes[1].youngs_modulus = 1e-5 # repulsion is negligible | |
+sim.ice_floes[2].youngs_modulus = 1e-5 # repulsion is negligible | |
+SeaIce.setTimeStep!(sim) | |
+SeaIce.setTotalTime!(sim, 24.*60.*60.) | |
+sim.file_time_step = 60. | |
+# let the contact age for a while | |
+while sim.time_total*.9 > sim.time | |
+ SeaIce.run!(sim, single_step=true, verbose=verbose) | |
+end | |
+#sim_init.ice_floes[1].youngs_modulus = 2e7 | |
+#sim_init.ice_floes[2].youngs_modulus = 2e7 | |
+#SeaIce.setTimeStep!(sim) | |
diff --git a/test/vtk.jl b/test/vtk.jl | |
t@@ -26,7 +26,7 @@ else | |
end | |
icefloechecksum = | |
-"de1ee347a6a15c665d3fa122c73092b3aa200bf8180007303f43f71396094d8d " * | |
+"b34352d9fc151411d7cd60fcdfdfc29c5f6876928248b5e6916e8668d58b0887 " * | |
"test.icefloes.1.vtu\n" | |
oceanchecksum = |