Theoretical model for a nanorelay and same relay