Feature Request for Adiabatic ions

Issue #114 new
Ian Abel created an issue

It would be great to have a way to run with adiabatic ions that is less confusing than renaming electrons to ions 🙂

I believe species_type='ion' vs ‘electron’ doesn’t do anything explicitly other than with the adiabatic response, but it still makes the input files hard to read to have electrons with species_type='ion'

Comments (8)

  1. David Dickinson

    Without checking the code I think @Joseph Parker may have introduced something equivalent to this feature a while ago. Previously we checked if there were any electron species, and if not we include an adiabatic species. Now I think we check if there are no electron species or no ion species so I think the type species parameter now primarily just controls the collisional treatment.

    We certainly don’t pick the appropriate adiabatic response based on these options, which we should if we can.

  2. Ian Abel reporter

    Ahah – possibly ingen didn’t pick this up, as it still grumbles a bit about missing species if i just have one electron species and no ions.

  3. David Dickinson

    Ah yes ingen is almost certainly unaware of such changes. We should improve this. We’ve been trying to work on documentation (mostly infrastructure and porting/expanding old namelist documentation https://gyrokinetics.gitlab.io/gs2/page/namelists/index.html ) but we should remember to include ingen reports in this work.

    I’ve had chance to look at the code now and can see that these changes do appear to be in the current release , e.g. https://bitbucket.org/gyrokinetics/gs2/src/57e36c06b1fdd6b3e0012f99c3062515d76acb1f/src/dist_fn.fpp#lines-5816

  4. Michael Hardman

    Hi Ian and David,

    You found the changes that Joseph and I put in during my PhD. There is a caveat attached -- you can expect the correct behaviour in the electrostatic case, and in the electromagnetic case when Bpar is unimportant. However, it's worth noting that no changes were made here to the electromagnetic field equations. That's okay in the case of apar because the adiabatic response carries no current, but in the case of bpar, the adiabatic response does carry pressure, which is not taken into account. If you are trying to simulate modes with a significant compressive component in the beta ~ 1 limit then this option will break.

    I have been thinking about this recently because I'm using adiabatic electron option for electromagnetic modes. It should be fairly simple to fix this if anyone else was interested in the feature.

  5. David Dickinson

    Hi @Michael Hardman

    Thank you for highlighting the caveat. I’d be keen to get this improvement in the code if possible as I’m interested in modes for which Bpar is important.

  6. David Dickinson

    @Joseph Parker I think this is the sort of thing we’d usually add to the check_parameters routine so that ingen would print a warning if appropriate. I think we also need to revisit the ingen messages to update them to reflect the changes in the svn commit you reference.

  7. Log in to comment