ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
EosPolynomial.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef EOSPOLYNOMIAL_H
32#define EOSPOLYNOMIAL_H
33
34#include "Eos.h"
35
38class EosPolynomial : public Eos
39{
40 public:
41 EosPolynomial(std::vector<std::string>& nameParameterEos, int& number);
42 ~EosPolynomial() override;
43
48 void assignParametersEos(std::string name, std::vector<double> parametersEos) override;
49
50 //Constant methods (virtual because inherited from class Eos)
51
57 double computeEnergy(const double& density, const double& /*pressure*/) const override;
58
63 double computeEntropyFromDensityAndEnergy(const double& density, const double& /*energy*/) const override;
64
69 double computeEntropyFromDensityAndPressure(const double& density, const double& /*pressure*/) const override;
70
76 double computePressureFromDensityAndEntropy(const double& density, const double& /*entropy*/) const override;
77
83 double computePressure(const double& density, const double& /*energy*/) const override;
84
89 double computeTemperature(const double& density, const double& pressure) const override;
90
95 double computeSquareSoundSpeed(const double& density, const double& entropy) const override;
96
100 double kappa(const double& density) const override;
101
105 double kappaPrime(const double& density) const override;
106
110 double kappaSecond(const double& density) const override;
111
112 //Checking
114 void verifyAndCorrectDensityMax(double& /*density*/) const override {};
115
116 //Get
119 TypeEOS getType() const override { return TypeEOS::Polynomial; };
120
121 private:
122 double m_a;
123 double m_b;
124 double m_c;
125};
126
127#endif // EOSPOLYNOMIAL_H
TypeEOS
Enumeration for the type of EOS (IG: ideal gas, SG: stiffened gas, NASG: Noble-Abel stiffened gas,...
Definition Eos.h:41
@ Polynomial
Definition Eos.h:46
@ density
Definition Tools.h:166
@ pressure
Definition Tools.h:165
EosPolynomial(std::vector< std::string > &nameParameterEos, int &number)
Definition EosPolynomial.cpp:35
void assignParametersEos(std::string name, std::vector< double > parametersEos) override
Assign the values of the attributes for EosPolynomial from data defined in the code.
Definition EosPolynomial.cpp:48
double computePressureFromDensityAndEntropy(const double &density, const double &) const override
Compute internal energy.
Definition EosPolynomial.cpp:67
~EosPolynomial() override
Definition EosPolynomial.cpp:44
Eos(int &number)
Definition Eos.cpp:39
virtual double computeEntropyFromDensityAndEnergy(const double &, const double &) const
See derived classes.
Definition Eos.h:182
virtual double kappaPrime(const double &) const
See derived classes.
Definition Eos.h:325
virtual double computeEnergy(const double &, const double &) const
See derived classes.
Definition Eos.h:121
virtual double computeSquareSoundSpeed(const double &, const double &) const
See derived classes.
Definition Eos.h:151
virtual double kappaSecond(const double &) const
See derived classes.
Definition Eos.h:331
virtual void verifyAndCorrectDensityMax(const double &, double &, double &) const
See derived classes.
Definition Eos.h:348
virtual double computeTemperature(const double &, const double &) const
See derived classes.
Definition Eos.h:115
virtual double computePressure(const double &, const double &) const
See derived classes.
Definition Eos.h:133
virtual double computeEntropyFromDensityAndPressure(const double &, const double &) const
See derived classes.
Definition Eos.h:188
virtual TypeEOS getType() const
See derived classes.
Definition Eos.h:70
virtual double kappa(const double &) const
See derived classes.
Definition Eos.h:319