-
Notifications
You must be signed in to change notification settings - Fork 5
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
External sources and settable recycling fraction #129
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
johnomotani
force-pushed
the
restart-interpolation
branch
from
September 12, 2023 08:21
bd6a1f9
to
2b1a260
Compare
johnomotani
force-pushed
the
external-sources-recycling
branch
from
September 12, 2023 08:21
ff58df5
to
8a8e94b
Compare
johnomotani
force-pushed
the
restart-interpolation
branch
from
September 12, 2023 11:05
2b1a260
to
b1f88ea
Compare
johnomotani
force-pushed
the
external-sources-recycling
branch
from
September 12, 2023 11:06
8a8e94b
to
e34aeb6
Compare
johnomotani
force-pushed
the
restart-interpolation
branch
from
September 12, 2023 20:49
b1f88ea
to
b2d9866
Compare
johnomotani
force-pushed
the
external-sources-recycling
branch
from
September 12, 2023 20:50
e34aeb6
to
c658620
Compare
johnomotani
force-pushed
the
restart-interpolation
branch
from
September 13, 2023 09:13
b2d9866
to
4270457
Compare
johnomotani
force-pushed
the
external-sources-recycling
branch
from
September 13, 2023 09:15
c658620
to
41c02af
Compare
johnomotani
force-pushed
the
restart-interpolation
branch
from
September 13, 2023 09:19
4270457
to
cd37b9f
Compare
johnomotani
force-pushed
the
external-sources-recycling
branch
from
September 13, 2023 09:20
41c02af
to
ecfff8d
Compare
johnomotani
force-pushed
the
restart-interpolation
branch
3 times, most recently
from
October 31, 2023 15:58
5b2f40e
to
f13e3e0
Compare
johnomotani
force-pushed
the
external-sources-recycling
branch
from
November 2, 2023 18:56
ecfff8d
to
58aa424
Compare
Add an input option `recycling_fraction` that can be set to a value between 0 and 1 to control the fraction of the incoming ion flux at the wall boundaries that is recycled as neutrals.
Source terms with a Maxwellian velocity profile (whose temperature is an input option) with various options for the spatial profiles (currently constant or Gaussian - with a tunable width - in each of the r- or z-directions). Includes an option for a PI controller for density. Controller sets amplitude of external source term to push the density (either full profile or the midpoint value) to a fixed value.
Used when `controller_type = "recycling"` in the `neutral_source` section.
Otherwise, if the initial temperature was decreased, the notch could be about as wide as the distribution function, which would make things weird.
...instead of constant_ionization_source. Also add moment-kinetic versions of test.
The earlier-initialised values are only used during initialisation to calculate some advection speeds whose sign is then checked to set boundary conditions, so the differences caused by this error were small, but previously (for evolving-upar and evolving-ppar cases) uninitialised arrays were used, which could change randomly.
Similar to 123bcae, but for the neutrals.
Putting these in separate files means both show up in the contents list in the left sidebar. This is better because it means that all modules show up directly (previously `makie_post_processing` was a subsection of the 'Post processing' page, which would make it harder to find if you expected a direct link to the module API documentation). Now the 'API' section of the 'Post processing' page is just a link to the page with the `makie_post_processing` API docs.
The sorting of the pages in the left sidebar of the docs is done by filename, not page title (although the page titles are displayed). To make this less confusing, rename some files to correspond more closely to the page titles, so that the sidebar looks like it's sorted by page title. Also prefix all API docs files with 'zz_' so that they get displayed after the main docs pages.
…setting Previously the length of the grid was used. Making width settable allows source profiles that are exactly zero at the targets. [skip ci]
If no grid point exists, the midpoint density controller would fail somehow. Check for this and throw a sensible error if it happens.
johnomotani
force-pushed
the
external-sources-recycling
branch
from
November 14, 2023 09:36
58aa424
to
0a31140
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Provide external (Maxwellian) sources of plasma or neutrals. Controlled by the
[ion_source]
and[neutral_source]
sections in the input file. The sources can be given fixed (in time), spatially varying amplitudes, or the amplitude can be set by a PI controller that tries to keep the density fixed (either to a profile or just the midpoint value at z=0, r=r_min), or (for the neutrals) the source can be set so that its total (integrated over the box) is equal to a fraction of the ion flux to the targets.Recycling fraction can be set by the
recycling_fraction
input option to any value greater than 0 and less than or equal to 1, instead of always being 1 exactly.Todo:
wall_bc_tests.jl
but with sources and recycling fraction less than 1harrisonthompson.jl
test to moment-kinetic modes - this should be possible using the new source-term implementation