tRename compressive_strength_prefactor to fracture_toughness - Granular.jl - Ju… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 7a526c9d8656fe0956ca3c93d94dd9b64508ffe1 | |
parent fe8fa125a077cea7d9bcc7395728dc6297bd94c6 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 15 Feb 2018 16:05:45 -0500 | |
Rename compressive_strength_prefactor to fracture_toughness | |
Diffstat: | |
M src/datatypes.jl | 4 ++-- | |
M src/grain.jl | 28 ++++++++++++++-------------- | |
M src/interaction.jl | 16 ++++++++++++++-- | |
M src/io.jl | 4 ++-- | |
4 files changed, 32 insertions(+), 20 deletions(-) | |
--- | |
diff --git a/src/datatypes.jl b/src/datatypes.jl | |
t@@ -48,7 +48,7 @@ mutable struct GrainCylindrical | |
poissons_ratio::Float64 | |
tensile_strength::Float64 | |
tensile_heal_rate::Float64 | |
- compressive_strength_prefactor::Float64 | |
+ fracture_toughness::Float64 | |
# Ocean/atmosphere interaction parameters | |
ocean_drag_coeff_vert::Float64 | |
t@@ -139,7 +139,7 @@ mutable struct GrainArrays | |
poissons_ratio::Vector{Float64} | |
tensile_strength::Vector{Float64} | |
tensile_heal_rate::Vector{Float64} | |
- compressive_strength_prefactor::Vector{Float64} | |
+ fracture_toughness::Vector{Float64} | |
ocean_drag_coeff_vert::Vector{Float64} | |
ocean_drag_coeff_horiz::Vector{Float64} | |
diff --git a/src/grain.jl b/src/grain.jl | |
t@@ -15,7 +15,7 @@ export addGrainCylindrical! | |
contact_dynamic_friction, | |
youngs_modulus, poissons_ratio, | |
tensile_strength, tensile_heal_rate, | |
- compressive_strength_prefactor, | |
+ fracture_toughness, | |
ocean_drag_coeff_vert, | |
ocean_drag_coeff_horiz, | |
atmosphere_drag_coeff_vert, | |
t@@ -69,7 +69,7 @@ are optional, and come with default values. The only requir… | |
[Pa]. | |
* `tensile_heal_rate::Float64 = 0.`: rate at which contact-tensile bond streng… | |
is obtained [1/s]. | |
-* `compressive_strength_prefactor::Float64 = 0.`: maximum compressive | |
+* `fracture_toughness::Float64 = 0.`: maximum compressive | |
strength on granular contact (not currently enforced) [m^{1/2}*Pa]. A value | |
of 1.285e3 m^{1/2}*Pa is used for sea ice by Hopkins 2004. | |
* `ocean_drag_coeff_vert::Float64 = 0.85`: vertical drag coefficient for ocean | |
t@@ -152,7 +152,7 @@ function addGrainCylindrical!(simulation::Simulation, | |
poissons_ratio::Float64 = 0.185, # Hopkins 20… | |
tensile_strength::Float64 = 0., | |
tensile_heal_rate::Float64 = 0., | |
- compressive_strength_prefactor::Float64 = 0., | |
+ fracture_toughness::Float64 = 0., | |
ocean_drag_coeff_vert::Float64 = 0.85, # H&C 2… | |
ocean_drag_coeff_horiz::Float64 = 5e-4, # H&C … | |
atmosphere_drag_coeff_vert::Float64 = 0.4, # H… | |
t@@ -247,7 +247,7 @@ function addGrainCylindrical!(simulation::Simulation, | |
poissons_ratio, | |
tensile_strength, | |
tensile_heal_rate, | |
- compressive_strength_prefactor, | |
+ fracture_toughness, | |
ocean_drag_coeff_vert, | |
ocean_drag_coeff_horiz, | |
t@@ -409,7 +409,7 @@ function convertGrainDataToArrays(simulation::Simulation) | |
Array{Float64}(length(simulation.grains)), | |
## tensile_heal_rate | |
Array{Float64}(length(simulation.grains)), | |
- ## compressive_strength_prefactor | |
+ ## fracture_toughness | |
Array{Float64}(length(simulation.grains)), | |
# Ocean/atmosphere interaction parameters | |
t@@ -492,8 +492,8 @@ function convertGrainDataToArrays(simulation::Simulation) | |
ifarr.poissons_ratio[i] = simulation.grains[i].poissons_ratio | |
ifarr.tensile_strength[i] = simulation.grains[i].tensile_strength | |
ifarr.tensile_heal_rate[i] = simulation.grains[i].tensile_heal_rate | |
- ifarr.compressive_strength_prefactor[i] = | |
- simulation.grains[i].compressive_strength_prefactor | |
+ ifarr.fracture_toughness[i] = | |
+ simulation.grains[i].fracture_toughness | |
ifarr.ocean_drag_coeff_vert[i] = | |
simulation.grains[i].ocean_drag_coeff_vert | |
t@@ -564,7 +564,7 @@ function deleteGrainArrays!(ifarr::GrainArrays) | |
ifarr.poissons_ratio = f1 | |
ifarr.tensile_strength = f1 | |
ifarr.tensile_heal_rate = f1 | |
- ifarr.compressive_strength_prefactor = f1 | |
+ ifarr.fracture_toughness = f1 | |
ifarr.ocean_drag_coeff_vert = f1 | |
ifarr.ocean_drag_coeff_horiz = f1 | |
t@@ -625,10 +625,10 @@ function printGrainInfo(f::GrainCylindrical) | |
println(" μ_s: $(f.contact_static_friction)") | |
println(" μ_d: $(f.contact_dynamic_friction)\n") | |
- println(" E: $(f.youngs_modulus) Pa") | |
- println(" ν: $(f.poissons_ratio)") | |
- println(" σ_t: $(f.tensile_strength) Pa") | |
- println(" c(σ_c): $(f.compressive_strength_prefactor) m^0.5 Pa\n") | |
+ println(" E: $(f.youngs_modulus) Pa") | |
+ println(" ν: $(f.poissons_ratio)") | |
+ println(" tensile_strength: $(f.tensile_strength) Pa") | |
+ println(" fracture_toughness: $(f.fracture_toughness) m^0.5 Pa\n") | |
println(" c_o_v: $(f.ocean_drag_coeff_vert)") | |
println(" c_o_h: $(f.ocean_drag_coeff_horiz)") | |
t@@ -768,8 +768,8 @@ function compareGrains(if1::GrainCylindrical, if2::GrainCy… | |
@test if1.poissons_ratio ≈ if2.poissons_ratio | |
@test if1.tensile_strength ≈ if2.tensile_strength | |
@test if1.tensile_heal_rate ≈ if2.tensile_heal_rate | |
- @test if1.compressive_strength_prefactor ≈ | |
- if2.compressive_strength_prefactor | |
+ @test if1.fracture_toughness ≈ | |
+ if2.fracture_toughness | |
@test if1.ocean_drag_coeff_vert ≈ if2.ocean_drag_coeff_vert | |
@test if1.ocean_drag_coeff_horiz ≈ if2.ocean_drag_coeff_horiz | |
diff --git a/src/interaction.jl b/src/interaction.jl | |
t@@ -205,9 +205,14 @@ function interactGrains!(simulation::Simulation, i::Int, … | |
error("unknown contact_normal_rheology (k_n = $k_n, γ_n = $γ_n") | |
end | |
- # Contact tensile strength increases linearly with contact age until tensi… | |
- # stress exceeds tensile strength | |
+ compressive_strength = min(simulation.grains[i].fracture_toughness * | |
+ sqrt(simulation.grains[i].thickness), | |
+ simulation.grains[j].fracture_toughness * | |
+ sqrt(simulation.grains[j].thickness)) | |
+ # Add tensile strength during extension or limit compressive strength | |
if δ_n > 0. | |
+ # Contact tensile strength increases linearly with contact age until | |
+ # tensile stress exceeds tensile strength | |
# linearly increase tensile strength with time until max. value | |
tensile_strength = min(simulation.grains[i].contact_age[ic]/ | |
t@@ -224,6 +229,13 @@ function interactGrains!(simulation::Simulation, i::Int, … | |
simulation.grains[i].n_contacts -= 1 | |
simulation.grains[j].n_contacts -= 1 | |
end | |
+ | |
+ elseif fracture_toughness > 0. | |
+ # Limit compressive stress if the prefactor is set to a positive value | |
+ if abs(force_n) >= compressive_strength | |
+ | |
+ | |
+ end | |
end | |
if k_t ≈ 0. && γ_t ≈ 0. | |
diff --git a/src/io.jl b/src/io.jl | |
t@@ -404,8 +404,8 @@ function writeGrainVTK(simulation::Simulation, | |
"Tensile strength [Pa]") | |
WriteVTK.vtk_point_data(vtkfile, ifarr.tensile_heal_rate, | |
"Tensile healing rate [1/s]") | |
- WriteVTK.vtk_point_data(vtkfile, ifarr.compressive_strength_prefactor, | |
- "Compressive strength prefactor [m^0.5 Pa]") | |
+ WriteVTK.vtk_point_data(vtkfile, ifarr.fracture_toughness, | |
+ "Fracture toughness [m^0.5 Pa]") | |
WriteVTK.vtk_point_data(vtkfile, ifarr.ocean_drag_coeff_vert, | |
"Ocean drag coefficient (vertical) [-]") |