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

External sources and settable recycling fraction #129

Merged
merged 17 commits into from
Nov 14, 2023

Conversation

johnomotani
Copy link
Collaborator

@johnomotani johnomotani commented Sep 11, 2023

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:

  • document inputs for external sources in docs
  • document recycling fraction in docs
  • test case similar to wall_bc_tests.jl but with sources and recycling fraction less than 1
  • extend harrisonthompson.jl test to moment-kinetic modes - this should be possible using the new source-term implementation

@johnomotani johnomotani added the enhancement New feature or request label Sep 11, 2023
@johnomotani johnomotani force-pushed the external-sources-recycling branch from ff58df5 to 8a8e94b Compare September 12, 2023 08:21
@johnomotani johnomotani force-pushed the external-sources-recycling branch from 8a8e94b to e34aeb6 Compare September 12, 2023 11:06
@johnomotani johnomotani force-pushed the external-sources-recycling branch from e34aeb6 to c658620 Compare September 12, 2023 20:50
@johnomotani johnomotani force-pushed the external-sources-recycling branch from c658620 to 41c02af Compare September 13, 2023 09:15
@johnomotani johnomotani force-pushed the external-sources-recycling branch from 41c02af to ecfff8d Compare September 13, 2023 09:20
@johnomotani johnomotani force-pushed the restart-interpolation branch 3 times, most recently from 5b2f40e to f13e3e0 Compare October 31, 2023 15:58
@johnomotani johnomotani force-pushed the external-sources-recycling branch from ecfff8d to 58aa424 Compare November 2, 2023 18:56
Base automatically changed from restart-interpolation to master November 6, 2023 12:12
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.
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]
@johnomotani johnomotani force-pushed the external-sources-recycling branch from 58aa424 to 0a31140 Compare November 14, 2023 09:36
@johnomotani johnomotani merged commit c066ad6 into master Nov 14, 2023
5 of 21 checks passed
@johnomotani johnomotani deleted the external-sources-recycling branch November 14, 2023 10:49
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.

1 participant