Picongpu: reading radiation data

Created on 15 Jul 2020  路  8Comments  路  Source: ComputationalRadiationPhysics/picongpu

Hello
I have run the original Kelvin Helmholtz model trying to get some information about the radiation pattern. I read the documentation about how to set up the radiation.param and radiationObserver.param but I have no idea how to process the output h5 file.

Note that I didn't modify the model at all except adding TBG_e_radiation="--e_radiation.period 100" in the 1.cfg file and !TBG_e_radiation at the TBG_plugins list. Thus a file

image

appeared in my simOutput/radiationHDF5/ folder.

My issues are:

  1. Will this file be generated by default without needing to apply the changes I did apply in the 1.cfg file?
  2. Is there a way to obtain the radiation output file in binary format the same as I obtain all other data using the adios plugin such as
    image
  3. Having a radiation output file such as e_radAmplitudes_2000_0_0_0.h5 what could I search inside it? The openPMD Viewer commands shown below gave me no useful information.
    image
  4. For me, the documentation https://picongpu.readthedocs.io/en/latest/usage/plugins/radiation.html#usage-plugins-radiation is a bit difficult to understand. On one hand --<species>_radiation.period is supposed to "give the number of time steps between which the radiation should be calculated" so in the Kelvin Helmholtz example period = 100 but "any value >=2 is currently producing nonsense" and on the other hand --<species>_radiation.dump is the "period, after which the calculated radiation data should be dumped to the file system". I my case would like to have a graph of radiation intensity or brilliance versus frequency or wavelength, at each 100 time steps for the example above. What would be the right syntax?

Thank you.
Cristian

plugin question

All 8 comments

I guess the radiation expert (and developer of that plugin) @PrometheusPi could clarify this?

@sbastrakov Thanks for pinging me

@cbontoiu Regarding your questions:

  1. Yes, the hdf5 file will always be created (assuming you correctly enabled the radiation plugin) if you use --e_radiation.period 1 --e_radiation.dump 100. In contrast to your setting, the --e_radiation.period 1 need to be set to 1. Any other value is currently not supported. (please see documentation: here) The hdf5 is the default output and will always be created. Optionally you can enable text based output via --e_radiation.totalRadiation and e_radiation.lastRadiation.
  2. There is no other output data format other then text or sequential libSplash (hdf5) output. The example you stated is an adios file. What makes this and not the hdf5 file a binary file for you? (I am a bit confused by this question, sorry.)
  3. There is currently no openPMD viewer support for this file type. Is is however in accordance with openPMD. You can use the following python module to load and read the data: radiation.py. A documentation of the hdf5 file structure and the reader module can be found here.
  4. In contrast to other plugins, where --e_<...>.period X states that the analysis and the output of the analysis are computed and dumped every X PIC step, the radiation plugin works differently. It has to compute the Li茅nard-Wiechert potentials at every time step - thus --e_radiation.period requires to be set to 1. But since you do not need output that often, there is the additional --e_radiation.dump Y parameter that sets the data output into files to every Y time step.

If you are interested in studying the radiation of the KHI, please have a look at the following paper: https://doi.org/10.1103/PhysRevE.96.013316 and https://doi.org/10.1145/2503210.2504564.

Please be also aware that the finite simulation box size creates spectral modulations that need to be removed via window functions. For a documentation of supported window functions please see here. I personally would recommend the Triplett window.

@PrometheusPi
I found a kind of inconsistency when working with the radiation plugin. I normally source a file as source /home/quasar/PIC_INPUT/one-tube-plates-parallel-LX/outSteps.sh and then use the stps variable as TBG_adios="--adios.period $stps in the cfg file with
image
This works fine for the !TBG_adios plugin and allows me to write out data only at some steps.

But the stps variable cannot be use with the !TBG_e_radiation plugin as in TBG_e_radiation="--e_radiation.period 1 --e_radiation.dump $stps --e_radiation.totalRadiation --e_radiation.lastRadiation"
and I got an error like
image

To my understanding (a copy of the actual batch file would be usefule here) you are trying to invoke the radiation plug-in with the period syntax.
Recalling an offline talk with @PrometheusPi this is not (yet) supported for radiation.

The parameters for the plug-in allow (only) for a simple definition of when to start (single time step only) and when to end (single time step only) the computation and how often to dump the data in between the start and end (and also what type of data to dump and where), e.g.,
--e_radiation.period 1 --e_radiation.dump 50 --e_radiation.lastRadiation --e_radiation.start 19000 --e_radiation.end 40000 --e_radiation.totalRadiation

@Anton-Le Thank you, it seems so. Not a big problem but this means one cannot sample radiation at the same time steps as when particles and fields information is written, unless using a constant step throughout the simulation.

the batch file is shown as snapshot above.

That is correct.
While a period syntax for radiation has been discussed it may result in its own problems: step-functions in time that lead to non-physical Gibbs oscillations in the data.

An example from my own experience is shown in the following image:

IntegratedIntensityVsTimeStep_detectorNr_1

The image shows the radiation integrated over frequencies for each time step for a detector oriented along the black arrow. RGB arrows correspond to xyz axes and the pink one to the direction of propagation of the bunch.
The case is of the radiation of an electron bunch impacting on a homogeneous background plasma. The plasma starts at time step 19000 but I set the computation of the radiation to time step 24000 (so well after the bunch hits the background plasma).

We observe the development of high-frequency oscillations which should not be there! If the radiation plug in is turned on before the bunch hits the plasma these oscillations vanish.

@cbontoiu Just to comment on that. Yes, the radiation plugin was not build for arbitrary dump periods. This is due to the reason that in contrast to all other plugins, which give a temporal snap-shot of the data, the radiation plugin performs a time integration and thus gives the radiation for the entire time from start to end. The regular outputs are just a way to later perform a temporal derivative again to better extract the time evolution from the integrated radiation. With such a numeric differentiation, fixed time intervals is best.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

berceanu picture berceanu  路  3Comments

ax3l picture ax3l  路  3Comments

psychocoderHPC picture psychocoderHPC  路  4Comments

sbastrakov picture sbastrakov  路  3Comments

bussmann picture bussmann  路  4Comments