AMReX-Microelectronics / FerroX

FerroX is a massively parallel, 3D phase-field simulation framework for modeling ferroelectric materials based scalable logic devices.
Other
10 stars 10 forks source link

add criterion for checking steady state and accordingly fix the voltage sweep approach #31

Closed prkkumar closed 1 year ago

prkkumar commented 1 year ago

This PR implements a criterion for checking if the steady-state has reached:

(Phi_{n} - Phi_{n-1}).norm0() < phi_tolerance

Default value of phi_tolerance = 1.e-7.

It can be overwritten by the user in the input script.

Test input script: inputs_mfim_2d.txt

Screenshot of stdout at the end:

Screen Shot 2023-05-24 at 1 12 14 PM

Simulation reaches steady state at step = 1067 when error = 9.971617631e-08

Final plotfile written is plt00001067.