A nonlinear beam model of photomotile structures