In this paper, we consider the fluid dynamical formulation of optimal transport for general nonlinear control systems that are of control-affine form for general cost functionals. When the system is driftless, this corresponds to the sub-Riemannian optimal transport problem. We first consider the issue of existence of solutions for this optimization problem. We introduce a relaxed formulation of the problem where the controls are allowed to be measure valued. Using this relaxed formulation, we provide a simple sufficient condition for controllability of the problem using deterministic controls, based on controllability properties of the underlying control system. We then use the relaxed formulation to establish existence for the original fluid-dynamical optimal transport problem. Then we consider the problem of numerically computing the feedback control laws that generate optimal transport. We propose fast algorithms to calculate the sub-Riemannian Wasserstein-p distance (Wp), p = 1, 2 on the discretized domain with the rate of convergence independent of grid size, which is important for large scale problems. For sub-Riemannian W 1 cost with driftless system, we formalize the optimization problem to be independent of time-variable which reduces the dimensionality of the problem significantly. We validate our numerical approach on driftless systems (the Grushin plane system, the unicycle model) and a under-actuated globally controllable 2D system with drift.