Skip to content

Commit

Permalink
Merge pull request #24 from ngomezve/materials_dev
Browse files Browse the repository at this point in the history
Small additions to new materials properties
  • Loading branch information
askprash committed Mar 26, 2024
2 parents de85b97 + 0284a55 commit b7f7f0e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
13 changes: 13 additions & 0 deletions src/material_data/MaterialProperties.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@
UTS = 505e6 #Ultimate tensile strength
shear_strength = 300e6

[Al-2219-T87]
description = """Aluminum-copper alloy with high strength, resistance to corrosion cracking and enhanced cryogenic properties.
Uses: Low-temperature structures, cryogenic fuel storage"""

source = "https://www.matweb.com/search/datasheet_print.aspx?matguid=86215ca4233a49fdb6b556235fc726b7"
density = 2840.0 #kg/m3
youngs_modulus = 73.1e9 #Pa
shear_modulus = 27e9 #Pa
poissons_ratio = 0.33
YTS = 393e6 #Yield tensile strength
UTS = 476e6 #Ultimate tensile strength
shear_strength = 280e6

[Ti-6242]
description = "Titanium 6242 alloy"
#Structural properties: https://www.matweb.com/search/datasheet_print.aspx?matguid=66f20965748441d8916768ed80be0cba
Expand Down
19 changes: 14 additions & 5 deletions src/misc/materials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Generic structural alloy.
$TYPEDFIELDS
"""
struct StructuralAlloy
@kwdef struct StructuralAlloy
"""Density [kg/m³]"""
ρ::Float64
"""Young's Modulus [Pa]"""
Expand All @@ -23,6 +23,12 @@ struct StructuralAlloy
σmax::Float64
"""Maximum Shear [Pa]"""
τmax::Float64
"""Yield tensile strength [Pa]"""
YTS::Float64
"""Ultimate tensile strength [Pa]"""
UTS::Float64
"""Ultimate shear strength [Pa]"""
USS::Float64
end

"""
Expand All @@ -38,7 +44,7 @@ Material specified needs to have the following data in the database:
- τmax: Maximum Shear [Pa]
"""
function StructuralAlloy(material::String; max_avg_stress = 1.1, safety_factor = 1.5)
local MatProp, ρ, E, G, ν, σmax, τmax
local MatProp, ρ, E, G, ν, σmax, τmax, YTS, UTS, USS
try
MatProp = MaterialProperties[material]
catch
Expand All @@ -49,12 +55,15 @@ function StructuralAlloy(material::String; max_avg_stress = 1.1, safety_factor =
E = MatProp["youngs_modulus"]
G = MatProp["shear_modulus"]
ν = MatProp["poissons_ratio"]
σmax = MatProp["YTS"]/max_avg_stress/safety_factor
τmax = MatProp["shear_strength"]/max_avg_stress/safety_factor
YTS = MatProp["YTS"]
UTS = MatProp["UTS"]
USS = MatProp["shear_strength"]
σmax = YTS/max_avg_stress/safety_factor
τmax = USS/max_avg_stress/safety_factor
catch
error("Insufficient data in database for $material to build a StructuralAlloy")
else
StructuralAlloy(ρ, E, G, ν, σmax, τmax)
StructuralAlloy(ρ, E, G, ν, σmax, τmax, YTS, UTS, USS)
end
end

Expand Down
3 changes: 3 additions & 0 deletions test/unit_test_materials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
Al = StructuralAlloy("Al-7075"; max_avg_stress = 1.0, safety_factor = 2.0)
@test Al.σmax == database["Al-7075"]["YTS"]/1.0/2.0
@test Al.τmax == database["Al-7075"]["shear_strength"]/1.0/2.0
@test Al.YTS == database["Al-7075"]["YTS"]
@test Al.UTS == database["Al-7075"]["UTS"]
@test Al.USS == database["Al-7075"]["shear_strength"]
end

@testset "Conductors" begin
Expand Down

0 comments on commit b7f7f0e

Please sign in to comment.