ECOGEN 4.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 virtual ~EosPolynomial();
43
48 virtual void assignParametersEos(std::string name, std::vector<double> parametersEos);
49
50 //Constant methods (virtual because inherited from class Eos)
51
57 virtual double computePressure(const double& density, const double& /*temperature*/) const;
58
59 //Partial derivatives
65 virtual double dedrho(const double& density, const double& temperature) const;
71 virtual double dedrhoSecond(const double& density, const double& temperature) const;
72
73 //Checking
75 virtual void verifyAndCorrectDensityMax(double& /*density*/) const {};
76
77 //Get
80 virtual TypeEOS getType() const { return TypeEOS::Polynomial; };
81
82 private:
83 double m_a;
84 double m_b;
85 double m_c;
86};
87
88#endif // EOSPOLYNOMIAL_H
TypeEOS
Enumeration for the type of EOS (IG: ideal gas, SG: stiffened gas, NASG: Noble-Abel stiffened gas,...
Definition Eos.h:40
@ Polynomial
Definition Eos.h:40
Class describing a polynomial equation of state.
Definition EosPolynomial.h:39
double m_c
Constant parameter of polynomial EOS.
Definition EosPolynomial.h:85
virtual double dedrhoSecond(const double &density, const double &temperature) const
Compute partial derivative dedrhoSecond.
Definition EosPolynomial.cpp:75
double m_b
Constant parameter of polynomial EOS.
Definition EosPolynomial.h:84
double m_a
Constant parameter of polynomial EOS.
Definition EosPolynomial.h:83
virtual void verifyAndCorrectDensityMax(double &) const
Do nothing for Polynomial.
Definition EosPolynomial.h:75
virtual double dedrho(const double &density, const double &temperature) const
Compute partial derivative dedrho.
Definition EosPolynomial.cpp:68
virtual void assignParametersEos(std::string name, std::vector< double > parametersEos)
Assign the values of the attributes for EosPolynomial from data defined in the code.
Definition EosPolynomial.cpp:49
virtual ~EosPolynomial()
Definition EosPolynomial.cpp:45
virtual TypeEOS getType() const
Get the type that is to say the reduced name of the EOS in ECOGEN.
Definition EosPolynomial.h:80
virtual double computePressure(const double &density, const double &) const
Compute pressure.
Definition EosPolynomial.cpp:60
General class for Equation of State (EOS).
Definition Eos.h:54