Reaktoro 
A unified framework for modeling chemically reactive systems
KineticProblem.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright (C) 2014-2015 Allan Leal
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // C++ includes
21 #include <memory>
22 
23 // Reaktoro includes
24 #include <Reaktoro/Math/Matrix.hpp>
25 #include <Reaktoro/Common/ScalarTypes.hpp>
26 
27 namespace Reaktoro {
28 
29 // Forward declarations
30 class ChemicalSystem;
31 class Partition;
32 class ReactionSystem;
33 
36 {
37 public:
40 
46  explicit KineticProblem(const ReactionSystem& reactions);
47 
49  KineticProblem(const KineticProblem& other);
50 
52  virtual ~KineticProblem();
53 
55  auto operator=(KineticProblem other) -> KineticProblem&;
56 
60  auto setTemperature(double val) -> KineticProblem&;
61 
66  auto setTemperature(double val, std::string units) -> KineticProblem&;
67 
72  auto setPressure(double val) -> KineticProblem&;
73 
78  auto setPressure(double val, std::string units) -> KineticProblem&;
79 
83 
85  auto temperature() const -> double;
86 
88  auto pressure() const -> double;
89 
91  auto reactions() const -> const ReactionSystem&;
92 
94  auto system() const -> const ChemicalSystem&;
95 
97  auto partition() const -> const Partition&;
98 
99 private:
100  struct Impl;
101 
102  std::unique_ptr<Impl> pimpl;
103 };
104 
105 } // namespace Reaktoro
A type that defines a kinetic problem.
Definition: KineticProblem.hpp:35
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:47
auto temperature() const -> double
Return the temperature for the kinetic calculation (in units of K)
Definition: KineticProblem.cpp:86
virtual ~KineticProblem()
Destroy this KineticProblem instance.
Definition: KineticProblem.cpp:65
auto reactions() const -> const ReactionSystem &
Return a reference to the ReactionSystem instance used to create this KineticProblem instance...
auto system() const -> const ChemicalSystem &
Return a reference to the ChemicalSystem instance used to create this KineticProblem instance...
A class that represents a system of chemical reactions.
Definition: ReactionSystem.hpp:41
auto pressure() const -> double
Return the pressure for the kinetic calculation (in units of Pa)
Definition: KineticProblem.cpp:91
auto setPressure(double val) -> KineticProblem &
Set the pressure for the kinetic calculation (in units of Pa) By default, the pressure is 1 bar...
Definition: KineticProblem.cpp:80
auto setPartition(const Partition &partition) -> KineticProblem &
Set the partition of the chemical system.
Provide a computational representation of the Partition of a chemical system.
Definition: Partition.hpp:55
Definition: Units.cpp:38
auto partition() const -> const Partition &
Return a reference to the Partition instance used to create this KineticProblem instance.
auto operator=(KineticProblem other) -> KineticProblem &
Assign a KineticProblem instance to this.
Definition: KineticProblem.cpp:68
auto setTemperature(double val) -> KineticProblem &
Set the temperature for the kinetic calculation (in units of K).
Definition: KineticProblem.cpp:74
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
KineticProblem()
Construct a default KineticProblem instance.