WhitneyAV / Solution trivially zero!

Numerical methods and mathematical models of Elmer
Post Reply
c0d3runn3r
Posts: 5
Joined: 15 Mar 2024, 22:58
Antispam: Yes

WhitneyAV / Solution trivially zero!

Post by c0d3runn3r »

Hi guys, I've spent a long time working on this without success. At last in desperation I turn to you for help!
geometry.png
(546.05 KiB) Not downloaded yet
mesh.png
(369.17 KiB) Not downloaded yet
I have a typical coil-core-air 3-body system as you can see. I'm using CoilSolver and WhitneyAV. Things converge and ParaView shows a coilcurrent with the correct magnitude, but almost no magnetic field (~1e-18).
fields.png
(332.01 KiB) Not downloaded yet
I am getting the following in the solver log but can't figure out what I am doing wrong:

Code: Select all

MagnetoDynamicsCalcFields: Solving for field: current density[current density:3]
SolveLinearSystem: Solution trivially zero!
SolveLinearSystem: Solution trivially zero!
SolveLinearSystem: Solution trivially zero!
I've read various forum posts and tried changing various parameters including "Linear System Normwise Backward Error = Logical True" etc from this post without success. What am I missing?

sif, geo and msh files below in the first comment
Last edited by c0d3runn3r on 15 Mar 2024, 23:18, edited 1 time in total.
c0d3runn3r
Posts: 5
Joined: 15 Mar 2024, 22:58
Antispam: Yes

Re: WhitneyAV / Solution trivially zero!

Post by c0d3runn3r »

Here are the relevant files - looks like there is a 3 attchments/post limitation
Attachments
coil_test.sif
(4.48 KiB) Downloaded 7 times
coil_test.geo
(252 Bytes) Downloaded 8 times
coil_test.msh
(434.09 KiB) Downloaded 9 times
kevinarden
Posts: 2313
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: WhitneyAV / Solution trivially zero!

Post by kevinarden »

You have a mesh with non-conforming bodies, Elmer communicates data between the body through shared nodes or mortar boundary conditions.
mesh.png
mesh.png (159.58 KiB) Viewed 129 times
See Section 9.3 of this manual

https://www.nic.funet.fi/pub/sci/physic ... dElmer.pdf
c0d3runn3r
Posts: 5
Joined: 15 Mar 2024, 22:58
Antispam: Yes

Re: WhitneyAV / Solution trivially zero!

Post by c0d3runn3r »

Hi kevinarden, thanks for your reply. Yes thank you, I also realized my mesh was non conformal. My new mesh is attached.

- Immediately after generating a conforming mesh I started getting segmentation fault and core dump (below).
- I then tried to slim my file down to just the CoilSolver (so I could examine a simplified case)
coil_test_simplified.sif
(1.24 KiB) Downloaded 12 times
and the simulation runs with 1 iteration and writes out a .vtu with coilcurrent of zero.

Code: Select all

MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 
ComputeChange: SS (ITER=1) (NRM,RELC): (  0.0000000      0.0000000     ) :: coilsolver
ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving with prefix: coil_test
here's the core dump...

Code: Select all

JfixPotentialSolver: Computing fixing potential for given current density
WARNING:: JfixPotentialSolver: No Dirichlet conditions used to define Jfix level!
SolveLinearSystem: Solution trivially zero!
MGDynAssembly: Elapsed REAL time:     0.0588 (s)

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f76c1303960 in ???
#1  0x7f76c1302ac5 in ???
#2  0x7f76c10f951f in ???
#3  0x7f76c163118e in __lists_MOD_listfind
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/Lists.F90:2071
#4  0x7f76c1633cf4 in __lists_MOD_listgetinteger
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/Lists.F90:3918
#5  0x7f76c1a3fb33 in __defutils_MOD_getinteger
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/DefUtils.F90:1101
#6  0x7f76c1b38594 in __circuitutils_MOD_getcomponentparams
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/CircuitUtils.F90:117
#7  0x7f76b60cf991 in dosolve
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/modules/MagnetoDynamics/WhitneyAVSolver.F90:1077
#8  0x7f76b60da6f0 in whitneyavsolver_
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/modules/MagnetoDynamics/WhitneyAVSolver.F90:638
#9  0x7f76c18a1217 in __mainutils_MOD_singlesolver
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/MainUtils.F90:5266
#10  0x7f76c18b6d9e in __mainutils_MOD_solveractivate
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/MainUtils.F90:5609
#11  0x7f76c18b8b01 in solvecoupled
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/MainUtils.F90:3240
#12  0x7f76c18b9f8a in __mainutils_MOD_solveequations
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/MainUtils.F90:2936
#13  0x7f76c1b55144 in execsimulation
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/ElmerSolver.F90:3301
#14  0x7f76c1b5c8a8 in elmersolver_
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/ElmerSolver.F90:664
#15  0x5643c3a6d3f0 in solver
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/Solver.F90:57
#16  0x5643c3a6d15e in main
	at /build/elmerfem-csc-qDPeYK/elmerfem-csc-9.0-0ppa0/fem/src/Solver.F90:34
Segmentation fault (core dumped)
Attachments
coil_test.msh
(387.62 KiB) Downloaded 11 times
kevinarden
Posts: 2313
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: WhitneyAV / Solution trivially zero!

Post by kevinarden »

I do not have that problem. Using your mesh coil_test.msh and your sif coil_test_simplified.sif
I get a solution coil current = to 1, which is the default
coil.png
(71.99 KiB) Not downloaded yet
c0d3runn3r
Posts: 5
Joined: 15 Mar 2024, 22:58
Antispam: Yes

Re: WhitneyAV / Solution trivially zero!

Post by c0d3runn3r »

Update 1 - it looks like CoilSolver will not solve for coilcurrent unless all bodies have defined materials. When I add materials back in for air and core, I get results

Update 2 - Gmsh uses 1-based body indices, Elmer uses zero based. Hence the segfault when I tried to use Gmsh body numbers.

Problem solved!
core.png
(754.46 KiB) Not downloaded yet
Post Reply