tuse ocean grid for ice-floe binning and contact search if it exists - Granular.jl - Julia package for granular dynamics simulation
(HTM) git clone git://src.adamsgaard.dk/Granular.jl
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit a79f1155bfb16f8da74ac94efe92e7d9eff79fb3
(DIR) parent 6ea9dc8a5734e221c53212c444ebd90b91eb578b
(HTM) Author: Anders Damsgaard <andersd@riseup.net>
Date: Sun, 30 Apr 2017 13:53:40 -0400
use ocean grid for ice-floe binning and contact search if it exists
Diffstat:
M src/contact_search.jl | 2 +-
M src/ocean.jl | 2 +-
M src/simulation.jl | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/src/contact_search.jl b/src/contact_search.jl
t@@ -17,7 +17,7 @@ within the vicinity. When this method is applied, it is assumed that the
* `method::String`: the contact-search method to apply. Valid options are "all
to all" and "ocean grid".
"""
-function findContacts!(simulation::Simulation,
+function findContacts!(simulation::Simulation;
method::String = "all to all")
if method == "all to all"
(DIR) diff --git a/src/ocean.jl b/src/ocean.jl
t@@ -285,6 +285,6 @@ function applyOceanDragToIceFloe!(ice_floe::IceFloeCylindrical,
width = ice_floe.areal_radius*2.
ice_floe.force +=
- rho_w * (.5*c_o_v*width*draft*freeboard + c_o_h*length*width) *
+ rho_o * (.5*c_o_v*width*draft*freeboard + c_o_h*length*width) *
([u, v] - ice_floe.vel)*norm([u, v] - ice_floe.vel)
end
(DIR) diff --git a/src/simulation.jl b/src/simulation.jl
t@@ -110,8 +110,10 @@ function run!(simulation::Simulation;
zeroForcesAndTorques!(simulation)
if typeof(simulation.ocean.input_file) != Bool
sortIceFloesInOceanGrid!(simulation)
+ findContacts!(simulation, method="ocean grid")
+ else
+ findContacts!(simulation, method="all to all")
end
- findContacts!(simulation)
interact!(simulation)
if typeof(simulation.ocean.input_file) != Bool
addOceanDrag!(simulation)