Feature Request for Adiabatic ions
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)
-
-
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.
-
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
-
reporter Fantastic thanks! Will double check that does what’s expected
-
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.
-
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.
-
Thanks for the issue @Ian Abel . For reference, the actual commit was from the svn days: https://bitbucket.org/gyrokinetics/gs2/commits/9761f3ca970743c99bfcc48bf8b25ecc3c320d57 so there was no pull request about it.
Thanks Michael. I’d also like to see your correction for
bpar
included. Though in the meantime, should we write an error/warning for cases that would break? Do we do checking indist_fn::read_parameters
, say? -
@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. - Log in to comment
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.