Numerical modeling of unstable flows in conducts with variable geometry