This paper reports a general model that describes the supply and demand of electricity in a national market based on the system dynamics (SD) approach. From the resulting SD model, it derives piecewise smooth (non-smooth) differential equations from the nonlinear functions and feedback cycles of the corresponding stock-flow structure. Subsequently, the stability of the equilibrium points and non-smooth dynamics of the SD model are investigated using the dynamical systems theory. Filippov systems are found in the proposed SD model and non-smooth vector fields associated with generators investment decisions are accumulated. Under this combining methodology, the non-smooth dynamics of energy markets that are governed by the supply and demand laws are uncovered mathematically and deeply described. In fact, we extend our investigation results to any energy market model attached to various investment decisions, confirming the generalizability of our research.