Using observational data, we build numerical N-body, hydrodynamical and combined equilibrium models for the spiral galaxy NGC 5247. The models turn out to be unstable as regards spiral structure formation. We simulate scenarios of spiral structure formation for different sets of equilibrium rotation curves, radial velocity-dispersion profiles and disc thicknesses and demonstrate that in all cases the simulated spiral pattern agrees qualitatively with the observed morphology of NGC 5247. We also demonstrate that an admixture of a gaseous component with a mass of about a few per cent of the total mass of the disc increases the lifetime of a spiral pattern by approximately 30 per cent. The simulated spiral pattern in this case lasts for about 3 Gyr from the beginning of the growth of perturbations.