MapleSim is a system-level modeling and simulation tool based on Modelica. MapleSim is integrated with Maple, a tool for symbolic and numeric analysis. Both tools can exchange information and data in either direction. MapleSim solves ODEs and DAEs. Hence PDEs must be discretized before simulations. The link with Maple means that many methods can be used to discretize PDEs and automatically generate Modelica-based components. This paper uses the heat equation to illustrate the process, showing how it can be discretized with the finite difference method in Maple for simulation in MapleSim. Similar principles can be applied to more complex PDEs.