https://mooseframework.inl.gov
ChemicalCompositionAction.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 "AddFunctionAction.h"
14 
20 {
21 public:
24 
25  const std::vector<unsigned int> & elementIDs() const { return _element_ids; }
26 
27  const std::vector<std::string> & phases() const { return _phases; }
28  const std::vector<std::string> & elementPotentials() const
29  {
31  }
32 
33  const std::vector<std::pair<std::string, std::string>> & speciesPhasePairs() const
34  {
35  return _tokenized_species;
36  }
37 
38  const std::vector<std::pair<std::string, std::string>> & vaporPhasePairs() const
39  {
41  }
42 
43  const std::vector<std::pair<std::string, std::string>> & phaseElementPairs() const
44  {
46  }
47 
48  virtual void act();
49 
50 protected:
51  void readCSV();
52 
54  std::vector<std::string> _elements;
55 
57  std::map<std::string, Real> _initial_conditions;
58 
60  std::vector<std::string> _phases;
61 
63  std::vector<unsigned int> _element_ids;
64 
66  std::vector<std::pair<std::string, std::string>> _tokenized_species;
67  std::vector<std::string> _tokenized_element_potentials;
68  std::vector<std::pair<std::string, std::string>> _tokenized_vapor_species;
69  std::vector<std::pair<std::string, std::string>> _tokenized_phase_elements;
70 };
ChemicalCompositionAction(const InputParameters &params)
std::vector< std::pair< std::string, std::string > > _tokenized_phase_elements
std::vector< std::string > _elements
Element names.
const std::vector< unsigned int > & elementIDs() const
const std::vector< std::string > & elementPotentials() const
std::vector< std::pair< std::string, std::string > > _tokenized_species
Tokenized versions of the output variables to avoid redoing tokenization.
const std::vector< std::string > & phases() const
std::vector< std::string > _phases
List of phases tracked by Thermochimica.
const std::vector< std::pair< std::string, std::string > > & speciesPhasePairs() const
std::map< std::string, Real > _initial_conditions
Initial conditions for each element: [element name] => initial condition value.
std::vector< unsigned int > _element_ids
Atomic numbers of the selected elements.
const std::vector< std::pair< std::string, std::string > > & vaporPhasePairs() const
std::vector< std::pair< std::string, std::string > > _tokenized_vapor_species
The ChemicalCompositionAction sets up user objects, aux kernels, and aux variables for a thermochemis...
std::vector< std::string > _tokenized_element_potentials
const std::vector< std::pair< std::string, std::string > > & phaseElementPairs() const
static InputParameters validParams()