Calculation of current in a filament