Zero Field Strength GUI Tutorial 7 and Solver Error Message

The graphical user interface of Elmer
Post Reply
dvarx
Posts: 6
Joined: 01 Jan 2019, 20:57
Antispam: Yes
Location: Switzerland

Zero Field Strength GUI Tutorial 7 and Solver Error Message

Post by dvarx » 03 Jan 2019, 17:53

Hello everyone,

I was trying to solve the GUI Tutorial 7 "Magnetic field induced by harmonic current in a wire" but I get incorrect results (the magnetic field strength, current density etc are zero everywhere) as well as an error message from the solver.

After following the tutorial, I get the following .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
  Coordinate Scaling = 1.0e-3
  Angular Frequency = 1.0e5
  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

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

Solver 1
  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 = BiCGStabl
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 4
  Linear System Preconditioning = none
  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 2
  Equation = MgDynPost
  Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
  Calculate Magnetic Field Strength = True
  Calculate Joule Heating = True
  Discontinuous Bodies = True
  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 = "MgDynHarm"
  Active Solvers(1) = 1
End

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

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

Material 2
  Name = "Air (room temperature)"
  Relative Permeability = 1.00000037
  Heat Conductivity = 0.0257
  Turbulent Prandtl Number = 0.713
  Heat Capacity = 1005.0
  Relative Permittivity = 1.00059
  Relative Permeability = 1.00000037
  Viscosity = 1.983e-5
  Viscosity = 1.983e-5
  Sound speed = 343.0
  Heat expansion Coefficient = 3.43e-3
  Relative Permittivity = 1.00059
  Porosity Model = Always saturated
  Relative Permittivity = 1.00059
  Relative Permittivity = 1.00059
  Relative Permeability = 1.00000037
  Density = 1.205
  Relative Permeability = 1.00000037
End

Boundary Condition 1
  Target Boundaries(1) = 1 
  Name = "Ground"
  AV re {e} 2 = 0
  AV im = 0
  AV im {e} 2 = 0
  AV re = 0
  AV re {e} 1 = 0
  AV im {e} 1 = 0
End

Boundary Condition 2
  Target Boundaries(1) = 3 
  Name = "Voltage"
  AV re {e} 2 = 0
  AV im = 0
  AV im {e} 2 = 0
  AV re = 0.01
  AV re {e} 1 = 0
  AV im {e} 1 = 0
End

Boundary Condition 3
  Target Boundaries(1) = 4 
  Name = "AxialField"
  AV re {e} 2 = 0
  AV im {e} 2 = 0
  AV re {e} 1 = 0
  AV im {e} 1 = 0
End
.sif File:
case.sif
(4.45 KiB) Downloaded 42 times
Here is the solver log which shows an error message after the post-processing steps:

Code: Select all

ELMER SOLVER (v 8.4) STARTED AT: 2019/01/03 15:39:21
ParCommInit:  Initialize #PEs:            1
MAIN: 
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Version: 8.4 (Rev: unknown, Compiled: 2019-01-02)
MAIN:  Running one task without MPI parallelization.
MAIN:  Running with just one thread per task.
MAIN:  HYPRE library linked in.
MAIN:  MUMPS library linked in.
MAIN:  Lua interpreted linked in.
MAIN: =============================================================
MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
 Caught LUA error:[string "loadfile(os.getenv("ELMER_HOME") .. "/share..."]:1: attempt to call a nil value
 Caught LUA error:[string "loadstring(readsif("case.sif"))()"]:1: attempt to call global 'readsif' (a nil value)
LoadInputFile: Scanning input file: case.sif
LoadInputFile: Loading input file: case.sif
WARNING:: LoadInputFile: > Equation 2 < not used in any Body!
Loading user function library: [MagnetoDynamics]...[WhitneyAVHarmonicSolver_Init0]
Loading user function library: [MagnetoDynamics]...[MagnetoDynamicsCalcFields_Init0]
LoadMesh: Base mesh name: ./.
LoadMesh: Scaling coordinates: 1.000E-03 1.000E-03 1.000E-03
LoadMesh: Elapsed REAL time:     0.0589 (s)
MAIN: -------------------------------------
AddVtuOutputSolverHack: Adding ResultOutputSolver to write VTU output in file: case
Loading user function library: [MagnetoDynamics]...[WhitneyAVHarmonicSolver_Init]
Loading user function library: [MagnetoDynamics]...[WhitneyAVHarmonicSolver_bulk]
Loading user function library: [MagnetoDynamics]...[WhitneyAVHarmonicSolver]
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: mgharm...done.
OptimizeBandwidth: Half bandwidth without optimization: 19380
OptimizeBandwidth: 
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth: Half bandwidth after optimization: 2808
OptimizeBandwidth: ---------------------------------------------------------
Loading user function library: [MagnetoDynamics]...[MagnetoDynamicsCalcFields_Init]
Loading user function library: [MagnetoDynamics]...[MagnetoDynamicsCalcFields_bulk]
Loading user function library: [MagnetoDynamics]...[MagnetoDynamicsCalcFields]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_bulk]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: mgharm
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
      10 0.1358E-03
      20 0.1231E-05
      30 0.2292E-07
      40 0.1325E-08
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.83324018E-03  2.0000000     ) :: mgharm
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.83324018E-03  0.0000000     ) :: mgharm
Loading user function library: [MagnetoDynamics]...[WhitneyAVHarmonicSolver_post]
ComputeChange: SS (ITER=1) (NRM,RELC): ( 0.83324018E-03  2.0000000     ) :: mgharm
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: mgdynpost
Loading user function library: [MagnetoDynamics]...[MagnetoDynamicsCalcFields_post]
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: internalvtuoutputsolver
ResultOutputSolver: -------------------------------------
ResultOutputSolve: Saving with prefix: case
ResultOutputSolver: Creating list for saving - if not present
CreateListForSaving: Field Variables for Saving
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format
VtuOutputSolver: Saving results in VTK XML format with prefix: case
VtuOutputSolver: Saving number of partitions: 1
WriteVtuFile: Writing variable: joule heating e
WriteVtuFile: Writing variable: magnetic flux density re e
WriteVtuFile: Writing variable: magnetic flux density im e
WriteVtuFile: Writing variable: magnetic field strength re e
WriteVtuFile: Writing variable: magnetic field strength im e
ResultOutputSolver: -------------------------------------
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_post]
ElmerSolver: *** Elmer Solver: ALL DONE ***
free(): invalid pointer

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x7f8c7307c2da in ???
#1  0x7f8c7307b503 in ???
#2  0x7f8c72caef1f in ???
#3  0x7f8c72caee97 in ???
#4  0x7f8c72cb0800 in ???
#5  0x7f8c72cf9896 in ???
#6  0x7f8c72d00909 in ???
#7  0x7f8c72d07e1b in ???
#8  0x7f8c7349d2a6 in __lists_MOD_releasevariablelist
	at /build/elmerfem-csc-qCDGI2/elmerfem-csc-8.4-0ppa0/fem/src/Lists.F90:849
#9  0x7f8c736ae834 in __meshutils_MOD_releasemesh
	at /build/elmerfem-csc-qCDGI2/elmerfem-csc-8.4-0ppa0/fem/src/MeshUtils.F90:15226
#10  0x7f8c73529a31 in __modeldescription_MOD_freemesh
	at /build/elmerfem-csc-qCDGI2/elmerfem-csc-8.4-0ppa0/fem/src/ModelDescription.F90:5307
#11  0x7f8c73529ac1 in __modeldescription_MOD_freemodel
	at /build/elmerfem-csc-qCDGI2/elmerfem-csc-8.4-0ppa0/fem/src/ModelDescription.F90:5374
#12  0x7f8c7383cd47 in elmersolver_
	at /build/elmerfem-csc-qCDGI2/elmerfem-csc-8.4-0ppa0/fem/src/ElmerSolver.F90:651
#13  0x55873c2a115b in solver
	at /build/elmerfem-csc-qCDGI2/elmerfem-csc-8.4-0ppa0/fem/src/Solver.F90:69
#14  0x55873c2a0eae in main
	at /build/elmerfem-csc-qCDGI2/elmerfem-csc-8.4-0ppa0/fem/src/Solver.F90:34
Solver-Log:
solver_log.txt
(5.86 KiB) Downloaded 44 times
When I look at the results in Paraview, the Magnetic Field Strength seems to be zero everywhere. I checked that the potential is really 0.01V on one end of the wire and 0V on the other end (see potential.png):

Project Files:
elmer_guitutorial_07.zip
Project files and computed results (.vtu)
(310.67 KiB) Downloaded 45 times
Does anyone know where the problem could be?

Also, are there "solutions" to the GUI tutorials (for example the .sif files for the tutorials)?

Thanks!

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

Re: Zero Field Strength GUI Tutorial 7 and Solver Error Message

Post by raback » 03 Jan 2019, 19:47

Hi,

You should attach the postprocessing solver to the same Equtation set. In sif you would like to see:

Code: Select all

Equation 1
  Name = "MgDyn"
  Active Solvers(2) = 1 2
End
-Peter

Post Reply