Mathematical modeling and simulation of mechanoelectrical transducers and nanofluidic channels