I'm not getting the TMS example tutorial to run
-
I'm not getting the TMS example tutorial to run. I'm new to Sim4Life (as of 2 days) and I've been working through the Transcranial Magnetic Stimulation tutorial (3.2.5 on the Tutorials). The solver fails - I paste the log file below. Any ideas what's happening. The curious thing is that it worked yesterday! Today Windows Defender anti-virus was complaining about some of the Sim4Life files so possibly it has blocked something. Any ideas? Thanks, Marcus
Reading command line
iSolve X, Version 7.0.1 (8169), 64Bit WindowsRunning MPI version 2.0 on 1 process.
Simulation 'LF' started on 2022-Sep-09 15:37:43
Solver type: EmLf, MagnetoQuasiStaticBiotSavart
Input file name: C:\Users\Public\Documents\Sim4Life\7.0\Documentation\Tutorials\Tutorial projects\CAD files/marcus_third_test.smash_Results/a3a99726-297f-43ee-97ec-1d05ad642243_Input.h5
Input file generated by: Sim4Life, Version 7.0.1.8169
Output file name: C:\Users\Public\Documents\Sim4Life\7.0\Documentation\Tutorials\Tutorial projects\CAD files/marcus_third_test.smash_Results/a3a99726-297f-43ee-97ec-1d05ad642243_Output.h5Using commercial license features.
[2022-Sep-09 15:37:43] Checking out license feature 'QS_SOLVER', expiring the 1-nov-2022, version 7.0, (1).
No additional options set to solver step
Grid size is 134x156x168
Loaded low frequency current loop 'LF 1' with 36 straight filaments with current strength (1,0)A [i.e., current = 1A, phase = 0deg] and infinitely thin radius (singular value on wire will be limited to r=0.000387931m)
Loaded low frequency current loop 'LF 2' with 36 straight filaments with current strength (-1,-0)A [i.e., current = -1A, phase = 0deg] and infinitely thin radius (singular value on wire will be limited to r=0.000387931m)
Grid size is 134x156x168Solid settings: frequency = 10000 Hz, characteristic length (worst case domain diagonal) 0.747103
Epsilon Mu SigmaE QS Approx. Quality Static Magn. Field SigmaE/w*Epsilon Solid name
1 1 0 2.4518e-08 0 0 'Background'
Cells with cell properties 'Background' will be neglected in the simulation, i.e., the electric field is set to not-a-number.
1.1e+04 1 0.33 0.00026969 0.014543 53.925 'SAM_Shell (SAM)'
1.1e+04 1 0.33 0.00026969 0.014543 53.925 'Reference_Plane (SAM)'
1.1e+04 1 0.33 0.00026969 0.014543 53.925 'SAM_Liquid (SAM)'Dynamic range is 1 (lower limit solid SAM_Shell (SAM) (0.33) and upper limit solid SAM_Shell (SAM) (0.33)).
Degree of freedoms: 3581955 total, 1124832 unknowns, 1 Dirichlet points, 0 collapsed points, 2457122 unused.
Initialization of grid, dof-handler and boundary conditions.: Current and peak CPU memory usage: 33.45 MB / 71.33 MB (current is 46.9 % of peak)
Computing number of non-zeros
Elapsed time for 'Computing number of non-zeros' was 00:00:00 wall clock time.
Assembling matrix
Elapsed time for 'Assembling matrix' was 00:00:04 wall clock time.
Assembling Current Sources
Elapsed time for 'Assembling Current Sources' was 00:00:18 wall clock time.Apply Dirichlet boundary condition
Scaling of Dirichlet point trivial equation is 1
Elapsed time for 'Apply Dirichlet boundary condition' was 00:00:01 wall clock time.
Prepared linear system: Current and peak CPU memory usage: 254.4 MB / 623.5 MB (current is 40.8 % of peak)
Solve two linear systems with each 3581955 = 3.58195*10^6 dofs (degrees of freedom).
Setting up preconditioner
Elapsed time for 'Setting up preconditioner' was 00:00:07 wall clock time.
Setup preconditioner and Krylov solver: Current and peak CPU memory usage: 1.161 GB / 1.168 GB (current is 99.4 % of peak)
Target relative preconditioned residual tolerance is 1e-08, max iterations 100000
Solving linear system: Real Part
Right hand side of Relative Residual: Real Part seems zero and therefore, the system is a trivial system with zero vector as solution.
Elapsed time for 'Solving linear system: Real Part' was 00:00:00 wall clock time.
Solved linear system: Current and peak CPU memory usage: 1.187 GB / 1.188 GB (current is 100.0 % of peak)
Solver returns: 'converged (absolute tolerance)'.
Target relative preconditioned residual tolerance is 1e-08, max iterations 100000
Solving linear system: Imaginary Part
Initial preconditioned residuum is 0.0119451 (has to drop by a factor of 1e-08)
Iteration 1 and residual drop factor 0.0623636
Iteration 2 and residual drop factor 0.00509658
Iteration 3 and residual drop factor 0.00130898
Iteration 4 and residual drop factor 0.0013654
Iteration 5 and residual drop factor 0.000957821
Iteration 6 and residual drop factor 0.0016062
Iteration 7 and residual drop factor 0.00125268
Iteration 8 and residual drop factor 0.0020797
Elapsed time for 'Solving linear system: Imaginary Part' was 00:00:06 wall clock time.
Solved linear system: Current and peak CPU memory usage: 1.187 GB / 1.214 GB (current is 97.8 % of peak)
Solver returns: 'diverged (indefinite preconditioner)'.
ERROR: Linear system solver could not determine the solution.
Solved potential simulation's linear system: Current and peak CPU memory usage: 84.37 MB / 1.214 GB (current is 6.8 % of peak)
EM-Low-Frequency simulation finished with errors.ERROR: Simulation 'LF' failed on 2022-Sep-09 15:38:21
[2022-Sep-09 15:38:21] Released license feature 'QS_SOLVER'.
Peak CPU memory usage: 1.214 GB (1303756800 Bytes)ERROR: iSolve framework failed (see previous error messages).
-
Hi Marcus,
This doesn't appear to be related to Windows Defender.
However, from the log you pasted, it is not exactly the tutorial of TMS. The grid is different than what is described in the tutorial, and there is an additional object in the simulation "Reference_Plane".
Something in your setup is not correct anymore and cause the solver to fail. With the amount of information I have here, I cannot suggest a solution.
Please try to run the tutorial as it is (maybe open the project file and run it, instead of building it from scratch), and see if this one fails too.
Best,
Habib