Field& getPressureField();
Field& getVelocityField();
Field& getVelocityXField();
+ Field& getVelocityYField();
+ Field& getVelocityZField();
Field& getTemperatureField();
Field& getDensityField();
Field& getMomentumField();
Field& getTotalEnergyField();
Field& getEnthalpyField();
+ Field& getMachNumberField();
protected :
double _drho_sur_dp, _drho_sur_dT;//derivatives of the density rho wrt cv, p, T
void getDensityDerivatives( double pressure, double temperature, double v2);
bool _saveAllFields;
- Field _Enthalpy, _Pressure, _Density, _Temperature, _Momentum, _TotalEnergy, _Vitesse, _VitesseX, _VitesseY, _VitesseZ;
+ Field _Enthalpy, _Pressure, _Density, _Temperature, _Momentum, _TotalEnergy, _Vitesse, _VitesseX, _VitesseY, _VitesseZ, _MachNumber;
};
#endif /* SINGLEPHASE_HXX_*/
_Pressure=Field("Pressure",CELLS,_mesh,1);
_Density=Field("Density",CELLS,_mesh,1);
_Temperature=Field("Temperature",CELLS,_mesh,1);
+ _MachNumber=Field("MachNumber",CELLS,_mesh,1);
_VitesseX=Field("Velocity x",CELLS,_mesh,1);
if(_Ndim>1)
{
if(_saveAllFields)
{
- double p,T,rho, h, vx,vy,vz;
+ double p,T,rho, h, vx,vy,vz,v2;
int Ii;
for (long i = 0; i < _Nmailles; i++){
Ii = i*_nVar;
_Pressure(i)=p;
_Temperature(i)=T;
_VitesseX(i)=vx;
+ v2=vx*vx;
if(_Ndim>1)
{
_VitesseY(i)=vy;
+ v2+=vy*vy;
if(_Ndim>2)
+ {
_VitesseZ(i)=vz;
+ v2+=vz*vz;
+ }
}
+ _MachNumber(i)=sqrt(v2)/_fluides[0]->vitesseSonEnthalpie(h);
}
_Enthalpy.setTime(_time,_nbTimeStep);
_Density.setTime(_time,_nbTimeStep);
_Pressure.setTime(_time,_nbTimeStep);
_Temperature.setTime(_time,_nbTimeStep);
+ _MachNumber.setTime(_time,_nbTimeStep);
_VitesseX.setTime(_time,_nbTimeStep);
if(_Ndim>1)
{
_Density.writeVTK(allFields+"_Density");
_Pressure.writeVTK(allFields+"_Pressure");
_Temperature.writeVTK(allFields+"_Temperature");
+ _MachNumber.writeVTK(allFields+"_MachNumber");
_VitesseX.writeVTK(allFields+"_VelocityX");
if(_Ndim>1)
{
_Density.writeMED(allFields+"_Density");
_Pressure.writeMED(allFields+"_Pressure");
_Temperature.writeMED(allFields+"_Temperature");
+ _MachNumber.writeMED(allFields+"_MachNumber");
_VitesseX.writeMED(allFields+"_VelocityX");
if(_Ndim>1)
{
_Density.writeCSV(allFields+"_Density");
_Pressure.writeCSV(allFields+"_Pressure");
_Temperature.writeCSV(allFields+"_Temperature");
+ _MachNumber.writeCSV(allFields+"_MachNumber");
_VitesseX.writeCSV(allFields+"_VelocityX");
if(_Ndim>1)
{
_Density.writeVTK(allFields+"_Density",false);
_Pressure.writeVTK(allFields+"_Pressure",false);
_Temperature.writeVTK(allFields+"_Temperature",false);
+ _MachNumber.writeVTK(allFields+"_MachNumber",false);
_VitesseX.writeVTK(allFields+"_VelocityX",false);
if(_Ndim>1)
{
_Density.writeMED(allFields+"_Density",false);
_Pressure.writeMED(allFields+"_Pressure",false);
_Temperature.writeMED(allFields+"_Temperature",false);
+ _MachNumber.writeMED(allFields+"_MachNumber",false);
_VitesseX.writeMED(allFields+"_VelocityX",false);
if(_Ndim>1)
{
_Density.writeCSV(allFields+"_Density");
_Pressure.writeCSV(allFields+"_Pressure");
_Temperature.writeCSV(allFields+"_Temperature");
+ _MachNumber.writeCSV(allFields+"_MachNumber");
_VitesseX.writeCSV(allFields+"_VelocityX");
if(_Ndim>1)
{