commit 3b72b5d77be841aba8b0a2080279f86437a09da4
parent b3cf8f83312722a474c192dad4f70e1bd86427d0
Author: Anders Damsgaard <andersd@riseup.net>
Date: Wed, 1 Nov 2017 14:13:38 -0400
change last few references to SeaIce to Granular in text files and example
Diffstat:
5 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/LICENSE.md b/LICENSE.md
@@ -1,4 +1,4 @@
-The SeaIce.jl package is licensed under the GNU Public License, Version 3.0+:
+The Granular.jl package is licensed under the GNU Public License, Version 3.0+:
> Copyright (c) 2017: Anders Damsgaard.
> This program is free software: you can redistribute it and/or modify
diff --git a/README.md b/README.md
@@ -7,7 +7,7 @@ A [Julia](https://julialang.org) package for granular mechanics.
| Documentation | Build Status (Linux/Mac) | Build Status (Win) | Test Coverage |
|:-------------:|:------------------------:|:------------------:|:-------------:|
-|[](https://anders-dc.github.io/Granular.jl/latest) | [](https://travis-ci.org/anders-dc/SeaIce.jl) | [](https://ci.appveyor.com/project/anders-dc/seaice-jl/) | [](http://codecov.io/github/anders-dc/SeaIce.jl?branch=master) |
+|[](https://anders-dc.github.io/Granular.jl/latest) | [](https://travis-ci.org/anders-dc/Granular.jl) | [](https://ci.appveyor.com/project/anders-dc/seaice-jl/) | [](http://codecov.io/github/anders-dc/Granular.jl?branch=master) |
## Installation
[Granular.jl](https://github.com/anders-dc/Granular.jl) is not yet registered
diff --git a/appveyor.yml b/appveyor.yml
@@ -30,7 +30,7 @@ build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "versioninfo();
- Pkg.clone(pwd(), \"SeaIce\"); Pkg.build(\"SeaIce\")"
+ Pkg.clone(pwd(), \"Granular\"); Pkg.build(\"Granular\")"
test_script:
- - C:\projects\julia\bin\julia -e "Pkg.test(\"SeaIce\")"
+ - C:\projects\julia\bin\julia -e "Pkg.test(\"Granular\")"
diff --git a/docs/src/index.md b/docs/src/index.md
@@ -1,10 +1,15 @@
-# SeaIce.jl
+# Granular.jl
*A [Julia](https://julialang.org) package for particle-based simulation of sea-ice dynamics.*
-`SeaIce.jl` is a flexible and computationally efficient 2d implementation of the discrete element method, made for simulating sea ice in a Lagrangian manner. Sea-ice floes are represented as particles, which can be forced by ocean and atmospheric velocity fields. The ice floes interact through elasto-viscous-frictional contact rheologies and obtain time-dependent tensile strength.
+`Granular.jl` is a flexible and computationally efficient 2d implementation of
+the discrete element method, made for simulating sea ice in a Lagrangian
+manner. Sea-ice floes are represented as particles, which can be forced by
+ocean and atmospheric velocity fields. The grains interact through
+elasto-viscous-frictional contact rheologies and obtain time-dependent tensile
+strength.
-The source code for SeaIce.jl is hosted on [Github](https://github.com/anders-dc/SeaIce.jl).
+The source code for Granular.jl is hosted on [Github](https://github.com/anders-dc/Granular.jl).
See the [Public API Index](@ref main-index) for the complete list of documented functions and types.
@@ -14,7 +19,7 @@ See the [Public API Index](@ref main-index) for the complete list of documented
[Anders Damsgaard](https://adamsgaard.dk), Geophysical Fluid Dynamics Laboratory, Princeton University.
### License
-SeaIce.jl is licensed under the GPLv3; see [LICENSE](https://github.com/anders-dc/SeaIce.jl/blob/master/LICENSE.md) for the full license text.
+Granular.jl is licensed under the GPLv3; see [LICENSE](https://github.com/anders-dc/Granular.jl/blob/master/LICENSE.md) for the full license text.
## Manual Outline
diff --git a/examples/double_gyre.jl b/examples/double_gyre.jl
@@ -1,7 +1,7 @@
#!/usr/bin/env julia
-import SeaIce
+import Granular
-sim = SeaIce.createSimulation(id="double_gyre")
+sim = Granular.createSimulation(id="double_gyre")
# Initialize ocean
L = [100e3, 50e3, 1e3]
@@ -9,7 +9,7 @@ Ly_constriction = 20e3
#n = [750, 500, 2] # high resolution
n = [30, 15, 2] # intermedite resolution
#n = [8, 5, 2] # coarse resolution
-sim.ocean = SeaIce.createRegularOceanGrid(n, L, name="double_gyre")
+sim.ocean = Granular.createRegularOceanGrid(n, L, name="double_gyre")
epsilon = 0.25 # amplitude of periodic oscillations
t = 0.
@@ -35,21 +35,21 @@ h = 1.
## N-S wall segments
for y in linspace(r, L[2]-r, Int(round((L[2] - 2.*r)/(r*2))))
- SeaIce.addIceFloeCylindrical!(sim, [r, y], r, h, fixed=true,
+ Granular.addGrainCylindrical!(sim, [r, y], r, h, fixed=true,
verbose=false)
- SeaIce.addIceFloeCylindrical!(sim, [L[1]-r, y], r, h, fixed=true,
+ Granular.addGrainCylindrical!(sim, [L[1]-r, y], r, h, fixed=true,
verbose=false)
end
## E-W wall segments
for x in linspace(3.*r, L[1]-3.*r, Int(round((L[1] - 6.*r)/(r*2))))
- SeaIce.addIceFloeCylindrical!(sim, [x, r], r, h, fixed=true,
+ Granular.addGrainCylindrical!(sim, [x, r], r, h, fixed=true,
verbose=false)
- SeaIce.addIceFloeCylindrical!(sim, [x, L[2]-r], r, h, fixed=true,
+ Granular.addGrainCylindrical!(sim, [x, L[2]-r], r, h, fixed=true,
verbose=false)
end
-n_walls = length(sim.ice_floes)
+n_walls = length(sim.grains)
info("added $(n_walls) fixed ice floes as walls")
@@ -70,31 +70,31 @@ for y in (4.*r + noise_amplitude):(2.*r + floe_padding):(L[2] - 4.*r -
x_ = x + noise_amplitude*(0.5 - rand())
y_ = y + noise_amplitude*(0.5 - rand())
- SeaIce.addIceFloeCylindrical!(sim, [x_, y_], r, h, verbose=false)
+ Granular.addGrainCylindrical!(sim, [x_, y_], r, h, verbose=false)
end
end
-n = length(sim.ice_floes) - n_walls
+n = length(sim.grains) - n_walls
info("added $(n) ice floes")
# Remove old simulation files
-SeaIce.removeSimulationFiles(sim)
+Granular.removeSimulationFiles(sim)
k_n = 1e6 # N/m
gamma_t = 1e7 # N/(m/s)
mu_d = 0.7
rotating = false
-for i=1:length(sim.ice_floes)
- sim.ice_floes[i].contact_stiffness_normal = k_n
- sim.ice_floes[i].contact_stiffness_tangential = k_n
- sim.ice_floes[i].contact_viscosity_tangential = gamma_t
- sim.ice_floes[i].contact_dynamic_friction = mu_d
- sim.ice_floes[i].rotating = rotating
+for i=1:length(sim.grains)
+ sim.grains[i].contact_stiffness_normal = k_n
+ sim.grains[i].contact_stiffness_tangential = k_n
+ sim.grains[i].contact_viscosity_tangential = gamma_t
+ sim.grains[i].contact_dynamic_friction = mu_d
+ sim.grains[i].rotating = rotating
end
# Set temporal parameters
-SeaIce.setTotalTime!(sim, 12.*60.*60.)
-SeaIce.setOutputFileInterval!(sim, 60.)
-SeaIce.setTimeStep!(sim)
+Granular.setTotalTime!(sim, 12.*60.*60.)
+Granular.setOutputFileInterval!(sim, 60.)
+Granular.setTimeStep!(sim)
-SeaIce.run!(sim, status_interval=1,
+Granular.run!(sim, status_interval=1,
contact_tangential_rheology="Linear Viscous Frictional")