par.setMass(1);
par.setCharge(charge*(1-2*k));
stt.addParticle(par);
}
stt.setPoissonSolver(new PoissonSolverFFTPeriodic());
stt.useGrid(true);
stt.setInterpolator(new ChargeConservingCIC());
//set to charge conserving CIC; already preset in settings
Simulation simulation = new Simulation(stt);
return simulation;