Electrodynamic and thermodybamic modeling of the lightning channel