Electromechanical coupling devices have been playing an indispensable role in modern engineering. Particularly, flexoelectricity, an electromechanical coupling effect that involves strain gradients, has shown promising potential for future miniaturized electromechanical coupling devices. Therefore, simulation of flexoelectricity is necessary and inevitable. In this paper, we provide an overview of numerical procedures on modeling flexoelectricity. Specifically, we summarize a generalized formulation including the electrostatic stress tensor, which can be simplified to retrieve other formulations from the literature. We further show the weak and discretization forms of the boundary value problem for different numerical methods, including isogeometric analysis and mixed FEM. Several benchmark problems are presented to demonstrate the numerical implementation. The source code for the implementation can be utilized to analyze and develop more complex flexoelectric nano-devices.