ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
EosVDW.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 EOSVDW_H
32#define EOSVDW_H
33
34#include "Eos.h"
35
38class EosVDW : public Eos
39{
40 public:
41 EosVDW(std::vector<std::string>& nameParameterEos, int& number);
42 virtual ~EosVDW();
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 computeEnergy(const double& density, const double& /*temperature*/) const;
58
64 virtual double computePressure(const double& density, const double& /*temperature*/) const;
65
71 virtual double computeTemperature(const double& density, const double& /*energy*/) const;
72
73 //Partial derivatives
79 virtual double dedrho(const double& density, const double& /*temperature*/) const;
85 virtual double dedrhoSecond(const double& density, const double& /*temperature*/) const;
86
87 //Checking
89 virtual void verifyAndCorrectDensityMax(double& density) const;
90
91 //Get
94 virtual TypeEOS getType() const { return TypeEOS::VDW; };
95
96 private:
97 double m_r;
98 double m_a;
99 double m_b;
100 double m_gamma;
101 double m_p0;
102 double m_rho0;
103};
104
105#endif // EOSVDW_H
TypeEOS
Enumeration for the type of EOS (IG: ideal gas, SG: stiffened gas, NASG: Noble-Abel stiffened gas,...
Definition Eos.h:40
@ VDW
Definition Eos.h:40
Class describing a Van Der Waals equation of state.
Definition EosVDW.h:39
double m_r
Universal constant of the fluid.
Definition EosVDW.h:97
virtual ~EosVDW()
Definition EosVDW.cpp:48
virtual double computePressure(const double &density, const double &) const
Compute pressure.
Definition EosVDW.cpp:75
double m_gamma
Polytropic constant.
Definition EosVDW.h:100
double m_a
Constant parameter of VDW EOS.
Definition EosVDW.h:98
virtual double computeTemperature(const double &density, const double &) const
Compute temperature.
Definition EosVDW.cpp:83
virtual void assignParametersEos(std::string name, std::vector< double > parametersEos)
Assign the values of the attributes for EosVDW from data defined in the code.
Definition EosVDW.cpp:52
virtual double computeEnergy(const double &density, const double &) const
Compute internal energy.
Definition EosVDW.cpp:68
virtual TypeEOS getType() const
Get the type that is to say the reduced name of the EOS in ECOGEN.
Definition EosVDW.h:94
double m_p0
Reference pressure.
Definition EosVDW.h:101
virtual double dedrho(const double &density, const double &) const
Compute partial derivative dedrho.
Definition EosVDW.cpp:90
virtual void verifyAndCorrectDensityMax(double &density) const
Do nothing for VDW.
Definition EosVDW.cpp:106
double m_b
Constant parameter of VDW EOS.
Definition EosVDW.h:99
double m_rho0
Reference density.
Definition EosVDW.h:102
virtual double dedrhoSecond(const double &density, const double &) const
Compute partial derivative dedrhoSecond.
Definition EosVDW.cpp:97
General class for Equation of State (EOS).
Definition Eos.h:54