Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/PhysicalModels/MagneticModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ end

struct HardMagnetic2D <: Magneto
μ::Float64
αr::Float64
αr::Ref{Float64}
χe::Float64
χr::Float64
βmok::Float64
βcoup::Float64
function HardMagnetic2D(; μ0::Float64, αr::Float64, χe::Float64=0.0, χr::Float64=8.0, βmok::Float64=0.0, βcoup::Float64=0.0)
new(μ0, αr, χe, χr, βmok, βcoup)
new(μ0, Ref(αr), χe, χr, βmok, βcoup)
end

function (obj::HardMagnetic2D)(Λ::Float64=1.0)
Expand Down
2 changes: 1 addition & 1 deletion src/PhysicalModels/MagnetoMechanicalModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function _getCoupling(mag::HardMagnetic2D, ::Mechano, Λ::Float64=1.0)
#-------------------------------------------------------------------------------------
Hℋ₀(F, ℋ₀) = H(F) * ℋ₀
Hℋ₀Hℋ₀(F, ℋ₀) = Hℋ₀(F, ℋ₀) ⋅ Hℋ₀(F, ℋ₀)
ℋᵣ(N) = αr * Λ* N
ℋᵣ(N) = αr[] * Λ* N
Fℋᵣ(F, N) = F * ℋᵣ(N)
Ψcoup(F, N) = (μ * J(F)) * (Fℋᵣ(F, N) ⋅ Fℋᵣ(F, N) - ℋᵣ(N) ⋅ ℋᵣ(N))
∂Ψcoup_∂F(F, N) = 2 * (μ * J(F)) * (Fℋᵣ(F, N) ⊗ ℋᵣ(N))
Expand Down