I'm trying to model a simple bar magnet beside a piece of iron. In my sif file I have set the 'Relative Permeability' of the material but it doesn't seem to have any effect, it's just treated like the surrounding air. I've attached my whole project including sif and mesh etc. in the attached file, but below is the sif file. Can anyone suggest what I might be doing wrong? I just can't see anything obvious.
$filename = "elmer_rel_permeability_test"
! ======================================================================!
! HEADER !
! ======================================================================!
Header
CHECK KEYWORDS "Warn"
Mesh DB "." $filename
End
! ======================================================================!
! Simulation !
! ======================================================================!
Simulation
Max Output Level = 7
Coordinate System = "Cartesian 3D"
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals = 1
Use Mesh Names = Logical True
!Post File = $filename".ep" Postfile aus
End
! ======================================================================!
! Constants !
! ======================================================================!
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
! ======================================================================!
! Body, Material, Body Force, Initial Cond. !
! ======================================================================!
Material 1
Name = "Air"
Density = 1000
Electric Conductivity = 0.0
Relative Permeability = 1.0
End
Material 2
Name = "Magnet"
Density = 1000
Electric Conductivity = 0.0
Relative Permeability = 1.05
End
Material 3
Name = "Iron"
Density = 7500
Electric Conductivity = 0.0
Relative Permeability = 1000.0
End
Body 1
Name = "magnet"
Equation = 1
Material = 2
Body Force = 1
End
Body 2
Name = "air_box"
Equation = 1
Material = 1
End
Body 3
Name = "steel_piece"
Equation = 1
Material = 3
End
Body Force 1
Name = "Magnetization"
Magnetization 1 = Real 0.0
Magnetization 2 = Real 0.0
Magnetization 3 = Real 1000
End
! ======================================================================!
! Equations and Solvers !
! ======================================================================!
Solver 1
Equation = "MGDynamics"
Variable = "A"
Procedure = "MagnetoDynamics" "WhitneyAVSolver"
Fix Input Current Density = Logical True
Newton-Raphson Iteration = Logical True
Nonlinear System Max Iterations = 30
Nonlinear System Convergence Tolerance = 1e-6
Linear System Symmetric = Logical True
Linear System Solver = "Iterative"
Linear System Preconditioning = None
Linear System Convergence Tolerance = 1e-8
Linear System Residual Output = 100
Linear System Max Iterations = 5000
Linear System Iterative Method = CG
Steady State Convergence Tolerance = 1e-6
End
Solver 2
Equation = "MGDynamicsCalc"
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
Linear System Symmetric = True
Potential Variable = String "A"
Calculate Magnetic Field Strength = Logical True
Calculate Magnetic Vector Potential = Logical True
Steady State Convergence Tolerance = 0
Linear System Solver = "Iterative"
Linear System Preconditioning = None
Linear System Residual Output = 0
Linear System Max Iterations = 5000
Linear System Iterative Method = CG
Steady State Convergence Tolerance = 1e-6
Linear System Convergence Tolerance = 1.0e-8
End
Solver 3
Exec Solver = after all
Equation = "ResultOutput"
Procedure = "ResultOutputSolve" "ResultOutputSolver"
!Output File Name = $filename".dat"
Output File Name = $filename
Save Geometry Ids = Logical True
Vector Field 1 = String Magnetic Field Strength
Vector Field 2 = String Magnetic Flux Density
Vector Field 3 = String Magnetic Vector Potential
Potential Variable = String av
Show Variables = Logical True
Vtu format = Logical True
End
Equation 1
Name = "Coupled Equations"
Active Solvers(2) = 1 2
End
! ======================================================================!
! Boundary Condition Section !
! ======================================================================!
! ----- names for boundaries -----
!$ outer_bound = 1
Boundary Condition 1
Name = "outer_boundary"
A = Real 0.0
A {e} = Real 0.0
End
Below are pics of the geometry (which is just a bar magnet beside a piece of steel/iron) and result. The steel doesn't seem to have any effect on the magnetic flux.
$filename = "elmer_rel_permeability_test"
! ======================================================================!
! HEADER !
! ======================================================================!
Header
CHECK KEYWORDS "Warn"
Mesh DB "." $filename
End
! ======================================================================!
! Simulation !
! ======================================================================!
Simulation
Max Output Level = 7
Coordinate System = "Cartesian 3D"
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals = 1
Use Mesh Names = Logical True
!Post File = $filename".ep" Postfile aus
End
! ======================================================================!
! Constants !
! ======================================================================!
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
! ======================================================================!
! Body, Material, Body Force, Initial Cond. !
! ======================================================================!
Material 1
Name = "Air"
Density = 1000
Electric Conductivity = 0.0
Relative Permeability = 1.0
End
Material 2
Name = "Magnet"
Density = 1000
Electric Conductivity = 0.0
Relative Permeability = 1.05
End
Material 3
Name = "Iron"
Density = 7500
Electric Conductivity = 0.0
Relative Permeability = 1000.0
H-B Curve(31,2) = Real
INCLUDE HB
End
Body 1
Name = "magnet"
Equation = 1
Material = 2
Body Force = 1
End
Body 2
Name = "air_box"
Equation = 1
Material = 1
End
Body 3
Name = "steel_piece"
Equation = 1
Material = 3
End
Body Force 1
Name = "Magnetization"
Magnetization 1 = Real 0.0
Magnetization 2 = Real 0.0
Magnetization 3 = Real 979000
End
! ======================================================================!
! Equations and Solvers !
! ======================================================================!
Solver 1
Equation = "MGDynamics"
Variable = "A"
Procedure = "MagnetoDynamics" "WhitneyAVSolver"
Fix Input Current Density = Logical True
Newton-Raphson Iteration = Logical True
Nonlinear System Max Iterations = 30
Nonlinear System Convergence Tolerance = 1e-6
Linear System Symmetric = Logical True
Linear System Solver = "Iterative"
Linear System Preconditioning = None
Linear System Convergence Tolerance = 1e-8
Linear System Residual Output = 100
Linear System Max Iterations = 5000
Linear System Iterative Method = CG
Steady State Convergence Tolerance = 1e-6
End
Solver 2
Equation = "MGDynamicsCalc"
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
Linear System Symmetric = True
Potential Variable = String "A"
Calculate Magnetic Field Strength = Logical True
Calculate Magnetic Vector Potential = Logical True
Steady State Convergence Tolerance = 0
Linear System Solver = "Iterative"
Linear System Preconditioning = None
Linear System Residual Output = 0
Linear System Max Iterations = 5000
Linear System Iterative Method = CG
Steady State Convergence Tolerance = 1e-6
Linear System Convergence Tolerance = 1.0e-8
End
Solver 3
Exec Solver = after all
Equation = "ResultOutput"
Procedure = "ResultOutputSolve" "ResultOutputSolver"
!Output File Name = $filename".dat"
Output File Name = $filename
Save Geometry Ids = Logical True
Vector Field 1 = String Magnetic Field Strength
Vector Field 2 = String Magnetic Flux Density
Vector Field 3 = String Magnetic Vector Potential
Potential Variable = String av
Show Variables = Logical True
Vtu format = Logical True
End
Equation 1
Name = "Coupled Equations"
Active Solvers(2) = 1 2
End
! ======================================================================!
! Boundary Condition Section !
! ======================================================================!
! ----- names for boundaries -----
!$ outer_bound = 1
Boundary Condition 1
Name = "outer_boundary"
A = Real 0.0
A {e} = Real 0.0
End
HB curve data (taken from elmer test mgdyn_bh or something like this)
This results in the field shown below (magnetic flux density taken as a slice through th magnet and iron). Now, I haven't taken any specific measurement, but It seems pretty clear the iron is still just being treated like air since the field at both ends of the magnet looks pretty much the same.
hb_curve_field_slice.png (151.26 KiB) Viewed 4495 times
The picture of the slice looks like there is a small different between the side with steel and the opposite side without it. Paraview have the option "Probe Location". With this function you can check if the relative permeability is 1000 or 1 (or something else).
And maybe you should use the H-B Curve or a relative permeability.
Bavragor wrote:The picture of the slice looks like there is a small different between the side with steel and the opposite side without it. Paraview have the option "Probe Location". With this function you can check if the relative permeability is 1000 or 1 (or something else).
I don't really think so, but thanks, I'll try using the probe. Are you also suggesting I can output the relative permeability to the vtu file and look at this? How do I output this information? Ill check the flux density values first anyway.
Bavragor wrote:
And maybe you should use the H-B Curve or a relative permeability.
If you see my two posts, this is exactly what I've done. Just the relative permeability in the first case, and a B-H curve in the second case.
Ok, I've now tried a different BH curve for Iron and got results closer to what I expect. I'll post the results up here later in case anyone is interested.