commit eef611de8522c106573dd4104309929a38fa9b33
parent 6df58ae1a8cbb02ac91f0e3613623a8632d81dba
Author: Anders Damsgaard <andersd@riseup.net>
Date: Tue, 7 Nov 2017 10:03:49 -0500
update documentation with description of package contents
Diffstat:
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/docs/make.jl b/docs/make.jl
@@ -10,7 +10,8 @@ makedocs(
"Home" => "index.md",
"Manual" => Any[
"man/installation.md",
- "man/simple_example.md",
+ "man/package_contents.md",
+ "man/getting_started.md",
],
"Library" => Any[
"Public API" => "lib/public.md",
diff --git a/docs/src/index.md b/docs/src/index.md
@@ -4,10 +4,10 @@
`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.
+manner. Grains are represented as particles, which can be forced by drag in
+grids, such as ocean and atmospheric velocity fields. The grains interact
+through elasto-viscous-frictional contact rheologies and can obtain
+time-dependent tensile strength.
The source code for Granular.jl is hosted on [Github](https://github.com/anders-dc/Granular.jl).
@@ -26,7 +26,8 @@ Granular.jl is licensed under the GPLv3; see [LICENSE](https://github.com/anders
```@contents
Pages = [
"man/installation.md",
- "man/simple_example.md",
+ "man/package_contents.md",
+ "man/getting_started.md",
]
Depth = 1
```
diff --git a/examples/shear.jl b/examples/shear.jl
@@ -13,18 +13,16 @@ Granular.regularPacking!(sim, [10, 50], 0.2, 1.0)
# Create a grid for contact searching spanning the extent of the grains
Granular.fitGridToGrains!(sim, sim.ocean)
-# Make the ocean grid drag grains uniformly towards -y
-sim.ocean.v[:, :, 1, 1] = -5.0
-
# Make the top and bottom boundaries impermeable, and the side boundaries
# periodic, which will come in handy during shear
Granular.setGridBoundaryConditions!(sim.ocean, "impermeable", "north south")
Granular.setGridBoundaryConditions!(sim.ocean, "periodic", "east west")
-# Add gravitational acceleration to all grains
+# Add gravitational acceleration to all grains and disable ocean-grid drag
g = [0., -9.8]
for grain in sim.grains
Granular.addBodyForce!(grain, grain.mass*g)
+ Granular.disableOceanDrag!(grain)
end
# Automatically set the computational time step based on grain sizes and
@@ -52,6 +50,8 @@ Granular.render(sim, trim=false)
#### Step 2: Consolidate the previous output under a constant normal stress #
################################################################################
+# Set all linear and rotational velocities to zero
+Granular.zeroKinematics!(sim)