While most Modelica's applications are primarily engineering related, it is used for stock and flow models and there are some folks digging into use it for economic modeling (as there are others using it for environmental and biological systems modelling). If you are looking to get started using Modelica for economics modeling these might be of interest: