ZtoPhi = 2.0 * pi / lattice.getLength() dESync = 0.0 RFHNum = 4 RFVoltage = 400 * pow(10, -9) RFPhase = 0.0 length = 0.05 name = "rfnode" rf_node = RFNode.Harmonic_RFNode(ZtoPhi, dESync, RFHNum, RFVoltage, RFPhase, length, name) position = 25.79485606 RFLatticeModifications.addRFNode(lattice, position, rf_node) sizeX = 64 #number of grid points in horizontal direction sizeY = 64 #number of grid points in vertical direction sizeZ = 3 #number of longitudinal slices in the 2.5D space charge solver calc2p5d = SpaceChargeCalc2p5D(sizeX, sizeY, sizeZ) for node in lattice.getNodes(): if node.getType() == "drift teapot": if node.getLength() > 0.01 and node.getLength() < 0.1: node.setnParts(2) elif node.getLength() >= 0.1 and node.getLength() < 0.5: node.setnParts(3) elif node.getLength() > 0.5: node.setnParts(8) if node.getType() == "quad teapot": node.setnParts(8) if node.getType() == "bend teapot": node.setnParts(8) if node.getType() == "multipole teapot": node.setnParts(8)
print "Read Bunch." runName = "KV_Ellipse_5e12_1" energy = 1.0 #Gev b.mass(0.93827231) b.macroSize(5.0e+7) # get initial bunch from ORBIT_MPI input bunch_orbit_to_pyorbit(lattice.getLength(), energy, "../DISTRIBUTIONS/Bm_KV_Ellipse", b) #make 2.5D space charge calculator sizeX = 128 sizeY = 128 sizeZ = 32 xy_ratio = 10.0 calc2p5d = SpaceChargeCalc2p5D(sizeX, sizeY, sizeZ, xy_ratio) # boundary nBoundaryPoints = 128 N_FreeSpaceModes = 32 boundary_radius = 0.11 boundary = Boundary2D(nBoundaryPoints, N_FreeSpaceModes, "Circle", 2 * boundary_radius) #=====track bunch through SC Node============ sc_path_length_min = 0.05 scNode_arr = scLatticeModifications.setSC2p5DAccNodes(lattice, sc_path_length_min, calc2p5d, boundary) ACC_TURNS = 1