"HeatSolveVec" "HeatSolver" simulation time speed up?

Numerical methods and mathematical models of Elmer
Post Reply
tomatoma
Posts: 12
Joined: 12 Feb 2016, 23:04
Antispam: Yes

"HeatSolveVec" "HeatSolver" simulation time speed up?

Post by tomatoma »

Hello,

given the mesh and given the computer (i7-9850H @ 2.6 GHz), does anyone have some hints to speed up a 3D Heat simulation?
Are there any parameters in the Solver 1 section that can be modified to improve the simulation time?


Here are the mesh information:
mesh_information.png
mesh_information.png (17.38 KiB) Viewed 851 times

The simulation time is around 4o minutes. Peak memory elmersolver usage: 14 GB. Only one processor core used (is it possible and easy to use more than one core?)
In your experience (given that my experience is very limited), is this simulation time reasonable for this problem?
For each iteration of the solver, more than half of the time is spent at the line
HeatSolver: Heat solver iteration: n

ElmerSolver output and .sif file attached.

PS: One can earn extra points by resolving the issue that Solver 3 crashes when including the line Save Coordinates...!

Thanks,
Matteo
Attachments
ElmerSolverOutput.txt
(5.46 KiB) Downloaded 72 times
case_sample.sif
(4.04 KiB) Downloaded 73 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: "HeatSolveVec" "HeatSolver" simulation time speed up?

Post by kevinarden »

The simulation time is reasonable for the mesh size.
It is possible and easy to use more than one core.
Solve time could be decreased by decreasing the convergence tolerance.
Can't say for sure without knowing the geometry but the mesh size appears to be large for the heat equation to be accurate.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: "HeatSolveVec" "HeatSolver" simulation time speed up?

Post by kevinarden »

!Save Coordinates(1,3) = -0.04234 0.00351 0.0139999 ! Crashes
!Save Coordinates(1,3) = Real 0 0 0

If Save Coordinates(1,3) = Real 0 0 0
dose not crash then perhaps
Save Coordinates(1,3) = Real -0.04234 0.00351 0.0139999
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: "HeatSolveVec" "HeatSolver" simulation time speed up?

Post by raback »

Hi

To speed up:

Linear System Iterative Method = BiCGStab -> try BiCGStabl, idrs
Linear System Convergence Tolerance = 1.0e-12 -> try sloppier tolerance, say 1e-8
Linear System Preconditioning = ILU1 -> try ILU2
Nonlinear System Max Iterations = 50 -> set to 1, your model seems fully linear
Vector Assembly = True, speedup if you have many gauss points

-Peter
tomatoma
Posts: 12
Joined: 12 Feb 2016, 23:04
Antispam: Yes

Re: "HeatSolveVec" "HeatSolver" simulation time speed up?

Post by tomatoma »

Hi,

Thanks to both of you for your support.

It appears to me that Save Coordinates crashes when it is used along with Discontinuous Galerkin. I have uploaded a simple example here: viewtopic.php?t=7698

The problem is not caused by the keyword 'Real'

I have to experiment with what you have suggested (I need some time to do that).
Can't say for sure without knowing the geometry but the mesh size appears to be large for the heat equation to be accurate.
Do you mean that if the mesh is too fine the result becomes less accurate? How does one know if the mesh is too fine?

The problem is linear. From what Peter said I understand that any iteration after the first one is useless. Stopping the solver at the first iteration would drastically reduce the simulation time!

Thanks again,
Matteo
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: "HeatSolveVec" "HeatSolver" simulation time speed up?

Post by kevinarden »

No I mean to say that accuracy can be obtained with much smaller mesh sizes which would result in much faster solution times. Once the mesh size had achieved desired accuracy finer meshes just take longer to solve with no benefit
Post Reply