Static Current Conduction vs MagnetoDynamics for current density calculations

Numerical methods and mathematical models of Elmer
Post Reply
TadasK
Posts: 18
Joined: 30 Mar 2021, 20:09
Antispam: Yes

Static Current Conduction vs MagnetoDynamics for current density calculations

Post by TadasK »

Greetings,

I am receiving rather strange results while trying to calculate skin effect (current density) using the Static Current Conduction model and MagnetoDynamic model.

1. Calculated current density over the cylinder using static current conduction model, the current density is uniform (boundary conditions on one end is 0V, on other 120V). I am attaching a Voltage plot. My assumption is that DC voltage is applied (correct me if I am wrong).
Stat_V.png
(97.36 KiB) Not downloaded yet
.sif file:

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Solver Input File = case.sif
  Post File = case.vtu
End

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 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
End

Solver 1
  Equation = Static Current Conduction
  Calculate Volume Current = True
  Procedure = "StatCurrentSolve" "StatCurrentSolver"
  Variable = Potential
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Equation 1
  Name = "Equation 1"
  Active Solvers(1) = 1
End

Material 1
  Name = "Copper (generic)"
  Density = 8960.0
  Poisson ratio = 0.34
  Heat expansion Coefficient = 16.5e-6
  Heat Capacity = 385.0
  Heat Conductivity = 401.0
  Electric Conductivity = 59.59e6
  Sound speed = 3810.0
  Mesh Poisson ratio = 0.34
  Youngs modulus = 115.0e9
End

Boundary Condition 1
  Target Boundaries(1) = 2 
  Name = "BoundaryCondition 1"
  Potential = 0
End

Boundary Condition 2
  Target Boundaries(1) = 3 
  Name = "BoundaryCondition 2"
  Potential = 120
End
2. The Same approach applied considered as previously mentioned only this time, 10 Hz AC voltage is applied. Although I can see that the voltage is quite a bit off. Naturally, the current density also does not make sense.
Mag_V_re.png
(61.97 KiB) Not downloaded yet
Mag_V_im.png
(64.03 KiB) Not downloaded yet
.sif file:

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Angular Frequency = 63
  Solver Input File = case.sif
  Post File = case.vtu
End

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 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
End

Solver 2
  Equation = MgHarm
  Procedure = "MagnetoDynamics" "WhitneyAVHarmonicSolver"
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Solver 1
  Equation = MgDynPost
  Calculate Current Density = True
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
  Exec Solver = Before Saving
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Equation 1
  Name = "Equation 1"
  Active Solvers(2) = 2 1
End

Material 1
  Name = "Copper (generic)"
  Heat Conductivity = 401.0
  Poisson ratio = 0.34
  Heat Capacity = 385.0
  Sound speed = 3810.0
  Relative Permittivity = 1
  Relative Permeability = 0.999994
  Mesh Poisson ratio = 0.34
  Density = 8960.0
  Electric Conductivity = 59.59e6
  Electric Conductivity = 59.59e6
  Relative Permeability = 0.999994
  Heat expansion Coefficient = 16.5e-6
  Youngs modulus = 115.0e9
End

Boundary Condition 1
  Target Boundaries(1) = 2 
  Name = "BoundaryCondition 1"
  AV re = 120
End

Boundary Condition 2
  Target Boundaries(1) = 3 
  Name = "BoundaryCondition 2"
  AV re = 0
End

My assumption for the 2nd case is that the current density in the middle part of the cylinder should be relatively close to 0.

Am I doing something wrong?
TadasK
Posts: 18
Joined: 30 Mar 2021, 20:09
Antispam: Yes

Re: Static Current Conduction vs MagnetoDynamics for current density calculations

Post by TadasK »

Current density calculations:

1. Static current conduction:
Stat_cur_den.png
(44.4 KiB) Not downloaded yet
2. MagnetoDynamics:
Mag_cur_den_re.png
(128.06 KiB) Not downloaded yet
Mag_cur_den_im.png
(120.69 KiB) Not downloaded yet
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Static Current Conduction vs MagnetoDynamics for current density calculations

Post by raback »

Hi

In harmonic case you cannot just limit the treatment to the conductor. Also, you need to give some BCs for the vector potential. See consistency test:

Code: Select all

https://github.com/ElmerCSC/elmerfem/tree/devel/fem/tests/mgdyn_harmonic_wire
or the same as a ElmerGUI tutorial.

-Peter
laurent
Posts: 11
Joined: 24 Apr 2018, 17:47
Antispam: Yes

Re: Static Current Conduction vs MagnetoDynamics for current density calculations

Post by laurent »

Hi Peter,
I've been running the test case 'wire' at https://github.com/ElmerCSC/elmerfem/tr ... monic_wire but I still struggle to get Elmer to compute:
* the total current across the wire
* the resistance of the wire
* the inductance of the wire

Elmer returns the correct ' Eddy current power' as well as the correct 'ElectroMagnetic Field Energy'.
Therefore I can manually work out the above values knowing the skin depth and using the formulas W=1/2*L*I² and P=Z*I² (Z is the complex impedance of the wire)... but it would be so nice to have Elmer do it for us.
From the many searches on that forum it looks doable (I think) but I failed miserably to implement it on your wire test case.

Could you please update the .sif file so that Elmer writes in a text file the total current, the resistance, and the inductance of the wire?
Thanks in anticipation.
Laurent
Post Reply