Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible energy imbalance when changing sheath gamma #281

Open
mikekryjak opened this issue Dec 13, 2024 · 7 comments
Open

Possible energy imbalance when changing sheath gamma #281

mikekryjak opened this issue Dec 13, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@mikekryjak
Copy link
Collaborator

1D-recycling on master still suffers from an energy imbalance at about 8%. This disappears when you add argon radiation so that the case detaches, which probably means it's to do with the target boundary. This is odd because we did a lot of work to improve the balance in #248..... Either something has changed since then, or we didn't test it thoroughly enough, or something similar.

Looking closer reveals a significant ringing type pattern in conductive heat flux:
image
(note the total sources series is not correct in this plot as I think I'm missing the ion pressure source, but the rest should be OK)

And the temperature gradients flip near the target:
image

Ion momentum is very well behaved after our fixes but both ion and electron temperature is non-monotonic. There are no neutral sources that could cause this - the case is attached.

Thanks to Andrea for reporting this.

@mikekryjak mikekryjak added the bug Something isn't working label Dec 13, 2024
@bendudson
Copy link
Owner

Hey @mikekryjak ! Which input file is this for? When I checkout and run the latest 1D-recycling I get monotonically reducing temperatures but target temperature are much higher than your results (75eV rather than 20eV):

Git Version of Hermes: e3018b4111aeb8a2be7700ab09c56faa52cd846f

Temperatures in the last 10 cells, including the 2 boundary cells [in eV]:

Td+[-10:] = [78.5414611 , 78.08773253, 77.65698712, 77.25420284,
           76.88538143, 76.55905384, 76.29026544, 76.1201364 ,
           75.95038675,  0.        ]
 Te[-10:] = [49.49744714, 49.4908548 , 49.48468767, 49.47901779,
           49.47361688, 49.46869635, 49.46350028, 49.46211479,
           49.46072934,  0.        ]

@bendudson
Copy link
Owner

Energy imbalance of about 0.2%:

Total input power:     313.2444925223502 MW
  |- Ion heating:      156.6222462611751 MW
  |- Electron heating: 156.6222462611751 MW

Total power loss: 312.3414622494719 MW
  |- Ions:              163.27917088801752 MW
      |- Convection          116.6319896918349 MW
      |- Kinetic energy      54.04479527306608 MW
      |- Conduction          -7.397614076883459 MW
  |- Electrons:         136.54941304981872 MW
      |- Convection          75.86083594482982 MW
      |- Kinetic energy      0.014718081501379654 MW
      |- Conduction          60.67385902348752 MW
  |- Recycled neutrals: -2.147229204225567 MW
  |- Ionization:        14.658842597044742 MW
  |- Recombination:     0.001264918816395301 MW

@bendudson
Copy link
Owner

I wonder if the inverted T profiles could be due to having a sheath ion heat flux coefficient less than 3.5? If gamma_i < 3.5 then heat has to flow out of the sheath to compensate for the advected energy. Hence why ion conduction power loss is negative.

The example recycle-1D uses sheath_boundary, but what happens if you change to sheath_boundary_simple and set gamma_i to be 3.5 or greater?

@mikekryjak
Copy link
Collaborator Author

Hi @bendudson well deduced - it's actually the updated input file from #259. And yes, it has gamma_i set to 2.5 because this is what a new user would expect. Looks like that is the likely root cause!

We need to be able to have realistic ion gammas without issues like these. How do other codes deal with this?

@bendudson
Copy link
Owner

With the input file from #259 but the code in master, I get a balance of 0.9%:

Total input power:     313.2444925223502 MW
  |- Ion heating:      156.6222462611751 MW
  |- Electron heating: 156.6222462611751 MW

Total power loss: 316.3640968245869 MW
  |- Ions:              163.24661167015574 MW
      |- Convection          163.24661167015574 MW
      |- Kinetic energy      48.39715457625959 MW
      |- Conduction          -48.39715457625959 MW
  |- Electrons:         141.69774816539913 MW
      |- Convection          78.72100878766017 MW
      |- Kinetic energy      0.013180052989177451 MW
      |- Conduction          62.96355932474978 MW
  |- Recycled neutrals: -1.93904602630533 MW
  |- Ionization:        13.357693572538762 MW
  |- Recombination:     0.0010894427985555747 MW

but the ion temperature is now non-monotonic [in eV]:

Td+[-10:] = [116.68290631, 116.64131935, 116.64603101, 116.70273186,
           116.81863567, 117.00457783, 117.2782163 , 117.67759147,
           118.07832667,   0.        ]
 Te[-10:] = [56.86179496, 56.85745832, 56.85339367, 56.84963546,
           56.84607807, 56.8428583 , 56.83965068, 56.8377924 ,
           56.83593418,  0.        ]

Strangely the temperature is now even higher than the master branch input. Going to try with the code in #259.

@bendudson
Copy link
Owner

Which version are you running? The code in #259 doesn't compile (https://github.com/bendudson/hermes-3/actions/runs/12198082786/job/34029066789?pr=259) - something in sheath_boundary_simple. I'll have a look; maybe a merge gone sideways

@mikekryjak
Copy link
Collaborator Author

Hi @bendudson, I was running master. #259 was meant to just be an update of the examples, but I think there could be a merge problem...
It's weird that you don't get the imbalance. I'll send you the case separately.

@mikekryjak mikekryjak changed the title Energy balance issues (again) Possible energy imbalance when changing sheath gamma Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants