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

Unchained flux limiters + fast recycling #179

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7e52f2c
neutral_mixed: model improvements
bendudson Aug 9, 2023
0682b56
neutral_mixed: Missed factor of 2/3
bendudson Aug 9, 2023
a6ada66
Adding isotropic flux limiters
bendudson Aug 11, 2023
769ff8b
neutral_mixed: Fix and enable flux limit by default
bendudson Aug 11, 2023
05c0433
Merge branch 'master' into neutral-model
mikekryjak Aug 16, 2023
98c85a0
Add flags for individual neutral flux limiters
mikekryjak Aug 16, 2023
321a0a6
Allow suppression of momentum and heat flux factor
mikekryjak Aug 17, 2023
609b95c
Add option disabling neutral MFP=0.1m
mikekryjak Aug 29, 2023
ffb5368
Make maximum diffusion MFP a user input
mikekryjak Aug 30, 2023
2655106
neutral_mixed: Minor tidying of maximum_mfp
bendudson Sep 2, 2023
de9a013
Add fast recycling at target
mikekryjak Sep 3, 2023
799570d
Fix typo in fast recycling
mikekryjak Sep 4, 2023
6de14e3
Add sheath_bndry_simple heat flux to edge flux tallies
mikekryjak Sep 27, 2023
e9f224b
Fix flow cross-sectional area and clarify notation
mikekryjak Sep 27, 2023
5c42cfe
sheath_boundary_simple: Shifting from field aligned
mikekryjak Oct 1, 2023
fe6161c
Fix fast recycling neutral heat flow calc for target
mikekryjak Oct 1, 2023
1d120d5
Extend fast recycling to SOL and PFR recycling
mikekryjak Oct 1, 2023
b8910c9
Fix typo in SOL recycling
mikekryjak Oct 1, 2023
7b8e026
Fix omission of rec multiplier in fast recycling
mikekryjak Oct 1, 2023
69226af
Fix flow calculation to be actual flow and improve code readability
mikekryjak Oct 1, 2023
a231c27
Fix ion heat flow sign on ylow recycling
mikekryjak Oct 1, 2023
4a998a7
Add variables/options/dependencies for pump
mikekryjak Oct 2, 2023
0168065
Implement pump from master to help merge
mikekryjak Oct 2, 2023
e35c014
Merge branch 'master' into fast-recycling
mikekryjak Oct 2, 2023
b649da0
Fix typo in neutral pump
mikekryjak Oct 2, 2023
a1c19ff
Merge commit '2655106' into afn-unchained-frec
mikekryjak Oct 2, 2023
8700630
Allow separate conduction and convection alpha
mikekryjak Oct 2, 2023
58a8c84
Fix segmentation fault when using sheath_boundary
mikekryjak Oct 2, 2023
1a31a37
Merge branch 'fast-recycling' into afn-unchained-frec
mikekryjak Oct 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions include/neutral_mixed.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@ private:

Field3D Dnn; ///< Diffusion coefficient
Field3D DnnNn, DnnPn, DnnTn, DnnNVn; ///< Used for operators
Field3D eta_n; ///< Viscosity
Field3D kappa_n; ///< Thermal conductivity

bool sheath_ydown, sheath_yup;

BoutReal nn_floor; ///< Minimum Nn used when dividing NVn by Nn to get Vn.

BoutReal flux_limit; ///< Diffusive flux limit
BoutReal diffusion_limit; ///< Maximum diffusion coefficient
bool flux_limit; ///< Impose flux limiter?
bool particle_flux_limiter, heat_flux_limiter, momentum_flux_limiter; ///< Which limiters to impose
BoutReal maximum_mfp; ///< Maximum mean free path for diffusion. 0.1 by default, -1 is off.
BoutReal flux_limit_alpha, conductive_flux_limit_alpha, convective_flux_limit_alpha;
BoutReal flux_limit_gamma;
Field3D particle_flux_factor; ///< Particle flux scaling factor
Field3D momentum_flux_factor;
Field3D conductive_heat_flux_factor, convective_heat_flux_factor;

bool neutral_viscosity; ///< include viscosity?

Expand Down
11 changes: 7 additions & 4 deletions include/recycling.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ private:
/// Combination of recycling fraction and species change e.g h+ -> h2 results in 0.5 multiplier
BoutReal target_multiplier, sol_multiplier, pfr_multiplier, pump_multiplier;
BoutReal target_energy, sol_energy, pfr_energy; ///< Energy of recycled particle (normalised to Tnorm)
BoutReal target_fast_recycle_fraction, pfr_fast_recycle_fraction, sol_fast_recycle_fraction; ///< Fraction of ions undergoing fast reflection
BoutReal target_fast_recycle_energy_factor, sol_fast_recycle_energy_factor, pfr_fast_recycle_energy_factor; ///< Fraction of energy retained by fast recycled neutrals
};

std::vector<RecycleChannel> channels; // Recycling channels
Expand All @@ -56,16 +58,17 @@ private:
bool diagnose; ///< Save additional post-processing variables?

Field3D density_source, energy_source; ///< Recycling particle and energy sources for all locations
Field2D is_pump; ///< 1 = pump, 0 = no pump. Works only in SOL/PFR
Field3D energy_flow_ylow, energy_flow_xlow; ///< Cell edge fluxes used for calculating fast recycling energy source
Field3D particle_flow_xlow; ///< Radial wall particle fluxes for recycling calc. No need to get poloidal from here, it's calculated from sheath velocity

Field2D is_pump; ///< 1 = pump, 0 = no pump. Works only in SOL/PFR. Provided by user in grid file.

// Recycling particle and energy sources for the different sources of recycling
// Note that SOL, PFR and pump are not applicable to 1D
Field3D target_recycle_density_source, target_recycle_energy_source;
Field3D wall_recycle_density_source, wall_recycle_energy_source; ///< Recycling particle and energy sources for pfr + sol recycling
Field3D pump_recycle_density_source, pump_recycle_energy_source;
Field3D pump_density_source, pump_energy_source; ///< Recycling particle and energy sources for pump recycling

Field3D radial_particle_outflow, radial_energy_outflow; ///< Radial fluxes coming from evolve_density and evolve_pressure used in recycling calc

};

namespace {
Expand Down
Loading
Loading