The heart is an electro-mechanical system. In 2010 about 4.25 million people died from cardiac arrhythmias. Immediate treatment in case of fibrillation is to shock the heart electrically with high energy to reset the electrical system. However high energy shocks cause severe side effects: the heart tissue is damaged, patients develop anxiety and panic disorders. To reduce these side effects low energy defibrillation methods are developed in the research group biomedical physics (RGBMP) at the Max Planck Institute for Dynamics and Self-Organization.Low energy defibrillation is researched in-vivo and ex-vivo using extracted hearts in Langendorff perfusion. In these experiments the current used for defibrillation is drastically reduced, therefore it is important to understand where the current employed interacts with the heart. For this thesis I rebuilt the experimental setups including shock electrodes and ECG-measurement panels of the RGBMP in-silico using the software Gmsh for computer augmented design (and subsequent computational mesh generation). I extracted the anatomical features of the torso, the heart and the heart muscle's fibre orientation from medical image data and I combined both to create geometrical models of the in-vivo and ex-vivo experiments. I implemented a numerical framework to calculate the current flow in these models and conducted simulation studies together with Master student Simon Wassing.We found out that the ratio of the total current that interacts with the heart is between 8 % and 15 % of the total current depending on the heart size. Also the positioning of the heart with respect to the electrodes changes the current. We found out that by lowering the heart from a centralised position of the heart between the electrodes in z direction the current flowing through the heart can be increased by up to 20 %.Patients with a high risk of cardiac fibrillation usually are under pharmaceutical treatment. If this fails ablation therapy is applied. In ablation therapy parts of the heart are burned either by heat or by cold to stabilize the electrical system in the heart to reduce the probability of arrhythmias. A method called inverse ECG or ECG imaging is researched worldwide to provide information about the properties of the heart tissue to identify the regions to burn. I extended the numerical framework with a method for cardiac electric dynamics, potential reconstruction, diffusion of the potential into the vicinity of the bath and ECG signal integration.The source of the ECG signals is a potential distribution at the outside of the heart. They are referenced against other ECG electrodes to handle that fact that potentials are only defined up to a constant. This can be interpreted as the ECG signal being 8.