<p>Coronal mass ejections (CMEs), the most violent eruptive phenomena occurring in the heliosphere, erupt in the form of gigantic clouds of magnetized plasma from the Sun and can reach Earth within several hours to days. If the magnetic field inside an Earth-directed CME or its associated sheath region has a southward directed component (Bz), then it interacts&#160;stronger&#160;with the Earth&#8217;s magnetosphere, leading to severe geomagnetic storms. Therefore, it is crucial to predict the&#160;magnitude&#160;and orientation&#160;of Bz inside an Earth impacting interplanetary CME (ICME) in order to forecast the intensity of the resulting geomagnetic storms. However, due to&#160;lack of realistic inputs and the complexity of the Sun-Earth system in a time-dependent heliospheric context, it is very difficult to perform a reliable forecast of Bz at 1 AU.&#160;&#160;</p><p>In this work, we use&#160;recently developed observational techniques to constrain the kinematic and magnetic properties of CME flux ropes. Using those observational properties as realistic inputs, we construct an&#160;analytical force free flux rope model to mimic the magnetic structure of a CME and simulate its evolution from Sun to Earth&#160;using the &#8220;European heliospheric forecasting information asset&#8221; (EUHFORIA). In order to validate our tool, we simulate an Earth-directed CME event on 2013 April 11 and compare the simulation results with the in-situ observations at 1 AU. Further, we assess the performance of EUHFORIA in forecasting of Bz, using different flux rope models like spheromak and torus.&#160; The results obtained from this study help to improve our understanding to build the steppingstones towards the forecasting of Bz in near real time.</p><p>This research has received funding from the European Union&#8217;s Horizon 2020 research and innovation programme under grant agreement No 870405 (EUHFORIA 2.0).</p>