A dislocation near a free surface feels a force towards the boundary, which is called the image force. In this investigation, a simple edge dislocation is simulated using Finite Element Method (FEM) by feeding-in the appropriate stress-free strain in idealized domains, corresponding to the introduction of an extra half-plane of atoms. The strains are imposed as thermal strains in the numerical model using standard commercially available software. The results of the simulation (stress fields and energy) are compared with the standard theoretical equations to validate the model. The energy of the system as a function of the position of the simulated dislocation is plotted and the gradient of the curve is calculated at various points along the curve. This slope corresponds to the image force experienced by the dislocation. The image force can be resolved into a glide component and a climb component, which are determined from the simulation by appropriately positioning the dislocation at various points in the domain. The term image force is used in literature (for the force experienced by a dislocation in the vicinity of a free-surface), because a hypothetical negative dislocation is assumed to exist on the other side of the boundary for the calculation of the force. In the current model no such assumption is required for the determination of the image force. In nanocrystals the dislocation will be proximal to more than one surface and hence the resultant image force experienced by the dislocation is superimposition of these forces. The utilization of the numerical model for the calculation of image forces in nanocrystals requires no further modifications to the simulation methodology as the image force is determined from 'first principles' as a gradient of the energy field.