granular-basin

tectonic deformation experiments with Granular.jl
git clone git://src.adamsgaard.dk/granular-basin # fast
git clone https://src.adamsgaard.dk/granular-basin.git # slow
Log | Files | Refs | README Back to index

commit a3f32f2fadbc2f1d084ed8d1a9ffc65c4fbb1fa5
parent 42382e5d6b9acf70eed765df9a7cb243e2b9d125
Author: esbenpalmstrom <esbenpalmstroem@gmail.com>
Date:   Mon, 22 Nov 2021 17:02:54 +0100

minor changes

Diffstat:
Mcompact_basin.jl | 2+-
Minit_basin.jl | 18++++++++++++++----
Mlayer_basin.jl | 25++++++++++++++++---------
3 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/compact_basin.jl b/compact_basin.jl @@ -8,7 +8,7 @@ t_start = Dates.now() # Save the start time, print the end time later. # lav en lille test? se om dit appendede carpet stadig er forbundet til hoved- # simulationsobjektet -id = "simulation200" # id of simulation to load +id = "simulation1000" # id of simulation to load N = 20e3 # amount of stress to be applied t_comp = 5.0 # compaction max duration [s] diff --git a/init_basin.jl b/init_basin.jl @@ -7,13 +7,16 @@ t_start = Dates.now() # Save the start time, print the end time later. ############# Initialization Settings ############# -t_init = 1.0 # duration of initialization [s] -t_stack = 0.5 # duration for each stack to settle [s] +t_init = 0.8 # duration of initialization [s] +t_stack = 0.8 # duration for each stack to settle [s] g = [0.,-9.8] # vector for direction and magnitude of gravitational acceleration of grains -ngrains = 200 # total number of grains -aspect_ratio = 2 # should be x times as wide as it is tall +ngrains = 40000 # total number of grains +aspect_ratio = 4 # should be x times as wide as it is tall + +mkpath("simulation$(ngrains)") + stacks = 2 # number of duplicate stacks on top of the initial grains @@ -95,6 +98,10 @@ Granular.setTimeStep!(sim) # set appropriate time steps Granular.setTotalTime!(sim, t_init) # set total time Granular.setOutputFileInterval!(sim, .01) # how often vtu files should be outputted +cd("simulation$(ngrains)") + +sim.id = "init" + Granular.run!(sim) @@ -212,11 +219,14 @@ Granular.setTotalTime!(sim, 0.5) Granular.setTimeStep!(sim) Granular.setOutputFileInterval!(sim, .01) + Granular.run!(sim) # save the simulation and the carpet objects +cd("..") + Granular.writeSimulation(sim, filename = "simulation$(ngrains)/init.jld2") diff --git a/layer_basin.jl b/layer_basin.jl @@ -3,7 +3,7 @@ import JLD2 import PyPlot import Dates -id = "simulation200" # id of simulation to load, just write the folder +id = "simulation1000" # id of simulation to load, just write the folder # name here # Layer interface positions @@ -20,6 +20,13 @@ tensile_strength = [0.0,0.0,0.0] # strength of bonds between grains contact_dynamic_friction = [0.4,0.4,0.4] # friction between grains rotating = [true,true,true] # can grains rotate or not +#mechanical properties for carpet +carpet_youngs_modulus = 2e7 # elastic modulus +carpet_poissons_ratio = 0.185 # shear stiffness ratio +carpet_tensile_strength = Inf # strength of bonds between grains +carpet_contact_dynamic_friction = 0.4 # friction between grains +carpet_rotating = true # can grains rotate or not + sim = Granular.readSimulation("$(id)/comp.jld2") carpet = Granular.readSimulation("$(id)/carpet.jld2") SimSettings = SimSettings = JLD2.load("$(id)/SimSettings.jld2") @@ -64,23 +71,23 @@ end #set the mechanical settings for the carpet for grain in carpet.grains - grain.youngs_modulus = youngs_modulus[2] - grain.poissons_ratio = poissons_ratio[2] - grain.tensile_strength = tensile_strength[2] - grain.contact_dynamic_friction = contact_dynamic_friction[2] - grain.rotating = rotating[2] + grain.youngs_modulus = carpet_youngs_modulus + grain.poissons_ratio = carpet_poissons_ratio + grain.tensile_strength = carpet_tensile_strength + grain.contact_dynamic_friction = carpet_contact_dynamic_friction + grain.rotating = carpet_rotating end -""" + cd("$id") sim.id = "layered" Granular.resetTime!(sim) -Granular.setTotalTime!(sim,0.3) +Granular.setTotalTime!(sim,0.05) Granular.run!(sim) cd("..") -""" + Granular.writeSimulation(sim, filename = "$(id)/layered.jld2")