Static vs Transient Simulation

General discussion about Elmer
Marc
Posts: 16
Joined: 30 Nov 2022, 16:37
Antispam: Yes

Re: Static vs Transient Simulation

Post by Marc »

The mesh files
Attachments
mesh.zip
(852.52 KiB) Downloaded 44 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Static vs Transient Simulation

Post by kevinarden »

Please also post updated sif files
Marc
Posts: 16
Joined: 30 Nov 2022, 16:37
Antispam: Yes

Re: Static vs Transient Simulation

Post by Marc »

sif for steady state and generator of restart file

Code: Select all

$ B_PM = 1.19			! [T] remanent flux density
$ mu_PM = 1.03		! permeability of PMs
$ H_PM = B_PM/(mu_PM*pi*4e-7) 	! magnetization of PMs
$ alpha = 17.5*pi/180
$ w_m = 1200/60*2*pi		! [rad/s] mech frequency
$ pp = 4			! number of polepairs
$ w_el = w_m*pp			! [rad/s] electrical frequency

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "ADPV4"
  Include Path ""
  Results Directory "ResultsADPV4stat"
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) = 1
  Coordinate Scaling = 1e-3
  Solver Input File = case.sif
  Post File = case.vtu
  Output File = restart.data
  Binary Output = logical True
End

Constants
  Permittivity of Vacuum = 8.85418781e-12
  Permeability of Vacuum = 1.25663706e-6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Materials !!!!!!!!!!!!!!!!!!!!!!!!!!!

Material 1
  Name = "M19_29G"
  H-B Curve = Variable coupled iter
    Real Cubic 
      Include  M19_29G.txt   
    End
  Electric Conductivity = 1.9e6  
End

Material 2
  Name = "Air (room temperature)"
  Relative Permittivity = 1.00059
  Relative Permeability = 1.00000037
End

Material 3
  Name = "PM1"
  Relative Permeability = $ mu_PM
  Magnetization 1 = $ H_PM*cos(-alpha)
  Magnetization 2 = $ H_PM*sin(-alpha)
  Electric Conductivity = 0
End

Material 4
  Name = "PM2"
  Relative Permeability = $ mu_PM
  Magnetization 1 = $ H_PM*cos(alpha)
  Magnetization 2 = $ H_PM*sin(alpha)
  Electric Conductivity = 0
End

Material 5
  Name = "Copper (generic)"
  Relative Permeability = 0.999994
  Electric Conductivity = 59.59e6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Boundary conditions !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

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

Boundary Condition 3
  Target Boundaries(1) = 3
  Name = "StatorPeriodic"
  Mortar BC = Integer 4
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 4:: Target Boundaries(1) = 4 

Boundary Condition 5
  Target Boundaries(1) = 5
  Name = "RotorPeriodic"
  Mortar BC = Integer 6
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 6:: Target Boundaries(1) = 6

Boundary Condition 7
  Target Boundaries(1) = 7
  Name = "Sliding" 
  Discontinuous Boundary = Logical True
  Mortar BC = Integer 8
  Galerkin Projector = Logical True
  Anti Rotational Projector = Logical True
End
Boundary condition8:: Target Boundaries(1)=9
!!!!!!!!!!!!!!!!!!!!!!!!!!  Body forces !!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!  Solver parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Solver 1
  Equation = MgDyn2D
  Procedure = "MagnetoDynamics2D" "MagnetoDynamics2D"
  Variable = Potential
  Exec Solver = Always
  
  Nonlinear System Convergence Tolerance = 1.0e-5
  Nonlinear System Max Iterations = 20
  Nonlinear System Relaxation Factor = 1

  Nonlinear System Convergence Without Constraints = Logical True

  Linear System Solver = Direct	
  Linear System Direct Method = UMFPACK
End

Solver 2
  Equation = ComputeB

  Target Variable= Potential
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"

  Linear System Solver = Iterative
  Linear System Iterative Method = BicgstabL
  Linear System Symmetric = True
  Linear System Max Iterations = 100
  Linear System Preconditioning = ILU2
  Linear System Convergence Tolerance = 1.0e-8
End

Solver 3
  Exec Solver = After Timestep
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = "stepEMF"
  Vtu Format = True
  Binary Output = True
  Single Precision = True
  Save Geometry Ids = True
End

Solver 4
  Exec Solver = After Timestep
  Equation = SaveLine
  Procedure = "SaveData" "SaveLine"
  Save Flux = True
  Flux Variable = B
  Filename = "lineEMF.dat"
End 

Solver 5
  Exec Solver = After Timestep
  Filename = "scalarsEMF.dat"
  Procedure = "SaveData" "SaveScalars"
  Show Norm Index = 1
End 

!!!!!!!!!!!!!!!!!!!!!!!!!!  Bodies !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body 1
  Target Bodies(1) = 1
  Name = "Stator"
  Equation = 1
  Material = 1
End

Body 2
  Target Bodies(1) = 2
  Name = "Rotor"
  Equation = 1
  Material = 1
  Body Force = 1 
End

Body 3
  Target Bodies(1) = 3
  Name = "PM1"
  Equation = 1
  Material = 3
  Body Force = 1 
End

Body 4
  Target Bodies(1) = 4
  Name = "PM2"
  Equation = 1
  Material = 4
  Body Force = 1 
End

Body 5
  Target Bodies(1) = 5
  Name = "PMair"
  Equation = 1
  Material = 2
  Body Force = 1 
End

Body 6
  Target Bodies(1) = 6
  Name = "U+"
  Equation = 1
  Material = 5
End

Body 7
  Target Bodies(1) = 7
  Name = "W-"
  Equation = 1
  Material = 5
End

Body 8
  Target Bodies(1) = 8
  Name = "V-"
  Equation = 1
  Material = 5
End

Body 9
  Target Bodies(1) = 9
  Name = "RotorAirgap"
  Equation = 1
  Material = 2
  Body Force = 1
End

Body 10
  Target Bodies(1) = 10
  Name = "StatorAirgap"
  Equation = 1
  Material = 2
  R Inner = Real 80.57515e-3
  R Outer = Real 80.9625e-3
End

Sif for scanning

Code: Select all

$ B_PM = 1.19			! [T] remanent flux density
$ mu_PM = 1.03		! permeability of PMs
$ H_PM = B_PM/(mu_PM*pi*4e-7) 	! magnetization of PMs
$ alpha = 17.5*pi/180
$ w_m = 1200/60*2*pi		! [rad/s] mech frequency
$ pp = 4			! number of polepairs
$ w_el = w_m*pp			! [rad/s] electrical frequency

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

Simulation
  Max Output Level = 3
  Coordinate System = Cartesian 
  Coordinate Mapping(3) = 1 2 3
  Coordinate Scaling = 0.001
  Simulation Type = Scanning
  TimeStepping Method = BDF
  Output Intervals = 1
  Solver Input File = case.sif
  Timestep Sizes = $ 1/(w_el/2/pi)/50 !180 samples per el. period
  Timestep Intervals = 50
End

Constants
  Permittivity of Vacuum = 8.85418781e-12
  Permeability of Vacuum = 1.25663706e-6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Materials !!!!!!!!!!!!!!!!!!!!!!!!!!!

Material 1
  Name = "M19_29G"
  H-B Curve = Variable coupled iter
    Real Cubic 
      Include  M19_29G.txt   
    End
  Electric Conductivity = 1.9e6  
End

Material 2
  Name = "Air (room temperature)"
  Relative Permittivity = 1.00059
  Relative Permeability = 1.00000037
End


Material 3
  Name = "PM1"
  Relative Permeability = $ mu_PM
  Magnetization 1 = Variable time, timestep size 
   Real MATC "H_PM*cos((w_m*(tx(0)-tx(1)))-alpha)" 
  Magnetization 2 = Variable time, timestep size 
   Real MATC "H_PM*sin((w_m*(tx(0)-tx(1)))-alpha)" 
  Electric Conductivity = 0
End

Material 4
  Name = "PM2"
  Relative Permeability = $ mu_PM
  Magnetization 1 = Variable time, timestep size 
   Real MATC "H_PM*cos((w_m*(tx(0)-tx(1)))+alpha)" 
  Magnetization 2 = Variable time, timestep size 
   Real MATC "H_PM*sin((w_m*(tx(0)-tx(1)))+alpha)" 
  Electric Conductivity = 0
End

Material 5
  Name = "Copper (generic)"
  Relative Permeability = 0.999994
  Electric Conductivity = 59.59e6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Boundary conditions !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

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

Boundary Condition 3
  Target Boundaries(1) = 3
  Name = "StatorPeriodic"
  Mortar BC = Integer 4
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 4:: Target Boundaries(1) = 4 

Boundary Condition 5
  Target Boundaries(1) = 5
  Name = "RotorPeriodic"
  Mortar BC = Integer 6
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 6:: Target Boundaries(1) = 6

Boundary Condition 7
  Target Boundaries(1) = 7
  Name = "Sliding" 
  Discontinuous Boundary = Logical True
  Mortar BC = Integer 8
  Galerkin Projector = Logical True
  Anti Rotational Projector = Logical True
End
Boundary condition8:: Target Boundaries(1)=9

!!!!!!!!!!!!!!!!!!!!!!!!!!  Body forces !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body Force 1
  Name = "BodyForce_Rotation"
  Mesh Rotate 3 = Variable time, timestep size
    Real MATC "180/pi*w_m*(tx(0)-tx(1))"  		! in degrees
End


!!!!!!!!!!!!!!!!!!!!!!!!!!  Solver parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Solver 1
  Exec Solver = Before Timestep
  Equation = MeshDeform
  Procedure = "RigidMeshMapper" "RigidMeshMapper"
End

Solver 2
  Equation = MgDyn2D
  Procedure = "MagnetoDynamics2D" "MagnetoDynamics2D"
  Variable = Potential
  Exec Solver = Always
  
  Nonlinear System Convergence Tolerance = 1.0e-5
  Nonlinear System Max Iterations = 20
  Nonlinear System Relaxation Factor = 1

  Nonlinear System Convergence Without Constraints = Logical True

  Linear System Solver = Direct	
  Linear System Direct Method = UMFPACK
End

Solver 3
  Equation = ComputeB

  Target Variable= Potential
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"

  Linear System Solver = Iterative
  Linear System Iterative Method = BicgstabL
  Linear System Symmetric = True
  Linear System Max Iterations = 100
  Linear System Preconditioning = ILU2
  Linear System Convergence Tolerance = 1.0e-8
End

Solver 4
  Exec Solver = After Timestep
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = "stepEMF"
  Vtu Format = True
  Binary Output = True
  Single Precision = True
  Save Geometry Ids = True
End

Solver 5
  Exec Solver = After Timestep
  Equation = SaveLine
  Procedure = "SaveData" "SaveLine"
  Save Flux = True
  Flux Variable = B
  Filename = "lineEMF.dat"
End 

Solver 6
  Exec Solver = After Timestep
  Filename = "scalarsEMF.dat"
  Procedure = "SaveData" "SaveScalars"
  Show Norm Index = 1
End 

!!!!!!!!!!!!!!!!!!!!!!!!!!  Bodies !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body 1
  Target Bodies(1) = 1
  Name = "Stator"
  Equation = 1
  Material = 1
End

Body 2
  Target Bodies(1) = 2
  Name = "Rotor"
  Equation = 1
  Material = 1
  Body Force = 1 
End

Body 3
  Target Bodies(1) = 3
  Name = "PM1"
  Equation = 1
  Material = 3
  Body Force = 1 
End

Body 4
  Target Bodies(1) = 4
  Name = "PM2"
  Equation = 1
  Material = 4
  Body Force = 1 
End

Body 5
  Target Bodies(1) = 5
  Name = "PMair"
  Equation = 1
  Material = 2
  Body Force = 1 
End

Body 6
  Target Bodies(1) = 6
  Name = "U+"
  Equation = 1
  Material = 5
End

Body 7
  Target Bodies(1) = 7
  Name = "W-"
  Equation = 1
  Material = 5
End

Body 8
  Target Bodies(1) = 8
  Name = "V-"
  Equation = 1
  Material = 5
End

Body 9
  Target Bodies(1) = 9
  Name = "RotorAirgap"
  Equation = 1
  Material = 2
  Body Force = 1
End

Body 10
  Target Bodies(1) = 10
  Name = "StatorAirgap"
  Equation = 1
  Material = 2
  R Inner = Real 80.57515e-3
  R Outer = Real 80.9625e-3
End

sif for transient and two time step sizes

Code: Select all

$ B_PM = 1.19			! [T] remanent flux density
$ mu_PM = 1.03		! permeability of PMs
$ H_PM = B_PM/(mu_PM*pi*4e-7) 	! magnetization of PMs
$ alpha = 17.5*pi/180
$ w_m = 1200/60*2*pi		! [rad/s] mech frequency
$ pp = 4			! number of polepairs
$ w_el = w_m*pp			! [rad/s] electrical frequency
$ t1 = 1/20
$ t2 = 1/(w_el/2/pi)/50

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

Simulation
  Max Output Level = 3
  Coordinate System = Cartesian 
  Coordinate Mapping(3) = 1 2 3
  Coordinate Scaling = 0.001
  Simulation Type = Transient
  Timestepping Method = BDF
  BDF Order = 1
  Timestep Sizes(2) = $ t1 t2 
  Timestep Intervals(2) = 30 100
  Output Intervals(2) = 1 1
  Solver Input File = case.sif
End

Constants
  Permittivity of Vacuum = 8.85418781e-12
  Permeability of Vacuum = 1.25663706e-6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Materials !!!!!!!!!!!!!!!!!!!!!!!!!!!

Material 1
  Name = "M19_29G"
  H-B Curve = Variable coupled iter
    Real Cubic 
      Include  M19_29G.txt   
    End
  Electric Conductivity = 1.9e6  
End

Material 2
  Name = "Air (room temperature)"
  Relative Permittivity = 1.00059
  Relative Permeability = 1.00000037
End

Material 3
  Name = "PM1"
  Relative Permeability = $ mu_PM
  Magnetization 1 = Variable time, timestep size 
   Real MATC "H_PM*cos((w_m*(tx(0)-tx(1)))-alpha)" 
  Magnetization 2 = Variable time, timestep size 
   Real MATC "H_PM*sin((w_m*(tx(0)-tx(1)))-alpha)" 
  Electric Conductivity = 0
End

Material 4
  Name = "PM2"
  Relative Permeability = $ mu_PM
  Magnetization 1 = Variable time, timestep size 
   Real MATC "H_PM*cos((w_m*(tx(0)-tx(1)))+alpha)" 
  Magnetization 2 = Variable time, timestep size 
   Real MATC "H_PM*sin((w_m*(tx(0)-tx(1)))+alpha)" 
  Electric Conductivity = 0
End

Material 5
  Name = "Copper (generic)"
  Relative Permeability = 0.999994
  Electric Conductivity = 59.59e6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Boundary conditions !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

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

Boundary Condition 3
  Target Boundaries(1) = 3
  Name = "StatorPeriodic"
  Mortar BC = Integer 4
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 4:: Target Boundaries(1) = 4 

Boundary Condition 5
  Target Boundaries(1) = 5
  Name = "RotorPeriodic"
  Mortar BC = Integer 6
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 6:: Target Boundaries(1) = 6

Boundary Condition 7
  Target Boundaries(1) = 7
  Name = "Sliding" 
  Discontinuous Boundary = Logical True
  Mortar BC = Integer 8
  Galerkin Projector = Logical True
  Anti Rotational Projector = Logical True
End
Boundary condition8:: Target Boundaries(1)=9

!!!!!!!!!!!!!!!!!!!!!!!!!!  Body forces !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body Force 1
  Name = "BodyForce_Rotation"
  Mesh Rotate 3 = Variable time, timestep size
    Real MATC "180/pi*w_m*(tx(0)-tx(1))"  		! in degrees
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Solver parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Solver 1
  Exec Solver = Before Timestep
  Equation = MeshDeform
  Procedure = "RigidMeshMapper" "RigidMeshMapper"
End

Solver 2
  Equation = MgDyn2D
  Procedure = "MagnetoDynamics2D" "MagnetoDynamics2D"
  Variable = Potential
  Exec Solver = Always
  
  Nonlinear System Convergence Tolerance = 1.0e-5
  Nonlinear System Max Iterations = 20
  Nonlinear System Relaxation Factor = 1

  Nonlinear System Convergence Without Constraints = Logical True

  Linear System Solver = Direct	
  Linear System Direct Method = UMFPACK
End

Solver 3
  Equation = ComputeB

  Target Variable= Potential
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"

  Linear System Solver = Iterative
  Linear System Iterative Method = BicgstabL
  Linear System Symmetric = True
  Linear System Max Iterations = 100
  Linear System Preconditioning = ILU2
  Linear System Convergence Tolerance = 1.0e-8

 Discontinuous Galerkin = True
End

Solver 4
  Exec Solver = After Timestep
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = "stepEMF"
  Vtu Format = True
  Binary Output = True
  Single Precision = True
  Save Geometry Ids = True
End

Solver 5
  Exec Solver = After Timestep
  Equation = SaveLine
  Procedure = "SaveData" "SaveLine"
  Save Flux = True
  Flux Variable = B
  Filename = "lineEMF.dat"
End 

Solver 6
  Exec Solver = After Timestep
  Filename = "scalarsEMF.dat"
  Procedure = "SaveData" "SaveScalars"
  Show Norm Index = 1
End 

!!!!!!!!!!!!!!!!!!!!!!!!!!  Bodies !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body 1
  Target Bodies(1) = 1
  Name = "Stator"
  Equation = 1
  Material = 1
End

Body 2
  Target Bodies(1) = 2
  Name = "Rotor"
  Equation = 1
  Material = 1
  Body Force = 1 
End

Body 3
  Target Bodies(1) = 3
  Name = "PM1"
  Equation = 1
  Material = 3
  Body Force = 1 
End

Body 4
  Target Bodies(1) = 4
  Name = "PM2"
  Equation = 1
  Material = 4
  Body Force = 1 
End

Body 5
  Target Bodies(1) = 5
  Name = "PMair"
  Equation = 1
  Material = 2
  Body Force = 1 
End

Body 6
  Target Bodies(1) = 6
  Name = "U+"
  Equation = 1
  Material = 5
End

Body 7
  Target Bodies(1) = 7
  Name = "W-"
  Equation = 1
  Material = 5
End

Body 8
  Target Bodies(1) = 8
  Name = "V-"
  Equation = 1
  Material = 5
End

Body 9
  Target Bodies(1) = 9
  Name = "RotorAirgap"
  Equation = 1
  Material = 2
  Body Force = 1
End

Body 10
  Target Bodies(1) = 10
  Name = "StatorAirgap"
  Equation = 1
  Material = 2
  R Inner = Real 80.57515e-3
  R Outer = Real 80.9625e-3
End
sif for transient and restart file

Code: Select all

$ B_PM = 1.19			! [T] remanent flux density
$ mu_PM = 1.03		! permeability of PMs
$ H_PM = B_PM/(mu_PM*pi*4e-7) 	! magnetization of PMs
$ alpha = 17.5*pi/180
$ w_m = 1200/60*2*pi		! [rad/s] mech frequency
$ pp = 4			! number of polepairs
$ w_el = w_m*pp			! [rad/s] electrical frequency
$ t1 = 1/20
$ t2 = 1/(w_el/2/pi)/50

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

Simulation
  Max Output Level = 3
  Coordinate System = Cartesian 
  Coordinate Mapping(3) = 1 2 3
  Coordinate Scaling = 0.001
  Simulation Type = Transient
  Timestepping Method = BDF
  BDF Order = 1
  Timestep Sizes(1) = $ t2 
  Timestep Intervals(1) = 1000
  Output Intervals(1) = 1
  Solver Input File = case.sif
  Restart File = "restart.data"
End

Constants
  Permittivity of Vacuum = 8.85418781e-12
  Permeability of Vacuum = 1.25663706e-6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Materials !!!!!!!!!!!!!!!!!!!!!!!!!!!

Material 1
  Name = "M19_29G"
  H-B Curve = Variable coupled iter
    Real Cubic 
      Include  M19_29G.txt   
    End
  Electric Conductivity = 1.9e6  
End

Material 2
  Name = "Air (room temperature)"
  Relative Permittivity = 1.00059
  Relative Permeability = 1.00000037
End

Material 3
  Name = "PM1"
  Relative Permeability = $ mu_PM
  Magnetization 1 = Variable time, timestep size 
   Real MATC "H_PM*cos((w_m*(tx(0)-tx(1)))-alpha)" 
  Magnetization 2 = Variable time, timestep size 
   Real MATC "H_PM*sin((w_m*(tx(0)-tx(1)))-alpha)" 
  Electric Conductivity = 0
End

Material 4
  Name = "PM2"
  Relative Permeability = $ mu_PM
  Magnetization 1 = Variable time, timestep size 
   Real MATC "H_PM*cos((w_m*(tx(0)-tx(1)))+alpha)" 
  Magnetization 2 = Variable time, timestep size 
   Real MATC "H_PM*sin((w_m*(tx(0)-tx(1)))+alpha)" 
  Electric Conductivity = 0
End

Material 5
  Name = "Copper (generic)"
  Relative Permeability = 0.999994
  Electric Conductivity = 59.59e6
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Boundary conditions !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

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

Boundary Condition 3
  Target Boundaries(1) = 3
  Name = "StatorPeriodic"
  Mortar BC = Integer 4
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 4:: Target Boundaries(1) = 4 

Boundary Condition 5
  Target Boundaries(1) = 5
  Name = "RotorPeriodic"
  Mortar BC = Integer 6
  Anti Radial Projector = Logical True
  Galerkin Projector = Logical True
  Mortar BC Static = Logical True
End
Boundary Condition 6:: Target Boundaries(1) = 6

Boundary Condition 7
  Target Boundaries(1) = 7
  Name = "Sliding" 
  Discontinuous Boundary = Logical True
  Mortar BC = Integer 8
  Galerkin Projector = Logical True
  Anti Rotational Projector = Logical True
End
Boundary condition8:: Target Boundaries(1)=9

!!!!!!!!!!!!!!!!!!!!!!!!!!  Body forces !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body Force 1
  Name = "BodyForce_Rotation"
  Mesh Rotate 3 = Variable time, timestep size
    Real MATC "180/pi*w_m*(tx(0)-tx(1))"  		! in degrees
End

!!!!!!!!!!!!!!!!!!!!!!!!!!  Solver parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Solver 1
  Exec Solver = Before Timestep
  Equation = MeshDeform
  Procedure = "RigidMeshMapper" "RigidMeshMapper"
End

Solver 2
  Equation = MgDyn2D
  Procedure = "MagnetoDynamics2D" "MagnetoDynamics2D"
  Variable = Potential
  Exec Solver = Always
  
  Nonlinear System Convergence Tolerance = 1.0e-5
  Nonlinear System Max Iterations = 20
  Nonlinear System Relaxation Factor = 1

  Nonlinear System Convergence Without Constraints = Logical True

  Linear System Solver = Direct	
  Linear System Direct Method = UMFPACK
End

Solver 3
  Equation = ComputeB

  Target Variable= Potential
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"

  Linear System Solver = Iterative
  Linear System Iterative Method = BicgstabL
  Linear System Symmetric = True
  Linear System Max Iterations = 100
  Linear System Preconditioning = ILU2
  Linear System Convergence Tolerance = 1.0e-8

 Discontinuous Galerkin = True
End

Solver 4
  Exec Solver = After Timestep
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = "stepEMF"
  Vtu Format = True
  Binary Output = True
  Single Precision = True
  Save Geometry Ids = True
End

Solver 5
  Exec Solver = After Timestep
  Equation = SaveLine
  Procedure = "SaveData" "SaveLine"
  Save Flux = True
  Flux Variable = B
  Filename = "lineEMF.dat"
End 

Solver 6
  Exec Solver = After Timestep
  Filename = "scalarsEMF.dat"
  Procedure = "SaveData" "SaveScalars"
  Show Norm Index = 1
End 

!!!!!!!!!!!!!!!!!!!!!!!!!!  Bodies !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body 1
  Target Bodies(1) = 1
  Name = "Stator"
  Equation = 1
  Material = 1
End

Body 2
  Target Bodies(1) = 2
  Name = "Rotor"
  Equation = 1
  Material = 1
  Body Force = 1 
End

Body 3
  Target Bodies(1) = 3
  Name = "PM1"
  Equation = 1
  Material = 3
  Body Force = 1 
End

Body 4
  Target Bodies(1) = 4
  Name = "PM2"
  Equation = 1
  Material = 4
  Body Force = 1 
End

Body 5
  Target Bodies(1) = 5
  Name = "PMair"
  Equation = 1
  Material = 2
  Body Force = 1 
End

Body 6
  Target Bodies(1) = 6
  Name = "U+"
  Equation = 1
  Material = 5
End

Body 7
  Target Bodies(1) = 7
  Name = "W-"
  Equation = 1
  Material = 5
End

Body 8
  Target Bodies(1) = 8
  Name = "V-"
  Equation = 1
  Material = 5
End

Body 9
  Target Bodies(1) = 9
  Name = "RotorAirgap"
  Equation = 1
  Material = 2
  Body Force = 1
End

Body 10
  Target Bodies(1) = 10
  Name = "StatorAirgap"
  Equation = 1
  Material = 2
  R Inner = Real 80.57515e-3
  R Outer = Real 80.9625e-3
End
FabianH
Posts: 19
Joined: 13 Nov 2020, 01:08
Antispam: Yes

Re: Static vs Transient Simulation

Post by FabianH »

Just a short note for your mesh: For the transient calculation you need to split Body 10 into two parts. One like Body 9, just the half of the airgap. The second have to be the air of the slot opening.Further you need 2 curves between Body 9 and new Body 10 (mid of the airgap). Both curves lie directly on top of each other, but this is necessary for the rotation when the rotor and stator are no longer aligned. This two curves are your boundaries for the mortar projector.
Marc
Posts: 16
Joined: 30 Nov 2022, 16:37
Antispam: Yes

Re: Static vs Transient Simulation

Post by Marc »

Hi,

I think I have finally solved my probem. I have done more transient simulations and for each simualtion changed some parameters until I realized that the "Electrical Conductivity", in the definition of the materials, plays an important role in the magnetization process of the stator and rotor. I was using values in the scale of MS/m, and once I gave it a value of 0, the results displayed the behaviour I expected.

So I want to first of all apologise for wasting your time with a problem that I could have solved earlier.
Secondly, I want to thank you for your explanations, as they have really helped me improve my understanding of Elmer.

Thank you very much!

Best Regards
Marc
Marc
Posts: 16
Joined: 30 Nov 2022, 16:37
Antispam: Yes

Re: Static vs Transient Simulation

Post by Marc »

Hi again,

I would just like to confirm a doubt I have.

The model presented in the previous posts was 2D. I have know used Elmer's internal mesh extrusion tool to add axial length to the motor(segment). For the 2D simulations I am using the " MagnetoDynamics2D" - Solver .
Am I right in thinking, that for reasonable resluts in the 3D model, I should save the extruded mesh and then apply to the new mesh the "WhitneyAVSolver" - Solver?
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Static vs Transient Simulation

Post by kevinarden »

Post Reply