Four different phases can be distinguished in the ultrasonic welding process; the solid friction phase, the transient phase, the steady-state phase and the cooling phase.
https://www.bjultrasonic.com/shop/ultrasonic-welding-transducer/

In the solid friction phase, heat is generated as a result of the friction energy between the two surfaces and the internal frictional in the parts. This causes the polymer material to heat up until the melting point is reached. The heat generated is dependent on the applied frequency, amplitude and pressure.

In the second phase, a thin molten polymer layer is formed which grows in thickness as a result of the continuous heat generation. In this stage heat is generated by viscous dissipation. At first only a thin molten layer exists and consequentially the shear-rate and viscous heating contribution are large. As the thickness of the molten layer increases the degree of viscous heating decreases. At a certain point (start of third phase) the melting rate equals the outward flow rate (steady state).

As soon as this phase has been reached, the thickness of the molten layer is constant. The steady-state is maintained until a certain “melt down depth” has been reached at which the vibration is stopped.

At this point (phase 4) the polymer melt cools and solidification starts. Film drainage still occurs since the welding pressureis maintained. After solidification of all the material no further drainage occurs and the joint is formed.