GridFire v0.7.6rc4.0 General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gridfire::screening::WeakScreeningModel Class Referencefinal

Implements the weak screening model based on the Debye-Hückel approximation. More...

`#include <screening_weak.h>`

Inheritance diagram for gridfire::screening::WeakScreeningModel:
[legend]
Collaboration diagram for gridfire::screening::WeakScreeningModel:
[legend]

## Public Member Functions
std::vector< double > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override
| Calculates weak screening factors for a set of reactions.
std::vector< CppAD::AD< double > > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, CppAD::AD< double > T9, CppAD::AD< double > rho) const override
| Calculates weak screening factors using CppAD types.
Public Member Functions inherited from gridfire::screening::ScreeningModel
virtual | ~ScreeningModel ()=default
| Virtual destructor.

## Private Member Functions
template<IsArithmeticOrAD T>
std::vector< T > | calculateFactors_impl (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, T T9, T rho) const
| Template implementation for calculating weak screening factors.

## Private Attributes
quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log")
| Logger instance for recording trace and debug information.

## Additional Inherited Members
Public Types inherited from gridfire::screening::ScreeningModel
using | ADDouble = CppAD::AD<double>
| Alias for CppAD Automatic Differentiation type for double precision.

## Detailed Description

Implements the weak screening model based on the Debye-Hückel approximation.

This class provides a concrete implementation of the `ScreeningModel` interface for the weak screening regime, following the formulation of Salpeter (1954). This approach applies the Debye-Hückel theory to model the electrostatic shielding of nuclei in a plasma. It is applicable to non-degenerate, non-relativistic plasmas where thermal energy dominates the electrostatic potential energy.

## Member Function Documentation

## ◆ calculateFactors_impl()

template<IsArithmeticOrAD T>

std::vector< T > gridfire::screening::WeakScreeningModel::calculateFactors_impl | ( | const reaction::ReactionSet & | reactions,
|  | const std::vector< fourdst::atomic::Species > & | species,
|  | const std::vector< T > & | Y,
|  | T | T9,
|  | T | rho ) const
| nodiscard private

Template implementation for calculating weak screening factors.

Core implementation of the weak screening calculation (Debye-Hückel model).

This private helper function contains the core logic for calculating weak screening factors. It is templated to handle both `double` and `CppAD::AD<double>` numeric types, avoiding code duplication.

Template Parameters

  T | The numeric type, either `double` or `CppAD::AD<double>`.

Parameters

  reactions | The set of reactions.
  species | A vector of all species in the network.
  Y | The composition object with current molar abundances.
  T9 | The temperature in 10^9 K.
  rho | The density in g/cm^3.

Returns
  A vector of screening factors of type `T`.

This function calculates the screening factor `exp(H_12)` for each reaction, based on the Debye-Hückel approximation as formulated by Salpeter (1954).

Template Parameters

  T | The numeric type (`double` or `CppAD::AD<double>`).

Parameters

  reactions | The set of reactions to be screened.
  species | The list of all species in the network.
  Y | The composition object providing current molar abundances.
  T9 | The temperature in 10^9 K.
  rho | The density in g/cm^3.

Returns
  A vector of screening factors, one for each reaction.

Algorithm

1. Low-Temperature Cutoff: If T9 is below a small threshold (1e-9), screening is effectively turned off to prevent numerical instability.
2. Zeta Factor (ζ): A composition-dependent term is calculated: `ζ = ∑(Z_i² + Z_i) * Y_i`, where Z_i is the charge and Y_i is the molar abundance of species i.
3. Prefactor: A key prefactor is computed: `prefactor = 0.188 * sqrt(ρ / T₇³) * sqrt(ζ)`, where T₇ is the temperature in units of 10^7 K.
4. Screening Term (H_12): For each reaction, the term H_12 is calculated:
   - For a two-body reaction (reactants Z₁ and Z₂): `H_12 = prefactor * Z₁ * Z₂`.
   - For the triple-alpha reaction (3 * He4): `H_12 = 3 * (prefactor * Z_α * Z_α)`.
   - For one-body reactions (decays), H_12 is 0, so the factor is 1.
5. Capping: The value of H_12 is capped at 2.0 to prevent excessively large and unphysical screening factors (exp(2) ≈ 7.4).
6. Final Factor: The screening factor for the reaction is `exp(H_12)`.

## ◆ calculateScreeningFactors() [1/2]

std::vector< ADDouble > gridfire::screening::WeakScreeningModel::calculateScreeningFactors | ( | const reaction::ReactionSet & | reactions,
|  | const std::vector< fourdst::atomic::Species > & | species,
|  | const std::vector< CppAD::AD< double > > & | Y,
|  | CppAD::AD< double > | T9,
|  | CppAD::AD< double > | rho ) const
| nodiscard override virtual

Calculates weak screening factors using CppAD types.

This is the automatic differentiation-compatible version of the method. It allows the derivatives of the screening factors to be computed with respect to plasma conditions.

Parameters

  reactions | The set of logical reactions in the network.
  species | A vector of all atomic species involved in the network.
  Y | The composition object giving the current molar abundances.
  T9 | The temperature as an AD type.
  rho | The plasma density as an AD type.

Returns
  A vector of screening factors as AD types.

Implements gridfire::screening::ScreeningModel.

## ◆ calculateScreeningFactors() [2/2]

std::vector< double > gridfire::screening::WeakScreeningModel::calculateScreeningFactors | ( | const reaction::ReactionSet & | reactions,
|  | const std::vector< fourdst::atomic::Species > & | species,
|  | const std::vector< double > & | Y,
|  | double | T9,
|  | double | rho ) const
| nodiscard override virtual

Calculates weak screening factors for a set of reactions.

This method computes the screening enhancement factor for each reaction based on the Salpeter (1954) formula.

Parameters

  reactions | The set of logical reactions in the network.
  species | A vector of all atomic species involved in the network.
  Y | The composition object giving the current molar abundances.
  T9 | The temperature in units of 10^9 K.
  rho | The plasma density in g/cm^3.

Returns
  A vector of screening factors (dimensionless), one for each reaction.

Usage

WeakScreeningModel weak_model;
// ... (initialize reactions, species, Y, T9, rho)
std::vector<double> factors = weak_model.calculateScreeningFactors(
reactions, species, Y, T9, rho
);
gridfire::screening::WeakScreeningModel
Implements the weak screening model based on the Debye-Hückel approximation.
Definition screening_weak.h:27
gridfire::screening::WeakScreeningModel::calculateScreeningFactors
std::vector< double > calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override
Calculates weak screening factors for a set of reactions.
Definition screening_weak.cpp:22

Implements gridfire::screening::ScreeningModel.

## Member Data Documentation

## ◆ m_logger

quill::Logger* gridfire::screening::WeakScreeningModel::m_logger = fourdst::logging::LogManager::getInstance().getLogger("log")
| private

Logger instance for recording trace and debug information.

The documentation for this class was generated from the following files:

- src/include/gridfire/screening/screening_weak.h
- src/lib/screening/screening_weak.cpp