[Archive] New Particle Type

Message by abul anuar:
Hi,
I wish to introduce new particle in the program. The easiest way i figure is to include the particle in the file SpisDefaultPartTypes.java using the Part constructor. However, instead of using a fixed values for this type of particle, i want it to be changeable via SpisUI, i.e. the values of its mass, charge and molecule number to be entered by the user. For that, i need the program to extract the values from the globalParameter.I have already added the particle description name (partName, partMass, partCharge and partZ) in the Common.java file. I also create a new method (extractPartParam (String option)) in the GlobalParameter class, following other extraction method (eg. extractVelo).
I add the part descriptions in the UI, and as an example replace the H+ with the partName, and gives all the required value for pMass, pCharge and pZ. When i try to run the simulation, i cannot get the extractParam method in the Parameter class to work, i.e. the program cannot read the values given in the UI. I check the inputs to the extractParam and i think the array params is returning null value which causes the thing to stop.
Can anyone help me with this problem? Has anyone knows how to add new generic particle in the particle list with input given in the UI?
thanks,
abul

Message by abul anuar:
Hi,
I’ve been through the code once again and and finally managed to pinpoint the problem. When i try to use the method extractParam via the extraPartParam (the one that i created) the input Common.globalParameters is null. So i look back at the files defaultValues in the SpisUI Bin and realise that the UI doesnot include the new parameter that i add to the list in the Global Parameter Editor, i.e. sharedGlobals does not create the what should be the parameter array containing the new field. The new questions now are

  1. Is there any other files apart from the defaultGlobalParameters in the Bin/DefaultValues that i need to change?
2. Why cant i update the defaultGlobalParameters file? 3. When we add parameter in the global parameter editor, where will the system save this file? hope someone is reading and knows the answer. thanks.