TransFlow  0.1.0
A transient pipeline flow simulation library
config.hpp
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 #include <armadillo>
6 
11 struct Config
12 {
14  std::string equationOfState = "BWRS";
16  std::string heatTransfer = "SteadyState";
18  std::string discretizer = "InternalEnergy";
19 
21  std::string toleranceType = "relative";
23  arma::vec relaxationFactors = {1, 1, 2/3.0};
25  arma::vec tolerances = {0.001, 0.001, 0.001};
27  bool bruteForce = false;
29  arma::uword maxIterations = 200;
30 
33  std::string outputPath = ""; // no output by default
34 
36  arma::uword samplingInterval = 60;
37 
39  bool appendResults = false;
40 };
Config::heatTransfer
std::string heatTransfer
Type of heat transfer, either "SteadyState", "Unsteady", "FixedUValue" or "FixedQValue".
Definition: config.hpp:16
Config::appendResults
bool appendResults
If we should append to (true) or overwrite (false) existing output files.
Definition: config.hpp:39
Config::maxIterations
arma::uword maxIterations
Max number of iterations to use in Solver::solve.
Definition: config.hpp:29
Config::relaxationFactors
arma::vec relaxationFactors
The relaxation factors used by Solver.
Definition: config.hpp:23
Config::equationOfState
std::string equationOfState
Equation of state, either "BWRS", "GERG04" or "IdealGas".
Definition: config.hpp:14
Config
The Config struct stores all settings for the different parts of the pipeline simulation.
Definition: config.hpp:11
Config::bruteForce
bool bruteForce
If we want to force the number of iterations in Solver::solve.
Definition: config.hpp:27
Config::tolerances
arma::vec tolerances
The convergence criteria used by Solver.
Definition: config.hpp:25
Config::samplingInterval
arma::uword samplingInterval
How often to sample results [s].
Definition: config.hpp:36
Config::outputPath
std::string outputPath
Definition: config.hpp:33
Config::toleranceType
std::string toleranceType
The tolerance of Solver, either "relative" or "absolute".
Definition: config.hpp:21
Config::discretizer
std::string discretizer
Type of energy equation, either "InternalEnergy" or "Enthalpy".
Definition: config.hpp:18