Velocity field as the gradient of a scalar function
In fluid dynamics, potential flow or irrotational flow refers to a description of a fluid flow with no vorticity in it. Such a description typically arises in the limit of vanishing viscosity, i.e., for an inviscid fluid and with no vorticity present in the flow.
Potential flow describes the velocity field as the gradient of a scalar function: the velocity potential. As a result, a potential flow is characterized by an irrotational velocity field, which is a valid approximation for several applications. The irrotationality of a potential flow is due to the curl of the gradient of a scalar always being equal to zero.
In the case of an incompressible flow the velocity potential satisfies Laplace's equation, and potential theory is applicable. However, potential flows also have been used to describe compressible flows and Hele-Shaw flows. The potential flow approach occurs in the modeling of both stationary as well as nonstationary flows. 
Applications of potential flow include: the outer flow field for aerofoils, water waves, electroosmotic flow, and groundwater flow. For flows (or parts thereof) with strong vorticity effects, the potential flow approximation is not applicable. In flow regions where vorticity is known to be important, such as wakes and boundary layers, potential flow theory is not able to provide reasonable predictions of the flow. Fortunately, there are often large regions of a flow where the assumption of irrotationality is valid which is why potential flow is used for various applications. For instance in: flow around aircraft, groundwater flow, acoustics, water waves, and electroosmotic flow.
Description and characteristics.
In potential or irrotational flow, the vorticity vector field is zero, i.e., 
formula_1,
where formula_2 is the velocity field and formula_3 is the vorticity field. Like any vector field having zero curl, the velocity field can be expressed as the gradient of certain scalar, say formula_4 which is called the velocity potential, since the curl of the gradient is always zero. We therefore have
formula_5
The velocity potential is not uniquely defined since one can add to it an arbitrary function of time, say formula_6, without affecting the relevant physical quantity which is formula_7. The non-uniqueness is usually removed by suitably selecting appropriate initial or boundary conditions satisfied by formula_8 and as such the procedure may vary from one problem to another.
In potential flow, the circulation formula_9 around any simply-connected contour formula_10 is zero. This can be shown using the Stokes theorem, 
formula_11
where formula_12 is the line element on the contour and formula_13 is the area element of any surface bounded by the contour. In multiply-connected space (say, around a contour enclosing solid body in two dimensions or around a contour enclosing a torus in three-dimensions) or in the presence of concentrated vortices, (say, in the so-called irrotational vortices or point vortices, or in smoke rings), the circulation formula_9 need not be zero. In the former case, Stokes theorem cannot be applied and in the later case, formula_15 is non-zero within the region bounded by the contour. Around a contour encircling an infinitely long solid cylinder with which the contour loops formula_16 times, we have 
formula_17
where formula_18 is a cyclic constant. This example belongs to a doubly-connected space. In an formula_19-tuply connected space, there are formula_20 such cyclic constants, namely, formula_21
Incompressible flow.
In case of an incompressible flow — for instance of a liquid, or a gas at low Mach numbers; but not for sound waves — the velocity v has zero divergence:
formula_22
Substituting here formula_23 shows that formula_8 satisfies the Laplace equation
formula_25
where ∇2 
 ∇ ⋅ ∇ is the Laplace operator (sometimes also written Δ). Since solutions of the Laplace equation are harmonic functions, every harmonic function represents a potential flow solution. As evident, in the incompressible case, the velocity field is determined completely from its kinematics: the assumptions of irrotationality and zero divergence of flow. Dynamics in connection with the momentum equations, only have to be applied afterwards, if one is interested in computing pressure field: for instance for flow around airfoils through the use of Bernoulli's principle.
In incompressible flows, contrary to common misconception, the potential flow indeed satisfies the full Navier–Stokes equations, not just the Euler equations, because the viscous term 
formula_26
is identically zero. It is the inability of the potential flow to satisfy the required boundary conditions, especially near solid boundaries, makes it invalid in representing the required flow field. If the potential flow satisfies the necessary conditions, then it is the required solution of the incompressible Navier–Stokes equations.
In two dimensions, with the help of the harmonic function formula_8 and its conjugate harmonic function formula_28 (stream function), incompressible potential flow reduces to a very simple system that is analyzed using complex analysis (see below).
Compressible flow.
Steady flow.
Potential flow theory can also be used to model irrotational compressible flow. The derivation of the governing equation for formula_8 from Eulers equation is quite straightforward. The continuity and the (potential flow) momentum equations for steady flows are given by
formula_30
where the last equation follows from the fact that entropy is constant for a fluid particle and that square of the sound speed is formula_31. Eliminating formula_32 from the two governing equations results in
formula_33
The incompressible version emerges in the limit formula_34. Substituting here formula_23 results in
formula_36
where formula_37 is expressed as a function of the velocity magnitude formula_38. For a polytropic gas, formula_39, where formula_40 is the specific heat ratio and formula_41 is the stagnation enthalpy. In two dimensions, the equation simplifies to 
formula_42
Validity: As it stands, the equation is valid for any inviscid potential flows, irrespective of whether the flow is subsonic or supersonic (e.g. Prandtl–Meyer flow). However in supersonic and also in transonic flows, shock waves can occur which can introduce entropy and vorticity into the flow making the flow rotational. Nevertheless, there are two cases for which potential flow prevails even in the presence of shock waves, which are explained from the (not necessarily potential) momentum equation written in the following form
formula_43
where formula_44 is the specific enthalpy, formula_15 is the vorticity field, formula_46 is the temperature and formula_47 is the specific entropy. Since in front of the leading shock wave, we have a potential flow, Bernoulli's equation shows that formula_48 is constant, which is also constant across the shock wave (Rankine–Hugoniot conditions) and therefore we can write
formula_49
1) When the shock wave is of constant intensity, the entropy discontinuity across the shock wave is also constant i.e., formula_50 and therefore vorticity production is zero. Shock waves at the pointed leading edge of two-dimensional wedge or three-dimensional cone (Taylor–Maccoll flow) has constant intensity. 2) For weak shock waves, the entropy jump across the shock wave is a third-order quantity in terms of shock wave strength and therefore formula_51 can be neglected. Shock waves in slender bodies lies nearly parallel to the body and they are weak.
Nearly parallel flows: When the flow is predominantly unidirectional with small deviations such as in flow past slender bodies, the full equation can be further simplified. Let formula_52 be the mainstream and consider small deviations from this velocity field. The corresponding velocity potential can be written as formula_53 where formula_54 characterizes the small departure from the uniform flow and satisfies the linearized version of the full equation. This is given by
formula_55
where formula_56 is the constant Mach number corresponding to the uniform flow. This equation is valid provided formula_57 is not close to unity. When formula_58 is small (transonic flow), we have the following nonlinear equation
formula_59
where formula_60 is the critical value of Landau derivative formula_61 and formula_62 is the specific volume. The transonic flow is completely characterized by the single parameter formula_60, which for polytropic gas takes the value formula_64. Under hodograph transformation, the transonic equation in two-dimensions becomes the Euler–Tricomi equation.
Unsteady flow.
The continuity and the (potential flow) momentum equations for unsteady flows are given by
formula_65
The first integral of the (potential flow) momentum equation is given by 
formula_66
where formula_6 is an arbitrary function. Without loss of generality, we can set formula_68 since formula_8 is not uniquely defined. Combining these equations, we obtain
formula_70
Substituting here formula_23 results in
formula_72
Nearly parallel flows: As in before, for nearly parallel flows, we can write (after introudcing a recaled time formula_73)
formula_74
provided the constant Mach number formula_57 is not close to unity. When formula_58 is small (transonic flow), we have the following nonlinear equation
formula_77
Sound waves: In sound waves, the velocity magntiude formula_78 (or the Mach number) is very small, although the unsteady term is now comparable to the other leading terms in the equation. Thus neglecting all quadratic and higher-order terms and noting that in the same approximation, formula_79 is a constant (for example, in polytropic gas formula_80), we have
formula_81
which is a linear wave equation for the velocity potential φ. Again the oscillatory part of the velocity vector v is related to the velocity potential by v 
 ∇"φ", while as before Δ is the Laplace operator, and c is the average speed of sound in the homogeneous medium. Note that also the oscillatory parts of the pressure p and density ρ each individually satisfy the wave equation, in this approximation.
Applicability and limitations.
Potential flow does not include all the characteristics of flows that are encountered in the real world. Potential flow theory cannot be applied for viscous internal flows, except for flows between closely spaced plates. Richard Feynman considered potential flow to be so unphysical that the only fluid to obey the assumptions was "dry water" (quoting John von Neumann). Incompressible potential flow also makes a number of invalid predictions, such as d'Alembert's paradox, which states that the drag on any object moving through an infinite fluid otherwise at rest is zero. More precisely, potential flow cannot account for the behaviour of flows that include a boundary layer. Nevertheless, understanding potential flow is important in many branches of fluid mechanics. In particular, simple potential flows (called elementary flows) such as the free vortex and the point source possess ready analytical solutions. These solutions can be superposed to create more complex flows satisfying a variety of boundary conditions. These flows correspond closely to real-life flows over the whole of fluid mechanics; in addition, many valuable insights arise when considering the deviation (often slight) between an observed flow and the corresponding potential flow. Potential flow finds many applications in fields such as aircraft design. For instance, in computational fluid dynamics, one technique is to couple a potential flow solution outside the boundary layer to a solution of the boundary layer equations inside the boundary layer. The absence of boundary layer effects means that any streamline can be replaced by a solid boundary with no change in the flow field, a technique used in many aerodynamic design approaches. Another technique would be the use of Riabouchinsky solids.
Analysis for two-dimensional incompressible flow.
Potential flow in two dimensions is simple to analyze using conformal mapping, by the use of transformations of the complex plane. However, use of complex numbers is not required, as for example in the classical analysis of fluid flow past a cylinder. It is not possible to solve a potential flow using complex numbers in three dimensions.
The basic idea is to use a holomorphic (also called analytic) or meromorphic function f, which maps the physical domain ("x", "y") to the transformed domain ("φ", "ψ"). While x, y, φ and ψ are all real valued, it is convenient to define the complex quantities
formula_82
Now, if we write the mapping f as
formula_83
Then, because f is a holomorphic or meromorphic function, it has to satisfy the Cauchy–Riemann equations
formula_84
The velocity components ("u", "v"), in the ("x", "y") directions respectively, can be obtained directly from f by differentiating with respect to z. That is
formula_85
So the velocity field v 
 ("u", "v") is specified by
formula_86
Both φ and ψ then satisfy Laplace's equation:
formula_87
So φ can be identified as the velocity potential and ψ is called the stream function. Lines of constant ψ are known as streamlines and lines of constant φ are known as equipotential lines (see equipotential surface).
Streamlines and equipotential lines are orthogonal to each other, since
formula_88
Thus the flow occurs along the lines of constant ψ and at right angles to the lines of constant φ.
Δ"ψ" 
 0 is also satisfied, this relation being equivalent to ∇ × v 
 0. So the flow is irrotational. The automatic condition 
 then gives the incompressibility constraint ∇ · v 
 0.
Examples of two-dimensional incompressible flows.
Any differentiable function may be used for f. The examples that follow use a