Sometimes, when the parameters are just right, the matrix is exactly singular and the steady-state PDF cannot be solved for. Is there a way to ensure the matrix is never singular? In the below case, the error occurs, but if S = 100.0001*nm there is no error.
example case
import numpy as np
from fplanck import fokker_planck, boundary
nm = 1e-9
viscosity = 8e-4
radius = 50*nm
S = 100*nm
def drag(x):
return 6*np.pi*viscosity*radius*(1 + np.abs(x)/S)
sim = fokker_planck(temperature=300, drag=drag, extent=200*nm,
resolution=5*nm, boundary=boundary.periodic)
steady = sim.steady_state()
Sometimes, when the parameters are just right, the matrix is exactly singular and the steady-state PDF cannot be solved for. Is there a way to ensure the matrix is never singular? In the below case, the error occurs, but if
S = 100.0001*nmthere is no error.example case