Add variable Np support to the fix emit/surf command #409
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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)