Relative magnetic permeability and BH curve in iron ignored?

Numerical methods and mathematical models of Elmer
Post Reply
crobar
Posts: 49
Joined: 30 Mar 2014, 14:50
Antispam: Yes

Relative magnetic permeability and BH curve in iron ignored?

Post by crobar »

Hello,

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.

Code: Select all

$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.
geometry.png
geometry.png (5.72 KiB) Viewed 2760 times
result.png
result.png (48.42 KiB) Viewed 2760 times
Attachments
elmer_rel_permeability_test.zip
(1.86 MiB) Downloaded 162 times
Last edited by crobar on 02 Aug 2016, 10:39, edited 1 time in total.
crobar
Posts: 49
Joined: 30 Mar 2014, 14:50
Antispam: Yes

Re: Relative permeability ignored?

Post by crobar »

To give some further information, I get similar results with a nonlinear BH curve, my sif file and BH curve data (or rather HB curve) are shown below:

sif file:

Code: Select all

$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)

Code: Select all

0 0
0.7 355
0.8 405
0.9 470
1 555
1.1 673
1.2 836
1.3 1065
1.35 1220
1.4 1420
1.45 1720
1.5 2130
1.55 2670
1.6 3480
1.65 4500
1.7 5950
1.75 7650
1.8 10100
1.85 13000
1.9 15900
1.95 21100
2 26300
2.05 32900
2.1 42700
2.15 61700
2.2 84300
2.25 110000
2.3 135000
2.41 200000
2.69 400000
3.22 800000
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
hb_curve_field_slice.png (151.26 KiB) Viewed 2745 times
Bavragor
Posts: 32
Joined: 07 Nov 2013, 14:10
Antispam: Yes

Re: Relative permeability ignored?

Post by Bavragor »

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.

Code: Select all

Material 3
  Name = "Iron"
  Density = 7500
  Electric Conductivity = 0.0
  Relative Permeability = 1000.0
 
  H-B Curve(31,2) = Real
   INCLUDE HB
End
crobar
Posts: 49
Joined: 30 Mar 2014, 14:50
Antispam: Yes

Re: Relative permeability ignored?

Post by crobar »

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.

Or at least, this is what I intended to do.
crobar
Posts: 49
Joined: 30 Mar 2014, 14:50
Antispam: Yes

Re: Relative magnetic permeability and BH curve in iron ignored?

Post by crobar »

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.
Post Reply