In railgun, which is used to accelerate objects, electrical energy is used to drive the system. In order to reach hypervelocity, a power supply with immense amount of energy must be used which causes an extra ordinary current on the rail and the armature. This current makes thermal energy by ohmic attenuation and warms up various points and therefore changes the electrical , thermal and mechanical specifications of the structure. This paper present a method by which one can consider the inhomogenity created by temperature changes along the structure. In this method , the instantaneous current distribution in the structure and the heat caused by it are calculated, and then the temperature distribution is obtained . The electrical conductivity (a) , thermal conductivity (k) and specific-heat (c) are considered inhomogeneous and are calculated at every instant until the specifications of the material forming the structure be corrected at any instant. Three dimensional finite element method with non-uniform meshing at any instant is used.