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

Add variable Np support to the fix emit/surf command #409

Merged
merged 2 commits into from Jun 2, 2023

Conversation

sjplimp
Copy link
Contributor

@sjplimp sjplimp commented May 1, 2023

Purpose

Allow the keyword/value n = Np to be set with a variable, in the fix emit/surf command. This allows a time-dependent
number of emitted particles (per emission step) to be specified.

Also changed the way the keyword/value n = constant setting is interpreted. Previously, exactly Np particles
were emitted, with an equal fraction assigned to each grid cell/surface element pair. Now this calculation is weighted by
the surface area of each grid cell/surface element pair, to give a more uniform distribution of particle emission across the
area of entire surface elements. The same method is used for a variable value of Np on each emission step.
This also means that random numbers are used to decide whether an extra particle is emitted or not for each grid cell/surface element pair. So the total # of emitted particles will be Np on average (statistically), but not necessarily exactly Np. This is also
the case when Np is specified as zero, and the mixture properties and fnum determine the statistical number of emitted particles.

Author(s)

Steve

Backward Compatibility

As explained above, when using a specified value of Np with the n keyword, the number of particles emitted on a particular timestep may now not be be exactly Np.

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 sjplimp requested a review from stanmoore1 May 1, 2023 20:51
@stanmoore1 stanmoore1 self-assigned this Jun 2, 2023
@stanmoore1 stanmoore1 added the enhancement New feature or request label Jun 2, 2023
@stanmoore1 stanmoore1 merged commit 2bdafd0 into master Jun 2, 2023
4 checks passed
@stanmoore1 stanmoore1 deleted the fix-emit-surf-variable branch June 2, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants