GridFire 0.0.1a
General Purpose Nuclear Network
Loading...
Searching...
No Matches
gridfire::screening Namespace Reference

Classes

class  BareScreeningModel
 A screening model that applies no screening effect. More...
 
class  ScreeningModel
 An abstract base class for plasma screening models. More...
 
class  WeakScreeningModel
 Implements the weak screening model based on the Debye-Hückel approximation. More...
 

Typedefs

using ADDouble = CppAD::AD<double>
 

Enumerations

enum class  ScreeningType { BARE , WEAK }
 Enumerates the available plasma screening models. More...
 

Functions

std::unique_ptr< ScreeningModelselectScreeningModel (ScreeningType type)
 A factory function to select and create a screening model.
 

Typedef Documentation

◆ ADDouble

typedef CppAD::AD< double > gridfire::screening::ADDouble = CppAD::AD<double>

Definition at line 11 of file screening_bare.cpp.

Enumeration Type Documentation

◆ ScreeningType

Enumerates the available plasma screening models.

This enum provides a set of identifiers for the different screening prescriptions that can be used in the reaction rate calculations.

Enumerator
BARE 

No screening applied. The screening factor is always 1.0.

WEAK 

Weak screening model (Salpeter, 1954).

This model is suitable for non-degenerate, non-relativistic plasmas where the electrostatic potential energy between ions is small compared to their thermal kinetic energy. The screening enhancement factor is calculated as exp(H_12).

Algorithm

  1. A composition-dependent term, ζ = ∑(Z_i^2 + Z_i) * Y_i, is calculated, where Z_i is the charge and Y_i is the molar abundance of each species.
  2. A prefactor is computed: prefactor = 0.188 * sqrt(ρ / T₇³) * sqrt(ζ), where ρ is the density and T₇ is the temperature in 10^7 K.
  3. For a reaction between two nuclei with charges Z₁ and Z₂, the enhancement term is H_12 = prefactor * Z₁ * Z₂.
  4. The final screening factor is exp(H_12). A special calculation is performed for the triple-alpha reaction.

Definition at line 15 of file screening_types.h.

Function Documentation

◆ selectScreeningModel()

std::unique_ptr< ScreeningModel > gridfire::screening::selectScreeningModel ( ScreeningType type)

A factory function to select and create a screening model.

This function returns a std::unique_ptr to a concrete implementation of the ScreeningModel abstract base class, based on the specified ScreeningType. This allows for easy switching between different screening prescriptions at runtime.

Parameters
typeThe ScreeningType enum value specifying which model to create.
Returns
A std::unique_ptr<ScreeningModel> holding an instance of the requested screening model.

Algorithm The function uses a switch statement to determine which concrete model to instantiate. If the provided type does not match a known case, it defaults to creating a BareScreeningModel to ensure safe behavior.

Post-conditions

Usage

// Select the weak screening model
// Use the model to calculate screening factors
// (assuming other parameters are initialized)
std::vector<double> factors = screening_model->calculateScreeningFactors(
reactions, species, Y, T9, rho
);
std::unique_ptr< ScreeningModel > selectScreeningModel(ScreeningType type)
A factory function to select and create a screening model.
@ WEAK
Weak screening model (Salpeter, 1954).

Definition at line 9 of file screening_types.cpp.