Warwick-Plasma/epoch

allow arbitrary resolution for dist_fn spatial directions

Opened this issue · 1 comments

image

Hi,
When using the distribution function, you are allowed to set the resolution for any "direction" except the spatial directions. Is it because it is tough to re-bin in the spatial directions? I am not sure why it wouldn't be as difficult as other directions.
It can be helpful memory-wise to lower the resolution compared to the resolution of the simulation. Increasing the resolution can be helpful as well in some cases.
Regards,
Kavin Tangtartharakul

As I remember, this is very old standing issue. The easiest way

  1. Open dist_fn.f90

  2. Comment whole section (line 203-332 in my version of EPOCH)
    IF (direction(idim) == c_dir_x) THEN

  3. Add
    ELSE IF (direction(idim) == c_dir_z) THEN
    labels(idim) = 'Z'
    units(idim) = 'm'

    ELSE IF (direction(idim) == c_dir_y) THEN
    labels(idim) = 'Y'
    units(idim) = 'm'

    ELSE IF (direction(idim) == c_dir_x) THEN
    labels(idim) = 'X'
    units(idim) = 'm'
    in subsequent "IF (direction(idim) == c_dir_px) THEN" section, then recompile. It should work.

But for compatibility it is better to add your our new directions, say c_dir_modx, etc, and use them instead of c_dir_x. This will require changes in constants.f90, tockenizer_blocks.f90, evaluator_blocks.f90 and dist_fn.F90 at least. But they are quite straightforward.