Problems with coilSolver

Numerical methods and mathematical models of Elmer
Post Reply
lazyTom
Posts: 33
Joined: 05 Jun 2013, 01:32
Antispam: Yes

Problems with coilSolver

Post by lazyTom » 20 Nov 2018, 01:18

Hi all,

I'm trying to solve for the current in a 3D closed coil (see picture below)
closed_loop_std_10_turns.jpg
closed_loop_std_10_turns.jpg (63.83 KiB) Viewed 636 times

Unfortunately the solution that I obtain with coil solver is not plausible (see picture below, a volumetric view of current density magnitude) because in this case current is a solenoidal field.
closed_loop_std_10_turns_current.jpg
closed_loop_std_10_turns_current.jpg (13.07 KiB) Viewed 635 times

Can anybody help me out with this problem?
Here is the link to mesh and sif file: https://www.dropbox.com/s/rpc51jatffecd ... l.zip?dl=0

The sif file can be found also below

Code: Select all


!!------ Skeleton for body section -----
!Body 1 = coil
!Body 2 = air top
!Body 3 = air bot

!BC 01 = external air (where vector potential is assumed to be 0)

Header
   Check Keywords "Warn"

Mesh DB "." "closed_loop_std_10_turns"    

  Include Path ""
  Results Directory ""
End

Simulation
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
! Coordinate Scaling=0.001  
  Simulation Type = Steady
  Steady State Max Iterations = 1
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(2) = 2 3
  Name = "Air"
  Equation = 2
  Material = 1
End

Body 2
  Target Bodies(1) = 1
  Name = "3D Coil 1"
  Equation = 1
  Material = 2
  Body Force = 1
End

Material 1
  Name = "Air (room temperature)"
  Viscosity = 1.983e-5
  Heat expansion Coefficient = 3.43e-3
  Heat Conductivity = 0.0257
  Sound speed = 343.0
  Density = 1.205
  Heat Capacity = 1005.0

  Relative Permittivity = Real 1
  Relative Permeability = Real 1
  Electric Conductivity = Real 0
End


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

  Relative Permittivity = Real 1
  Relative Permeability = Real 1
  Electric Conductivity = Real 5.96e7
End

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

Equation 2
  Name = "Equation magnetic field"
  Active Solvers(2) = 2 3
End

Solver 1
  Equation = "CoilSolver"

  Procedure = "CoilSolver" "CoilSolver"

!  Linear System Solver = direct 

  Linear System Solver = "Iterative"
  Linear System Preconditioning = ilu2
  Linear System Max Iterations = 1000
  Linear System Convergence Tolerance = 1e-10
!  Linear System Iterative Method = BiCGStabL
!  BicGStabL Polynomial Degree = 4
  Linear System Residual Output = 20
!  Steady State Convergence Tolerance = 1e-06


  Desired Coil Current = Real 1
  Calculate Coil Current = Logical True

  Optimize Bandwidth = False

  Nonlinear System Consistent Norm = Logical True

  Coil Closed = Logical True  
End


!===============================================  
!=========== MAGNETIC FIELD SOLVER =============  
Solver 2
!  Exec Solver = Never
  Equation = "MGDynamics"
  Variable = P
  Procedure = "MagnetoDynamics" "WhitneyAVSolver"
  Fix Input Current Density = Logical True

!  Linear System Symmetric = True
!  Optimize Bandwidth = True

  Steady State Convergence Tolerance = 1e-09
  Nonlinear System Convergence Tolerance = 1.0e-8
  Nonlinear System Max Iterations = 1
  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 = TFQMR
!  Linear System Iterative Method = GC 
!  Linear System Iterative Method = GCR
!  Linear System Iterative Method = BiCGStab
!  Linear System Iterative Method = BiCGStab2
!  Linear System Iterative Method = BiCGStabl
!  BicGStabL Polynomial Degree = 4

!  Linear System Preconditioning = none
!  Linear System Preconditioning = ILU2
!  Linear System ILUT Tolerance = 1.0e-3

!  Linear System Precondition Recompute = 1  
!  Linear System Residual Output = 20
!  Linear System Residual Output = 1

  Linear System Max Iterations = 1400 !5000
  Linear System Convergence Tolerance = 1.0e-8

  Linear System Abort Not Converged = False

!  Edge Basis = Logical True
!  Apply Mortar BCs = Logical True
!  Mortar BCs additive = True
 
End

Solver 3
!  Exec Solver = Never
  Equation = "MGDynamicsCalc"
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"

  Potential Variable = P

  Calculate Current Density = Logical True
  Calculate Electric Field  = Logical True
  Calculate Magnetic Field Strength = Logical True
  Calculate Magnetic Field Density = Logical True  

  Steady State Convergence Tolerance = 1e-09
  Linear System Solver = "Iterative"
!  Linear System Iterative Method = CG
  Linear System Iterative Method = BiCGStab
  
  Linear System Max Iterations = 5000
  Linear System Convergence Tolerance = 1.0e-8
End



Solver 4
!  Equation = Result Output
!  Exec Solver = Never
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Binary Output = True
  Output Format = vtu
  Output File Name = results
End

Solver 5
!  Equation = "scalars"
!  Exec Solver = Never  
  procedure = "SaveData" "SaveScalars"
  Filename = "data_scalars.dat"  
End


Boundary Condition 1
  Target Boundaries(1) = 1
  Name = "Outer space"
  P {e}= real 0
End


Body Force 1
  Name = "Current Density"

!  Current Density 1 = Equals Volume current 1
!  Current Density 2 = Equals Volume current 2
!  Current Density 3 = Equals Volume current 3

  Current Density 1 = Equals CoilCurrent 1
  Current Density 2 = Equals CoilCurrent 2
  Current Density 3 = Equals CoilCurrent 3


End

Many thanks,

Marco

raback
Site Admin
Posts: 3464
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Problems with coilSolver

Post by raback » 20 Nov 2018, 11:48

Hi Marco

Well, the CoilSolver has some heuristics which is meant for simple closed coils. It might be able to pull it of for cocentric loops but certainly spiral with the wire joining the ends a is too difficult. I would rather create a mesh with possibility to set voltages at the ends of the wire. Your mesh is already quite complex, it does not make it much more complex ;-)

-Peter

lazyTom
Posts: 33
Joined: 05 Jun 2013, 01:32
Antispam: Yes

Re: Problems with coilSolver

Post by lazyTom » 21 Nov 2018, 01:14

Hi Peter,

Will do :)

thanks for clarifying.

Marco

Post Reply