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-2018 Allan Leal
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library 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 GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library. 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
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
A class to represent a system and its attributes and properties.
Definition: ChemicalSystem.hpp:38
auto setPressure(double val, std::string units) -> KineticProblem &
Set the pressure for the kinetic calculation (in units of Pa) By default, the pressure is 1 bar.
auto operator=(KineticProblem other) -> KineticProblem &
Assign a KineticProblem instance to this.
Definition: KineticProblem.cpp:68
auto setTemperature(double val, std::string units) -> KineticProblem &
Set the temperature for the kinetic calculation with given units.
KineticProblem()
Construct a default KineticProblem instance.
auto partition() const -> const Partition &
Return a reference to the Partition instance used to create this KineticProblem instance.
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
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.
auto pressure() const -> double
Return the pressure for the kinetic calculation (in units of Pa)
Definition: KineticProblem.cpp:91
A class that represents a system of chemical reactions.
Definition: ReactionSystem.hpp:42
auto reactions() const -> const ReactionSystem &
Return a reference to the ReactionSystem instance used to create this KineticProblem instance.
Provide a computational representation of the Partition of a chemical system.
Definition: Partition.hpp:56
auto setTemperature(double val) -> KineticProblem &
Set the temperature for the kinetic calculation (in units of K).
Definition: KineticProblem.cpp:74
A type that defines a kinetic problem.
Definition: KineticProblem.hpp:36
auto system() const -> const ChemicalSystem &
Return a reference to the ChemicalSystem instance used to create this KineticProblem instance.