CoilSolver Tutorial

Numerical methods and mathematical models of Elmer
Post Reply
granzer
Posts: 49
Joined: 23 Feb 2021, 10:48
Antispam: Yes

CoilSolver Tutorial

Post by granzer »

Hello,
Are there any tutorials available for CoilSolver(other than Github) for ElmerGUI, which explains the basics steps?

Regards,
Mandeep Shetty
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: CoilSolver Tutorial

Post by kevinarden »

The documentation are the only explained steps
https://www.nic.funet.fi/pub/sci/physics/elmer/doc/

There are many more test cases that have some comments in the sif, but not much explaination
https://github.com/ElmerCSC/elmerfem/tr ... /fem/tests
you can search for coil

and there is this forum, which provides contributed cases, and cases within, the five coil case by Peter is often used
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: CoilSolver Tutorial

Post by kevinarden »

Found this on ElmerFem twitter

https://github.com/ElmerCSC/elmer-elmag
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: CoilSolver Tutorial

Post by raback »

Yes, there is an effort to improve the tutorials. Unfortunately for us the route for a new case is typically

a) make a case by hand using whatever copy-paste or add'hoc process with any suitable tools.
b) regenerate the same case with ElmerGUI trying to write out each step to follow.

Unfortunately a) is educationally somewhat difficult while b) is always a lot of extra work. Hence there are hundreds of cases done with a) (test cases & others) and only some tens of gui tutorials as in b).

CoilSolver does not yet have a gui tutorial. I just recently updated the coilsolver.xml so we may be getting there. Even then having all the features (ciruict simulator) is not planned since ElmerGUI cannot handle circuits. However, some one-coil case could be added during the spring.

-Peter
granzer
Posts: 49
Joined: 23 Feb 2021, 10:48
Antispam: Yes

Re: CoilSolver Tutorial

Post by granzer »

From what I could understand by reading different forum posts and and Model_manual, I was able to put together a simulation run with current loop. How ever the simulations diverges after some 20 iterations. I am not able to figure out why by going through the Solver_log. I put together the .sif file by copying and editing the .sif file at: https://github.com/ElmerCSC/elmerfem/t ... SolverLoop. Can you please help me understand what's going wrong?


Solver_log_out

ELMER SOLVER (v 9.0) STARTED AT: 2021/03/01 17:58:13
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: 9.0 (Rev: Release, Compiled: 2020-11-10)
MAIN: Running one task without MPI parallelization.
MAIN: Running with just one thread per task.
MAIN: Lua interpreted linked in.
MAIN: =============================================================

LoadInputFile: Reading only "Run Control" section
MAIN:
MAIN:
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
LoadInputFile: Scanning input file: case.sif
LoadInputFile: Scanning only size info
LoadInputFile: First time visiting
LoadInputFile: Reading base load of sif file
LoadInputFile: Loading input file: case.sif
LoadInputFile: Reading base load of sif file
WARNING:: LoadInputFile: There are no BCs in the system!
LoadInputFile: Number of Body Forces: 0
LoadInputFile: Number of Initial Conditions: 0
LoadInputFile: Number of Materials: 3
LoadInputFile: Number of Equations: 2
LoadInputFile: Number of Solvers: 2
LoadInputFile: Number of Bodies: 3

ElmerAsciiMesh: Base mesh name: ./.

MapCoordinates: Scaling coordinates: 1.000E-03 1.000E-03 1.000E-03

LoadMesh: Elapsed REAL time: 1.7570 (s)

MAIN: -------------------------------------
AddVtuOutputSolverHack: Adding ResultOutputSolver to write VTU output in file: case

OptimizeBandwidth: ---------------------------------------------------------

OptimizeBandwidth: Computing matrix structure for: coilsolver...done.
OptimizeBandwidth: Half bandwidth without optimization: 7901
OptimizeBandwidth: ---------------------------------------------------------

OptimizeBandwidth: ---------------------------------------------------------

OptimizeBandwidth: Computing matrix structure for: divergence solver...done.
OptimizeBandwidth: Half bandwidth without optimization: 7901
OptimizeBandwidth:

OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth: Half bandwidth after optimization: 531
OptimizeBandwidth: ---------------------------------------------------------

ElmerSolver: Number of timesteps to be saved: 10

MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 1
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.2022E-02 0.2022E-02

2 0.6674E-03 0.6674E-03

3 0.1591E-03 0.1591E-03

4 0.4485E-04 0.4485E-04
4 0.4485E-04 0.4485E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62832403 2.0000000 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.7397E-05
CoilSolver: Coil potential multiplier: 2.1098E+04

1 0.3111E-02 0.3111E-02

2 0.3575E-02 0.3575E-02

3 0.7153E-04 0.7153E-04
3 0.7153E-04 0.7153E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62894568 0.98887954E-03 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.9022E-05
CoilSolver: Coil potential multiplier: 2.0399E+04

1 0.2509E-05 0.2509E-05

1 0.8051E-05 0.8051E-05

1 0.2389E-05 0.2389E-05

1 0.3948E-05 0.3948E-05

1 0.8051E-05 0.8051E-05

1 0.2389E-05 0.2389E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=1) (NRM,RELC): ( 13256.654 2.0000000 ) :: coilsolver

DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.24599999999999955

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.87135015E+12 2.0000000 ) :: divergence solver
DivergenceSolver: Solution Time: 1.2000000000000455E-002
DivergenceSolver: Result Norm: 871350147458.25671

ComputeChange: SS (ITER=1) (NRM,RELC): ( 0.87135015E+12 2.0000000 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: 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

ResultOutputSolver: -------------------------------------

MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 2
MAIN: -------------------------------------
MAIN:
CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.1148E+03 0.1148E+03

2 0.2513E+02 0.2513E+02

3 0.5932E+01 0.5932E+01

4 0.3473E+01 0.3473E+01

5 0.3266E+01 0.3266E+01

6 0.6348E-01 0.6348E-01

7 0.2591E-02 0.2591E-02

8 0.7793E-03 0.7793E-03

9 0.1495E-04 0.1495E-04
9 0.1495E-04 0.1495E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62737465 1.9998107 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.8155E-05
CoilSolver: Coil potential multiplier: 2.0766E+04

1 0.3094E-02 0.3094E-02

2 0.3853E-02 0.3853E-02

3 0.7430E-04 0.7430E-04
3 0.7430E-04 0.7430E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62899200 0.25746498E-02 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8979E-05
CoilSolver: Coil potential multiplier: 2.0417E+04

1 0.2510E-05 0.2510E-05

1 0.8037E-05 0.8037E-05

1 0.2383E-05 0.2383E-05

1 0.3934E-05 0.3934E-05

1 0.8037E-05 0.8037E-05

1 0.2383E-05 0.2383E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=2) (NRM,RELC): ( 13028.328 0.17373089E-01 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.24000000000000021

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.85697682E+12 0.16632651E-01 ) :: divergence solver
DivergenceSolver: Solution Time: 9.9999999999997868E-003
DivergenceSolver: Result Norm: 856976818233.18750

ComputeChange: SS (ITER=2) (NRM,RELC): ( 0.85697682E+12 0.16632651E-01 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 3
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.4604E+02 0.4604E+02

2 0.4994E+02 0.4994E+02

3 0.3537E+01 0.3537E+01

4 0.1594E+01 0.1594E+01

5 0.1674E+00 0.1674E+00

6 0.2754E-01 0.2754E-01

7 0.3003E-01 0.3003E-01

8 0.3157E-02 0.3157E-02

9 0.8510E-04 0.8510E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62939088 1.9998068 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.7949E-05
CoilSolver: Coil potential multiplier: 2.0856E+04

1 0.3087E-02 0.3087E-02

2 0.4214E-02 0.4214E-02

3 0.8147E-04 0.8147E-04
3 0.8147E-04 0.8147E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62915400 0.37644035E-03 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8884E-05
CoilSolver: Coil potential multiplier: 2.0456E+04

1 0.2509E-05 0.2509E-05

1 0.8006E-05 0.8006E-05

1 0.2384E-05 0.2384E-05

1 0.3915E-05 0.3915E-05

1 0.8006E-05 0.8006E-05

1 0.2384E-05 0.2384E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=3) (NRM,RELC): ( 13126.354 0.74958390E-02 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.23799999999999955

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.86099915E+12 0.46826364E-02 ) :: divergence solver
DivergenceSolver: Solution Time: 9.9999999999997868E-003
DivergenceSolver: Result Norm: 860999146621.03760

ComputeChange: SS (ITER=3) (NRM,RELC): ( 0.86099915E+12 0.46826364E-02 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 4
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.4292E+02 0.4292E+02

2 0.2084E+04 0.2084E+04

3 0.1298E+02 0.1298E+02

4 0.3521E+02 0.3521E+02

5 0.1098E+01 0.1098E+01

6 0.2920E+00 0.2920E+00

7 0.1672E-02 0.1672E-02

8 0.1445E-03 0.1445E-03

9 0.8167E-04 0.8167E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62453615 1.9998097 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.8661E-05
CoilSolver: Coil potential multiplier: 2.0551E+04

1 0.3091E-02 0.3091E-02

2 0.3784E-02 0.3784E-02

3 0.6699E-04 0.6699E-04
3 0.6699E-04 0.6699E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62868022 0.66135012E-02 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.9110E-05
CoilSolver: Coil potential multiplier: 2.0362E+04

1 0.2511E-05 0.2511E-05

1 0.8047E-05 0.8047E-05

1 0.2385E-05 0.2385E-05

1 0.3938E-05 0.3938E-05

1 0.8047E-05 0.8047E-05

1 0.2385E-05 0.2385E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=4) (NRM,RELC): ( 12834.552 0.22480100E-01 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.23700000000000010

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.84770191E+12 0.15564141E-01 ) :: divergence solver
DivergenceSolver: Solution Time: 9.9999999999997868E-003
DivergenceSolver: Result Norm: 847701914316.06531

ComputeChange: SS (ITER=4) (NRM,RELC): ( 0.84770191E+12 0.15564141E-01 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 5
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.3973E+02 0.3973E+02

2 0.4260E+02 0.4260E+02

3 0.4267E+01 0.4267E+01

4 0.7966E+00 0.7966E+00

5 0.1638E+00 0.1638E+00

6 0.3096E-01 0.3096E-01

7 0.5765E-02 0.5765E-02

8 0.2028E-03 0.2028E-03

9 0.6200E-03 0.6200E-03

10 0.3171E-04 0.3171E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62881462 1.9998040 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.8624E-05
CoilSolver: Coil potential multiplier: 2.0566E+04

1 0.3086E-02 0.3086E-02

2 0.4188E-02 0.4188E-02

3 0.7834E-04 0.7834E-04
3 0.7834E-04 0.7834E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62909715 0.44920437E-03 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8929E-05
CoilSolver: Coil potential multiplier: 2.0438E+04

1 0.2506E-05 0.2506E-05

1 0.8019E-05 0.8019E-05

1 0.2377E-05 0.2377E-05

1 0.3927E-05 0.3927E-05

1 0.8019E-05 0.8019E-05

1 0.2377E-05 0.2377E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=5) (NRM,RELC): ( 12932.157 0.75760317E-02 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.24000000000000199

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.84837865E+12 0.79799667E-03 ) :: divergence solver
DivergenceSolver: Solution Time: 9.9999999999980105E-003
DivergenceSolver: Result Norm: 848378647635.63306
ComputeChange: SS (ITER=5) (NRM,RELC): ( 0.84837865E+12 0.79799667E-03 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 6
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.4642E+02 0.4642E+02

2 0.1518E+02 0.1518E+02

3 0.3641E+02 0.3641E+02

4 0.6634E+01 0.6634E+01

5 0.1422E+00 0.1422E+00

6 0.1556E-01 0.1556E-01

7 0.8309E-03 0.8309E-03

8 0.2119E-03 0.2119E-03

9 0.3486E-04 0.3486E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62772122 1.9998059 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.8038E-05
CoilSolver: Coil potential multiplier: 2.0817E+04

1 0.3096E-02 0.3096E-02

2 0.3825E-02 0.3825E-02

3 0.7376E-04 0.7376E-04
3 0.7376E-04 0.7376E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62897587 0.19967405E-02 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8989E-05
CoilSolver: Coil potential multiplier: 2.0413E+04

1 0.2507E-05 0.2507E-05

1 0.8033E-05 0.8033E-05

1 0.2382E-05 0.2382E-05

1 0.3937E-05 0.3937E-05

1 0.8033E-05 0.8033E-05

1 0.2382E-05 0.2382E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=6) (NRM,RELC): ( 13067.182 0.10386797E-01 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.24900000000000233

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.85923783E+12 0.12718525E-01 ) :: divergence solver
DivergenceSolver: Solution Time: 9.9999999999980105E-003
DivergenceSolver: Result Norm: 859237828734.96765

ComputeChange: SS (ITER=6) (NRM,RELC): ( 0.85923783E+12 0.12718525E-01 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 7
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.4048E+02 0.4048E+02

2 0.1769E+02 0.1769E+02

3 0.7189E+01 0.7189E+01

4 0.1171E+01 0.1171E+01

5 0.2950E+00 0.2950E+00

6 0.1906E+00 0.1906E+00

7 0.8486E-01 0.8486E-01

8 0.6094E-03 0.6094E-03

9 0.5666E-04 0.5666E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.63343225 1.9998061 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.8477E-05
CoilSolver: Coil potential multiplier: 2.0628E+04

1 0.3091E-02 0.3091E-02

2 0.4261E-02 0.4261E-02

3 0.8346E-04 0.8346E-04
3 0.8346E-04 0.8346E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62928944 0.65617175E-02 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8876E-05
CoilSolver: Coil potential multiplier: 2.0460E+04

1 0.2497E-05 0.2497E-05

1 0.7997E-05 0.7997E-05

1 0.2379E-05 0.2379E-05

1 0.3942E-05 0.3942E-05

1 0.7997E-05 0.7997E-05

1 0.2379E-05 0.2379E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=7) (NRM,RELC): ( 13066.652 0.40534095E-04 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.23900000000000077

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.85104792E+12 0.95772385E-02 ) :: divergence solver
DivergenceSolver: Solution Time: 1.0000000000001563E-002
DivergenceSolver: Result Norm: 851047921466.60876

ComputeChange: SS (ITER=7) (NRM,RELC): ( 0.85104792E+12 0.95772385E-02 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 8
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.6495E+02 0.6495E+02

2 0.2697E+02 0.2697E+02

3 0.6135E+01 0.6135E+01

4 0.6014E+01 0.6014E+01

5 0.1060E+00 0.1060E+00

6 0.8822E-02 0.8822E-02

7 0.4840E-03 0.4840E-03

8 0.9711E-04 0.9711E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62815479 1.9998077 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.7842E-05
CoilSolver: Coil potential multiplier: 2.0902E+04

1 0.3090E-02 0.3090E-02

2 0.4183E-02 0.4183E-02

3 0.7796E-04 0.7796E-04
3 0.7796E-04 0.7796E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62909728 0.14992937E-02 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8918E-05
CoilSolver: Coil potential multiplier: 2.0442E+04

1 0.2513E-05 0.2513E-05

1 0.8009E-05 0.8009E-05

1 0.2387E-05 0.2387E-05

1 0.3929E-05 0.3929E-05

1 0.8009E-05 0.8009E-05

1 0.2387E-05 0.2387E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=8) (NRM,RELC): ( 13129.725 0.48153735E-02 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.24099999999999966

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.86279917E+12 0.13713302E-01 ) :: divergence solver
DivergenceSolver: Solution Time: 9.9999999999980105E-003
DivergenceSolver: Result Norm: 862799173077.99670
ComputeChange: SS (ITER=8) (NRM,RELC): ( 0.86279917E+12 0.13713302E-01 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 9
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.4998E+02 0.4998E+02

2 0.2286E+02 0.2286E+02

3 0.3785E+01 0.3785E+01

4 0.1479E+01 0.1479E+01

5 0.3361E+00 0.3361E+00

6 0.1174E+00 0.1174E+00

7 0.1499E-02 0.1499E-02

8 0.1380E-02 0.1380E-02

9 0.7345E-04 0.7345E-04
9 0.7345E-04 0.7345E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62118921 1.9998108 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8576E-05
CoilSolver: Coil potential multiplier: 2.0586E+04

1 0.3083E-02 0.3083E-02

2 0.3929E-02 0.3929E-02

3 0.6864E-04 0.6864E-04
3 0.6864E-04 0.6864E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62877739 0.12141413E-01 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.9032E-05
CoilSolver: Coil potential multiplier: 2.0395E+04

1 0.2520E-05 0.2520E-05

1 0.8067E-05 0.8067E-05

1 0.2378E-05 0.2378E-05

1 0.3922E-05 0.3922E-05

1 0.8067E-05 0.8067E-05

1 0.2378E-05 0.2378E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=9) (NRM,RELC): ( 12788.002 0.26369791E-01 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.24099999999999966

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.84928009E+12 0.15792593E-01 ) :: divergence solver
DivergenceSolver: Solution Time: 1.0000000000001563E-002
DivergenceSolver: Result Norm: 849280087267.20776
ComputeChange: SS (ITER=9) (NRM,RELC): ( 0.84928009E+12 0.15792593E-01 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 10
MAIN: -------------------------------------
MAIN:

CoilSolver: --------------------------------------
CoilSolver: Solving current distribution in a coil
CoilSolver: --------------------------------------

CoilSolver: Choosing fixing nodes for set: 1

CoilSolver: Choosing fixing nodes for set: 2
CoilSolver: Set1 : 662 +nodes and 658 -nodes
CoilSolver: Set2 : 658 +nodes and 662 -nodes
CoilSolver: Computing the dummy potential field

1 0.2279E+03 0.2279E+03

2 0.3912E+02 0.3912E+02

3 0.3522E+01 0.3522E+01

4 0.5107E+01 0.5107E+01

5 0.1844E+00 0.1844E+00

6 0.3223E-01 0.3223E-01

7 0.8384E-03 0.8384E-03

8 0.9190E-03 0.9190E-03

9 0.1251E-04 0.1251E-04
9 0.1251E-04 0.1251E-04

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.62800197 1.9998036 ) :: coilsolver

CoilSolver: Initial coil current for coil 1: 4.8222E-05
CoilSolver: Coil potential multiplier: 2.0738E+04

1 0.3094E-02 0.3094E-02

2 0.3879E-02 0.3879E-02

3 0.7504E-04 0.7504E-04
3 0.7504E-04 0.7504E-04

ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.62901566 0.16128539E-02 ) :: coilsolver
CoilSolver: Initial coil current for coil 1: 4.8972E-05
CoilSolver: Coil potential multiplier: 2.0420E+04

1 0.2508E-05 0.2508E-05

1 0.8035E-05 0.8035E-05

1 0.2383E-05 0.2383E-05

1 0.3935E-05 0.3935E-05

1 0.8035E-05 0.8035E-05

1 0.2383E-05 0.2383E-05

CoilSolver: --------------------------------------
ComputeChange: SS (ITER=10) (NRM,RELC): ( 13023.203 0.18224678E-01 ) :: coilsolver
DivergenceSolver: -------------------------------------
DivergenceSolver: Computing the divergence field
DivergenceSolver: -------------------------------------

DivergenceSolver: Assembly Time: 0.24399999999999977

ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.85573972E+12 0.75771957E-02 ) :: divergence solver
DivergenceSolver: Solution Time: 9.9999999999980105E-003
DivergenceSolver: Result Norm: 855739721619.82800

ComputeChange: SS (ITER=10) (NRM,RELC): ( 0.85573972E+12 0.75771957E-02 ) :: divergence solver

ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format

ResultOutputSolver: -------------------------------------

WARNING:: CompareToReferenceSolution: Solver 1 FAILED: Norm = 1.30232026E+04 RefNorm = 7.74178076E+00
CompareToReferenceSolution: Relative Error to reference norm: 1.681197E+03
WARNING:: CompareToReferenceSolution: Solver 2 FAILED: Norm = 8.55739722E+11 RefNorm = 1.20855655E-01
CompareToReferenceSolution: Relative Error to reference norm: 7.080676E+12
WARNING:: CompareToReferenceSolution: FAILED 2 tests out of 2!
ElmerSolver: *** Elmer Solver: ALL DONE ***

ElmerSolver: The end
SOLVER TOTAL TIME(CPU,REAL): 33.12 33.12
ELMER SOLVER FINISHED AT: 2021/03/01 17:58:46



My files: https://www.transfernow.net/AuzrhH032021

Thank you.
-Mandeep
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: CoilSolver Tutorial

Post by kevinarden »

Downloaded it and it runs fine.

The warnings at the end are due to lines form the test case trying to compare the solution to the test case, but your problem is not the same.

Delete the last two lines of the sif, they are only used to compare a test case to a know result.
potential.png
(28.52 KiB) Not downloaded yet
granzer
Posts: 49
Joined: 23 Feb 2021, 10:48
Antispam: Yes

Re: CoilSolver Tutorial

Post by granzer »

kevinarden wrote: 01 Mar 2021, 19:12 Downloaded it and it runs fine.

The warnings at the end are due to lines form the test case trying to compare the solution to the test case, but your problem is not the same.

Delete the last two lines of the sif, they are only used to compare a test case to a know result.

potential.png
Wow that's a relief! Thank you so much for your time and the good news!!
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: CoilSolver Tutorial

Post by raback »

Hi

There was still a problem. I fixed that and made some other minor tweaks (see attachment).

The main problem was that Elmer uses some heuristics to set the coil parameters. The heuristics looks for the axis of maximum inertia. That works well for a classical donut, for example, but not your very high coil. The code echos the normal it deduces if your output level is enough. This being the case you must give the keyword

Code: Select all

coil normal(3) = 0 0 1
With this it works.

-Peter
Attachments
case.sif
(2.38 KiB) Downloaded 198 times
granzer
Posts: 49
Joined: 23 Feb 2021, 10:48
Antispam: Yes

Re: CoilSolver Tutorial

Post by granzer »

raback wrote: 01 Mar 2021, 22:03 Hi

There was still a problem. I fixed that and made some other minor tweaks (see attachment).

The main problem was that Elmer uses some heuristics to set the coil parameters. The heuristics looks for the axis of maximum inertia. That works well for a classical donut, for example, but not your very high coil. The code echos the normal it deduces if your output level is enough. This being the case you must give the keyword

Code: Select all

coil normal(3) = 0 0 1
With this it works.

-Peter
Hello Mr.Peter,
Thank you for taking the time to review and correct the code!. I was having trouble with my previous code and couldn't figure out why. My coil was designed with z-axis as the coil axis and thought that would suffice. I will use this code and try to obtain the magnetic field.

Best Regards,
Mandeep Shetty
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: CoilSolver Tutorial

Post by raback »

Hi

There is now a fresh tutorial by Jonathan. It should work with the fresh Windows installers or other <1 week old compilations.

It is based on this case:
https://github.com/ElmerCSC/elmer-elmag/tree/main/TEAM7

And is available as the last tutorial case in ElmerTutorials.pdf
https://www.nic.funet.fi/pub/sci/physics/elmer/doc/

The Tex files behind this are here:
https://github.com/ElmerCSC/elmerfem-ma ... I/TEAM7GUI

Maybe somebody could give a go...

-Peter
Post Reply