Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electric Machines #84

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
20 changes: 20 additions & 0 deletions src/material_data/MaterialProperties.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,26 @@ density and 12% higher modulus, as well as other improved properties """
density = 1700.0
dielectric_strength = 10e6

# -----------------------------------------------------
# Electric Steels
# -----------------------------------------------------
[M19]
description = """29-Gauge M-19 nonoriented steel;
Data from Ofori-Tenkorang, J.,
“Permanent-Magnet Synchronous Motors and Associated Power Electrics
for Direct-Drive Vehicle Propulsion,” Ph.D. Dissertation,
Massachusetts Institute of Technology, Cambridge, MA, 1996."""
density = 7750.0 #kg/m3
ke = 7.0963515e-5 # W/kg/Hz²/T² = 32.183e-6 W/lb/Hz²/T²
kh = 2.351412e-2 # W/kg/Hz = 10.664e-3 W/lb/Hz
alpha = 1.793
[Hiperco50]
description = """Hiperco® 50 alloy is an iron-cobalt-vanadium soft magnetic
alloy which exhibits high magnetic saturation (24 kilogauss),
high D.C. maximum permeability, low D.C. coercive force, and low A.C. core loss."""
density = 8110.0


# -----------------------------------------------------
# Thermal insulators
# -----------------------------------------------------
Expand Down
54 changes: 53 additions & 1 deletion src/misc/materials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

using TOML, DocStringExtensions

export StructuralAlloy, Conductor, Insulator, ThermalInsulator, thermal_conductivity
export StructuralAlloy, Conductor, Insulator, ElectricSteel,
ThermalInsulator, thermal_conductivity
export resistivity, resxden

__abs_path_prefix__ = dirname(@__DIR__)
MaterialProperties = TOML.parsefile(joinpath(__abs_path_prefix__,"material_data/MaterialProperties.toml"))
Expand Down Expand Up @@ -176,6 +178,56 @@
end

end
"""
$TYPEDEF

ElectricSteel.

$TYPEDFIELDS
"""
@kwdef struct ElectricSteel
"""Name"""
name::String = ""
"""Density [kg/m³]"""
ρ::Float64
"""Eddy current loss coefficient [W/lbm/Hz²/T²]"""
kₑ::Float64
"""Hysteresis loss coefficient [W/lbm/Hz]"""
kₕ::Float64
"""Exponential fit coefficient for hysteresis loss"""
α::Float64
end
"""
ElectricSteel(material::String)

Outer constructor for `ElectricSteel` types.
Material specified needs to have the following data in the database:
- ρ (density): Density [kg/m³]
- ke
- kh
- α
"""
function ElectricSteel(material::String)
local MatProp, ρ, ke, kh, α
try
MatProp = MaterialProperties[material]

Check warning on line 213 in src/misc/materials.jl

View check run for this annotation

Codecov / codecov/patch

src/misc/materials.jl#L210-L213

Added lines #L210 - L213 were not covered by tests
catch
error("Cannot find $material in Material Properties database")

Check warning on line 215 in src/misc/materials.jl

View check run for this annotation

Codecov / codecov/patch

src/misc/materials.jl#L215

Added line #L215 was not covered by tests
else
try
ρ = MatProp["density"]
ke = MatProp["ke"]
kh = MatProp["kh"]
α = MatProp["alpha"]

Check warning on line 221 in src/misc/materials.jl

View check run for this annotation

Codecov / codecov/patch

src/misc/materials.jl#L217-L221

Added lines #L217 - L221 were not covered by tests
catch
error("Insufficient data in database for $material to build a Conductor")

Check warning on line 223 in src/misc/materials.jl

View check run for this annotation

Codecov / codecov/patch

src/misc/materials.jl#L223

Added line #L223 was not covered by tests
else
Conductor(material, ρ, ke, kh, α)

Check warning on line 225 in src/misc/materials.jl

View check run for this annotation

Codecov / codecov/patch

src/misc/materials.jl#L225

Added line #L225 was not covered by tests
end
end

end


"""
resxden(cond::conductor)
Expand Down
Loading
Loading