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

use average species omega in collisions #10

Merged
merged 1 commit into from Sep 4, 2018

Conversation

Projects
None yet
4 participants
@sjplimp
Copy link
Contributor

sjplimp commented Aug 24, 2018

Purpose

Some reaction bug fixes, in particular to use the omega value averaged over species
in the reaction.

Author(s)

Zhi-Hui Wang (University of Chinese Academy of Sciences (UCAS))
and Israel Borges Sebastiao (Purdue University) reported these bugs
and suggested changes.

Backward Compatibility

Could change outputs for collisional flows.

Implementation Notes

Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in SPARTA are affected

Post Submission Checklist

Please check the fields below as they are completed

  • The feature or features in this pull request is complete
  • Suitable new documentation files and/or updates to the existing docs are included
  • One or more example input decks are included
  • The source code follows the SPARTA formatting guidelines

Further Information, Files, and Links

Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)

@sjplimp

This comment has been minimized.

Copy link
Contributor

sjplimp commented Aug 24, 2018

@stanmoore1 ditto on this one, received files from Michael

@aborner1

This comment has been minimized.

Copy link

aborner1 commented Aug 27, 2018

@sjplimp Should the rotrel and vibrel functions also be modified to use the average species omega?

@sjplimp

This comment has been minimized.

Copy link
Contributor

sjplimp commented Aug 28, 2018

this is a good Q for Michael - I will ask him.

@stanmoore1 stanmoore1 merged commit 3ae288a into master Sep 4, 2018

@stanmoore1 stanmoore1 deleted the reaction-ave branch Sep 4, 2018


double c1 = MY_PIS*epsilon*r->coeff[2]/(2.0*sigma) *
sqrt(mr/(2.0*update->boltz*tref)) *
pow(tref,1.0-omega)/pow(update->boltz,r->coeff[3]-1.0+omega) *
tgamma(z+2.5-omega)/tgamma(z+r->coeff[3]+1.5);
tgamma(z+2.5-omega) / MAX(1.0e-6,tgamma(z+r->coeff[3]+1.5));

This comment has been minimized.

@zhangchonglin

zhangchonglin Dec 22, 2018

I am testing a simple flow over 2D cylinder case with 11 species (including both neutral and ionization reactions with ambipolar approximation).

When I use any version after this commit, at around time step 6544, the number of test collisions will suddenly increase by 10-50 times, and the number of actual collisions will suddenly increase by at least 10 to 500 times, after that time step. This is happening when the total number of particles in the simulation does not change too much.

I attached my test case, and 2 log files corresponding to results from 2 commits:
(1) log file: sim_log.2b038d8 corresponds to commit 2b038d8, this is after the above modification. At step 6544, the number of test collisions and the number of actual collisions will suddenly increase. The flow field result seems wrong in this case.
(2) log file: sim_log.45e17cd corresponds to commit 45e17cd, just before the above modification. The number of test and collisions in each time step stays reasonable, relative to the total number of particles present.

Could you please take a look and see if there is any problem introduced with this modification.
2d_cylinder_11sp.zip

This comment has been minimized.

@zhangchonglin

zhangchonglin Dec 22, 2018

It seems to be due to the modification of the above line of code:
from: tgamma(z+2.5-omega)/tgamma(z+r->coeff[3]+1.5);
to: tgamma(z+2.5-omega) / MAX(1.0e-6,tgamma(z+r->coeff[3]+1.5));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment