How to define beam parameters

I am doing a simulation about how proton pulse characteristics influence proton-induced acoustic emission.I need to define the main parameters of beam shape,like beam rising time,beam pluse time. I am new in fortran.Should i set these in source.f?

Can anyone help me?
Thank you!

Dear @ye.jiaquan,

That is a very brave proposal. To set the beam shape and energy editing the BEAM card would be enough. Instead, if you want to act on the “timing” of the particles, you would need to write a source routine.
Then it depends how you are going to achieve your final goal. I guess that you will then use the Fluka output as an input to ANSYS (or a similar code). Unfortunately, I am not familiar with it, but maybe, rather than changing the timing in Fluka, it could be easier to change it in ANSYS, because one could assume that the characteristics of the target wouldn’t change on a timescale as short as the pulse duration. Also, I’m not sure that the time structure of the proton bunch as a large effect on the induced vibration, being it on a much smaller timescale, but I guess this is probably one of things you want to investigate with your study.