  The surface impedance approach to the description of the thermal Casimir
effect in the case of real metals is elaborated starting from the free energy
of oscillators. The Lifshitz formula expressed in terms of the dielectric
permittivity depending only on frequency is shown to be inapplicable in the
frequency region where a real current may arise leading to Joule heating of the
metal. The standard concept of a fluctuating electromagnetic field on such
frequencies meets difficulties when used as a model for the zero-point
oscillations or thermal photons in the thermal equilibrium inside metals.
Instead, the surface impedance permits not to consider the electromagnetic
oscillations inside the metal but taking the realistic material properties into
account by means of the effective boundary condition. An independent derivation
of the Lifshitz-type formulas for the Casimir free energy and force between two
metal plates is presented within the impedance approach. It is shown that they
are free of the contradictions with thermodynamics which are specific to the
usual Lifshitz formula for dielectrics in combination with the Drude model. We
demonstrate that in the impedance approach the zero-frequency contribution is
uniquely fixed by the form of impedance function and does not need any of the
ad hoc prescriptions intensively discussed in the recent literature. As an
example, the computations of the Casimir free energy between two gold plates
are performed at different separations and temperatures. It is argued that the
surface impedance approach lays a reliable framework for the future
measurements of the thermal Casimir force.
