chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
GNU Lesser General Public License v2.1
269 stars 59 forks source link

PID mesh adaptation quick fix #1230

Closed mivaia closed 1 month ago

mivaia commented 1 month ago

Description

Initialized previous_mesh_controller and previous number of elements to 0 in the constructor of the mesh controller object. previous_mesh_control_error which controls the intregral part of the error was not initialized. This affected geatly the PID controller convergence because really high values would sometimes be attributed at start to previous_mesh_control_error.

Solution

Initialized the value in the constructor.

Testing

old tests were kept

Documentation

Miscellaneous (will be removed when merged)

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

Pull request related list: