www.mooseframework.org
AddCoupledEqSpeciesAction.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "Action.h"
13 
14 #include "libmesh/vector_value.h"
15 
17 
18 template <>
20 
21 class AddCoupledEqSpeciesAction : public Action
22 {
23 public:
24  AddCoupledEqSpeciesAction(const InputParameters & params);
25 
26  virtual void act() override;
27 
28 protected:
30  const std::vector<NonlinearVariableName> _primary_species;
32  const std::vector<AuxVariableName> _secondary_species;
34  std::vector<std::vector<Real>> _stos;
36  std::vector<std::vector<Real>> _weights;
38  std::vector<Real> _eq_const;
40  std::vector<VariableName> _eq_species;
42  std::set<std::string> _aux_species;
44  std::vector<std::vector<bool>> _primary_participation;
46  std::vector<std::vector<Real>> _sto_u;
48  std::vector<std::vector<std::vector<Real>>> _sto_v;
50  std::vector<std::vector<std::vector<VariableName>>> _coupled_v;
52  std::vector<std::vector<VariableName>> _primary_species_involved;
54  std::string _input_reactions;
56  std::vector<std::string> _reactions;
58  unsigned int _num_reactions;
60  const std::vector<VariableName> _pressure_var;
62  const RealVectorValue _gravity;
63 };
64 
validParams< AddCoupledEqSpeciesAction >
InputParameters validParams< AddCoupledEqSpeciesAction >()
Definition: AddCoupledEqSpeciesAction.C:27
AddCoupledEqSpeciesAction
Definition: AddCoupledEqSpeciesAction.h:21
AddCoupledEqSpeciesAction::_secondary_species
const std::vector< AuxVariableName > _secondary_species
Secondary species added as AuxVariables.
Definition: AddCoupledEqSpeciesAction.h:32
AddCoupledEqSpeciesAction::act
virtual void act() override
Definition: AddCoupledEqSpeciesAction.C:197
AddCoupledEqSpeciesAction::_eq_const
std::vector< Real > _eq_const
Equilibrium constants for each reaction.
Definition: AddCoupledEqSpeciesAction.h:38
AddCoupledEqSpeciesAction::_aux_species
std::set< std::string > _aux_species
Set of auxillary species.
Definition: AddCoupledEqSpeciesAction.h:42
AddCoupledEqSpeciesAction::_sto_v
std::vector< std::vector< std::vector< Real > > > _sto_v
Stoichiometric coefficients of coupled primary variables in each reaction.
Definition: AddCoupledEqSpeciesAction.h:48
AddCoupledEqSpeciesAction::_sto_u
std::vector< std::vector< Real > > _sto_u
Stoichiometric coefficients of primary variables in each reaction.
Definition: AddCoupledEqSpeciesAction.h:46
AddCoupledEqSpeciesAction::AddCoupledEqSpeciesAction
AddCoupledEqSpeciesAction(const InputParameters &params)
Definition: AddCoupledEqSpeciesAction.C:42
AddCoupledEqSpeciesAction::_coupled_v
std::vector< std::vector< std::vector< VariableName > > > _coupled_v
Coupled primary species for each reaction.
Definition: AddCoupledEqSpeciesAction.h:50
AddCoupledEqSpeciesAction::_primary_species_involved
std::vector< std::vector< VariableName > > _primary_species_involved
Primary species involved in the ith equilibrium reaction.
Definition: AddCoupledEqSpeciesAction.h:52
AddCoupledEqSpeciesAction::_eq_species
std::vector< VariableName > _eq_species
Equilibrium species.
Definition: AddCoupledEqSpeciesAction.h:40
AddCoupledEqSpeciesAction::_gravity
const RealVectorValue _gravity
Gravity (default is (0, 0, 0))
Definition: AddCoupledEqSpeciesAction.h:62
AddCoupledEqSpeciesAction::_primary_participation
std::vector< std::vector< bool > > _primary_participation
Participation of primary species in each reaction.
Definition: AddCoupledEqSpeciesAction.h:44
AddCoupledEqSpeciesAction::_weights
std::vector< std::vector< Real > > _weights
Weight of each primary species in each reaction.
Definition: AddCoupledEqSpeciesAction.h:36
AddCoupledEqSpeciesAction::_num_reactions
unsigned int _num_reactions
Number of reactions.
Definition: AddCoupledEqSpeciesAction.h:58
AddCoupledEqSpeciesAction::_pressure_var
const std::vector< VariableName > _pressure_var
Pressure variable.
Definition: AddCoupledEqSpeciesAction.h:60
AddCoupledEqSpeciesAction::_reactions
std::vector< std::string > _reactions
Vector of parsed reactions.
Definition: AddCoupledEqSpeciesAction.h:56
AddCoupledEqSpeciesAction::_primary_species
const std::vector< NonlinearVariableName > _primary_species
Basis set of primary species.
Definition: AddCoupledEqSpeciesAction.h:30
AddCoupledEqSpeciesAction::_input_reactions
std::string _input_reactions
Reaction network read from input file.
Definition: AddCoupledEqSpeciesAction.h:54
AddCoupledEqSpeciesAction::_stos
std::vector< std::vector< Real > > _stos
Stoichiometric coefficients for each primary species in each reaction.
Definition: AddCoupledEqSpeciesAction.h:34