  Context: One of the ways to determine the contribution of the dark halo to
the gravitational potential of a galaxy is the study of non-circular
(streaming) motions and the associated gas shocks in the bar region. These
motions, determined by the potential in the inner parts, can break the
disk-halo degeneracy. Here, two main fluid dynamical approaches have been
chosen to model the non-circular motions in the bar region; a 2-D Eulerian grid
code for an isothermal gas (FS2) and a 3-D smoothed particle hydrodynamic code
(N-body/SPH). Aims: The aim of this paper is to compare and quantify the
differences of the gas flows in rotating barred potential obtained using two
different fluid dynamical approaches. We analyse the effect of using 2-D and a
3-D codes in the calculation of gas flow in barred galaxies and to which extend
the results are affected by the code. To do this, we derive the velocity field
and density maps for the mass model of NGC 4123 using a 3-D N-body/SPH code and
compare the results to the previous 2-D Eulerian grid code results. Methods:
Numerical modelling, 3-D N-body/SPH simulations Results: The global velocity
field and the gas distribution is very similar in both models. The study shows
that the position and strength of the shocks developed in the SPH simulations
do not vary significantly compared to the results derived from the 2-D FS2
code. The largest velocity difference across the shock is 20\kms between the
2-D and 3-D fluid dynamical models. Conclusions: The results obtained in the
studies deriving the dark matter content of barred galaxies using the bar
streaming motions and strength and position of shocks are robust to the fluid
dynamical model used. The effect of 2-D and 3-D modelling can be neglected in
this type of studies.
