**description:**`haissinski`solves the Haissinski equation for the bunch steady-state longitudinal distribution in the presence of various impedances.**synopsis:**`haissinski`*twissFile**resultsFile*-wakeFunction=*file*,tColumn=*name*,wColumn=*name*| -model=[L=*Henry*|Zn=*Ohms*],R=*Ohm*-charge=*C*| -particles=*value*| -bunchCurrent=*A*-steps=*numberOfChargeSteps*-outputLastStepOnly -RF=Voltage=*V*,harmonic=*value*| -length=*s*-harmonicCavity=Voltage=*V*,factor=*harmonicFactor*-superPeriods=*number*-energy=*GeV*-integrationParameters=deltaTime=*s*,points=*number*,startTime=*s*, iterations=*number*,fraction=*value*,tolerance=*value***files:***twissFile*-- Twiss output file from`elegant`, including radiation integral calculations.`resultsFile`-- SDDS file containing computed bunch longitudinal distributions as columns, along with analysis and conditions as parameters.

**switches:**`-wakeFunction=`-- Optionally specifies the impedance as a Greens function using values in an SDDS file. The time points must be equi-spaced.*file*,tColumn=*name*,wColumn=*name*`-model=[L=`-- Optionally specifies the impedance as an inductor*Henry*|Zn=*Ohms*],R=*Ohm*`L`or broad-band value`Zn`, along with a resistance`R`.`-charge=`-- Various ways to specify the charge in each bunch.*C*| -particles=*value*| -bunchCurrent=*A*`-steps=`-- Number of values of bunch charge to compute up to the value specified with on the just-described options. Using more values can help convergence, as the result of each prior step is used as the starting point for the new step.*numberOfChargeSteps*`-outputLastStepOnly`-- Requests output for the last charge step (full charge) only.`-RF=Voltage=`-- Two ways to specify the nominal bunch length.*V*,harmonic=*value*| -length=*s*`-harmonicCavity=Voltage=`-- Specifies a harmonic cavity voltage and the ratio of the harmonic cavity frequency to the main frequency.*V*,factor=*harmonicFactor*`-superPeriods=`-- Number of superiods of the lattice specified in*number**twissfile*to simulate. If one has an N cell ring but only gives 1 cell in the input, this value should be N. If one gives the whole ring, this value should be 1.`-energy=`-- Beam energy. If not given, the value in the*GeV**twissfile*is used.`-integrationParameters=deltaTime=`*s*,points=*number*,startTime=*s*,

`iterations=`-- Integration parameters, which must be set.*number*,fraction=*value*,tolerance=*value*`deltaTime`is the time interval for wake function and charge density evaluation.`points`is the number of time points, while`startTime`is the time (relative to synchronous phase) at which the time region starts. These values must be set by the user based on knowledge of the likely bunch length. For the others, we suggest 1000 iterations, a fraction of 0.01, and a tolerance of .

**authors:**L. Emery, M. Borland, ANL/APS.