OpenSEMBA / dgtd

Maxwell's curl equations solver using discontinuous Galerkin methods.
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

Time Step estimators #12

Open AlejandroMunozManterola opened 1 year ago

AlejandroMunozManterola commented 1 year ago

The manual and seemingly random selection of Local Time Stepping (LTS) for problem definition can be trivialised by the implementation of a simple LTS algorithm that takes into account the minimum distance between two nodes found through all the elements of the Finite Element Space, the order of the Finite Element Collection, the speed of the signal and the Courant–Friedrichs–Lewy coefficient.

AlejandroMunozManterola commented 1 year ago

A basic algorithm has been implemented.

If the user chooses to, they can input a manual time stepping value which will be respected. If no input is entered, the solver will automatically calculate the LTS based on the following formula:

$\Delta t = {{CFL {}\cdot{} h} \over {N^{3/2}{}\cdot{} c}}$

Where CFL is the Courant–Friedrichs–Lewy coefficient, which can be manually adjusted with the .setCFL(double) method, h is the minimum internode distance, N is the Finite Element Collection order and c is the signal speed.

lmdiazangulo commented 1 year ago

Maybe we could use power method to extract an estimation of $\Delta t$ . Check mfem's example 9

AlejandroMunozManterola commented 1 year ago

2D estimators have been implemented for triangular meshes, following the inscribed circle estimation.

See commit https://github.com/OpenSEMBA/dgtd/commit/926b570bc39553f10b80c6f1dc7b6af7adb03abc for more info.

Code compiles but feature does not work due to issue with Mesh in const Model.