The combustion of gaseous fuels like methane in internal combustion engines is an interesting alternative to the conventional gasoline and diesel fuels. Reasons are the availability of the resource and the significant advantage in terms of CO2 emissions due to the beneficial C/H ratio. One difficulty of gaseous fuels is the preparation of the gas/air mixtures for all operation points, since the volumetric energy density of the fuel is lower compared to conventional liquid fuels. Low-pressure port-injected systems suffer from substantially reduced volumetric efficiencies. Direct injection systems avoid such losses; in order to deliver enough fuel into the cylinder, high pressures are however needed for the gas injection which forces the fuel to enter the cylinder at supersonic speed followed by a Mach disk. The detailed modeling of these physical effects is very challenging, since the fluid velocities and pressure and velocity gradients at the Mach disc are very high. A detailed simulation of these effects in CFD calculations of real engine geometries is numerically challenging and computationally expensive. The main goal of this study is hence to develop inlet boundary conditions which can accurately reproduce the most important physical mechanisms without increasing the complexity of a real engine simulation significantly.To this end, two and three-dimensional underexpanded flows for a single-orifice injector were numerically investigated in STAR-CD. The two dimensional setup was used to investigate the spatial and temporal resolution requirements. Based on these findings a three-dimensional setup, with the same nozzle diameter as in the real engine was created and the flow field simulated using RANS and LES approaches. The results showed very good agreement with an empirical correlation concerning the position of the Mach disc for pressure ratios of 16.5 and 32. The numerical data was statistically post-processed and then used as a basis for derivation of inlet conditions which reproduce velocity, turbulence and CH4 mixture fraction fields downstream of the Mach disc.