feat(solver): added CVODE solver from SUNDIALS
This commit is contained in:
@@ -385,7 +385,7 @@ namespace gridfire {
|
||||
for (const auto& reaction : fullReactionSet) {
|
||||
const double flow = m_baseEngine.calculateMolarReactionFlow(*reaction, out_Y_Full, T9, rho);
|
||||
reactionFlows.push_back({reaction.get(), flow});
|
||||
LOG_TRACE_L1(m_logger, "Reaction '{}' has flow rate: {:0.3E} [mol/s/g]", reaction.id(), flow);
|
||||
LOG_TRACE_L1(m_logger, "Reaction '{}' has flow rate: {:0.3E} [mol/s/g]", reaction->id(), flow);
|
||||
}
|
||||
return reactionFlows;
|
||||
}
|
||||
@@ -423,7 +423,7 @@ namespace gridfire {
|
||||
if (!reachable.contains(product)) {
|
||||
reachable.insert(product);
|
||||
new_species_found_in_pass = true;
|
||||
LOG_TRACE_L2(m_logger, "Network Connectivity Analysis: Species '{}' is reachable via reaction '{}'.", product.name(), reaction.id());
|
||||
LOG_TRACE_L2(m_logger, "Network Connectivity Analysis: Species '{}' is reachable via reaction '{}'.", product.name(), reaction->id());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace gridfire {
|
||||
LOG_TRACE_L3(m_logger, "Active reactions: {}", [this]() -> std::string {
|
||||
std::string result;
|
||||
for (const auto& reaction : m_activeReactions) {
|
||||
result += std::string(reaction.id()) + ", ";
|
||||
result += std::string(reaction->id()) + ", ";
|
||||
}
|
||||
if (!result.empty()) {
|
||||
result.pop_back(); // Remove last space
|
||||
|
||||
@@ -1020,7 +1020,7 @@ namespace gridfire {
|
||||
LOG_TRACE_L3(
|
||||
m_logger,
|
||||
"Reaction {} is internal to the group containing {} and contributes to internal flux by {}",
|
||||
reaction.id(),
|
||||
reaction->id(),
|
||||
[&]() -> std::string {
|
||||
std::stringstream ss;
|
||||
int count = 0;
|
||||
@@ -1040,7 +1040,7 @@ namespace gridfire {
|
||||
LOG_TRACE_L3(
|
||||
m_logger,
|
||||
"Reaction {} is external to the group containing {} and contributes to external flux by {}",
|
||||
reaction.id(),
|
||||
reaction->id(),
|
||||
[&]() -> std::string {
|
||||
std::stringstream ss;
|
||||
int count = 0;
|
||||
@@ -1406,13 +1406,13 @@ namespace gridfire {
|
||||
for (const auto& reactant : reaction->reactants()) {
|
||||
if (std::ranges::find(pool, m_baseEngine.getSpeciesIndex(reactant)) == pool.end()) {
|
||||
has_external_reactant = true;
|
||||
LOG_TRACE_L3(m_logger, "Found external reactant {} in reaction {} for species {}.", reactant.name(), reaction.id(), ash.name());
|
||||
LOG_TRACE_L3(m_logger, "Found external reactant {} in reaction {} for species {}.", reactant.name(), reaction->id(), ash.name());
|
||||
break; // Found an external reactant, no need to check further
|
||||
}
|
||||
}
|
||||
if (has_external_reactant) {
|
||||
double flow = std::abs(m_baseEngine.calculateMolarReactionFlow(*reaction, Y, T9, rho));
|
||||
LOG_TRACE_L3(m_logger, "Found bridge reaction {} with flow {} for species {}.", reaction.id(), flow, ash.name());
|
||||
LOG_TRACE_L3(m_logger, "Found bridge reaction {} with flow {} for species {}.", reaction->id(), flow, ash.name());
|
||||
bridge_reactions.emplace_back(reaction.get(), flow);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user