|
GridFire v0.7.1_rc2
General Purpose Nuclear Network
|
A NetworkPolicy for building reaction networks suitable for low-mass main-sequence stars. More...
#include <stellar_policy.h>
Public Member Functions | |
| MainSequencePolicy (const fourdst::composition::Composition &composition) | |
| Constructs the policy from an existing composition object. | |
| MainSequencePolicy (std::vector< fourdst::atomic::Species > seed_species, const std::vector< double > &mass_fractions) | |
| Constructs the policy from a list of species and their mass fractions. | |
| std::string | name () const override |
| Returns the name of the policy. | |
| const std::set< fourdst::atomic::Species > & | get_seed_species () const override |
| Returns the set of seed species required by this policy. | |
| const reaction::ReactionSet & | get_seed_reactions () const override |
| Returns the set of seed reactions required by this policy (from the PP and CNO chains). | |
| engine::DynamicEngine & | construct () override |
| Constructs and returns the complete, multi-layered dynamic engine. | |
| NetworkPolicyStatus | get_status () const override |
| Gets the current status of the policy. | |
| const std::vector< std::unique_ptr< engine::DynamicEngine > > & | get_engine_stack () const override |
| std::vector< engine::EngineTypes > | get_engine_types_stack () const override |
| const std::unique_ptr< partition::PartitionFunction > & | get_partition_function () const override |
Public Member Functions inherited from gridfire::policy::NetworkPolicy | |
| virtual | ~NetworkPolicy ()=default |
Private Member Functions | |
| NetworkPolicyStatus | check_status () const |
Static Private Member Functions | |
| static std::unique_ptr< partition::PartitionFunction > | build_partition_function () |
Private Attributes | |
| std::set< fourdst::atomic::Species > | m_seed_species |
| The set of seed species required by this policy. These are H-1, He-3, He-4, C-12, N-14, O-16, Ne-20, Mg-24. | |
| std::unique_ptr< ReactionChainPolicy > | m_reaction_policy = std::make_unique<MainSequenceReactionChainPolicy>() |
| The composed reaction chain policy (PP-chain + CNO-cycle). | |
| fourdst::composition::Composition | m_initializing_composition |
| The initial composition used to build the network. | |
| std::unique_ptr< partition::PartitionFunction > | m_partition_function |
| The partition function used in network construction. | |
| std::vector< std::unique_ptr< engine::DynamicEngine > > | m_network_stack |
| The stack of dynamic engines constructed by the policy. | |
| NetworkPolicyStatus | m_status = NetworkPolicyStatus::UNINITIALIZED |
| The current status of the policy. | |
A NetworkPolicy for building reaction networks suitable for low-mass main-sequence stars.
This policy ensures that a constructed network contains all necessary species and reactions for modeling the core hydrogen burning phase in low-mass stars, primarily the PP-chain and the CNO-cycle.
The construct() method builds a stack of engine views (GraphEngine -> MultiscalePartitioningEngineView -> AdaptiveEngineView) to provide a dynamically adjusting, performance-optimized reaction network.
This policy requires the following seed species:
This policy composes the ProtonProtonChainPolicy and CNOChainPolicy to define the required reactions.
|
explicit |
Constructs the policy from an existing composition object.
| composition | The initial composition, which must contain all seed species required by the policy. |
| exceptions::MissingSeedSpeciesError | if the provided composition is missing a required species. |
|
explicit |
Constructs the policy from a list of species and their mass fractions.
| seed_species | A vector of atomic species. |
| mass_fractions | A vector of corresponding mass fractions. |
| exceptions::MissingSeedSpeciesError | if the provided species list is missing a required seed species. |
| fourdst::composition::exceptions::CompositionNotFinalizedError | if the internal composition fails to finalize. |
|
inlinestaticprivate |
|
inlineprivate |
|
overridevirtual |
Constructs and returns the complete, multi-layered dynamic engine.
This method builds the full network engine stack:
GraphEngine is created with the initial composition. This is constructed three layers deep which is sufficient to capture all required reactions. Further a composite ground state and Rauscher Thielemann partition function is used.MultiscalePartitioningEngineView is layered on top for performance optimization. This will put some species into equilibrium groups based on their reaction timescales.AdaptiveEngineView is added as the final layer to dynamically cull reaction pathways based on molar reaction flows.After construction, it verifies that the resulting network meets the policy's requirements.
AdaptiveEngineView.| exceptions::MissingKeyReactionError | if the final network is missing a required reaction. |
| exceptions::MissingSeedSpeciesError | if the final network is missing a required species. |
| exceptions::PolicyError | on other verification failures. |
Implements gridfire::policy::NetworkPolicy.
|
overridevirtual |
Implements gridfire::policy::NetworkPolicy.
|
overridevirtual |
Implements gridfire::policy::NetworkPolicy.
|
overridevirtual |
Implements gridfire::policy::NetworkPolicy.
|
inlineoverridevirtual |
Returns the set of seed reactions required by this policy (from the PP and CNO chains).
Implements gridfire::policy::NetworkPolicy.
|
inlineoverridevirtual |
Returns the set of seed species required by this policy.
Implements gridfire::policy::NetworkPolicy.
|
inlineoverridevirtual |
Gets the current status of the policy.
Implements gridfire::policy::NetworkPolicy.
|
inlineoverridevirtual |
Returns the name of the policy.
Implements gridfire::policy::NetworkPolicy.
|
private |
The initial composition used to build the network.
|
private |
The stack of dynamic engines constructed by the policy.
|
private |
The partition function used in network construction.
|
private |
The composed reaction chain policy (PP-chain + CNO-cycle).
|
private |
The set of seed species required by this policy. These are H-1, He-3, He-4, C-12, N-14, O-16, Ne-20, Mg-24.
|
private |
The current status of the policy.