|
29 | 29 |
|
30 | 30 | #include "../../../Common/include/geometry/CGeometry.hpp" |
31 | 31 | #include "../../include/solvers/CSolver.hpp" |
| 32 | +#include "../../include/variables/CNEMOEulerVariable.hpp" |
32 | 33 |
|
33 | 34 | CNEMOCompOutput::CNEMOCompOutput(const CConfig *config, unsigned short nDim) : CFlowOutput(config, nDim, false) { |
34 | 35 |
|
@@ -271,13 +272,16 @@ void CNEMOCompOutput::SetVolumeOutputFields(CConfig *config){ |
271 | 272 | SetVolumeOutputFieldsScalarResidual(config); |
272 | 273 |
|
273 | 274 | if (config->GetKind_SlopeLimit_Flow() != LIMITER::NONE && config->GetKind_SlopeLimit_Flow() != LIMITER::VAN_ALBADA_EDGE) { |
274 | | - // Limiter values |
275 | | - AddVolumeOutput("LIMITER_DENSITY", "Limiter_Density", "LIMITER", "Limiter value of the density"); |
276 | | - AddVolumeOutput("LIMITER_MOMENTUM-X", "Limiter_Momentum_x", "LIMITER", "Limiter value of the x-momentum"); |
277 | | - AddVolumeOutput("LIMITER_MOMENTUM-Y", "Limiter_Momentum_y", "LIMITER", "Limiter value of the y-momentum"); |
| 275 | + // Limiter values (of the primitive variables, which are reconstructed) |
| 276 | + for (auto iSpecies = 0u; iSpecies < nSpecies; iSpecies++) |
| 277 | + AddVolumeOutput("LIMITER_DENSITY_" + std::to_string(iSpecies), "Limiter_Density_" + std::to_string(iSpecies), "LIMITER", "Limiter value of the density of species " + std::to_string(iSpecies)); |
| 278 | + AddVolumeOutput("LIMITER_TEMPERATURE_TR", "Limiter_Temperature_tr", "LIMITER", "Limiter value of the temperature_tr"); |
| 279 | + AddVolumeOutput("LIMITER_TEMPERATURE_VE", "Limiter_Temperature_ve", "LIMITER", "Limiter value of the temperature_ve"); |
| 280 | + AddVolumeOutput("LIMITER_VELOCITY-X", "Limiter_Velocity_x", "LIMITER", "Limiter value of the x-velocity"); |
| 281 | + AddVolumeOutput("LIMITER_VELOCITY-Y", "Limiter_Velocity_y", "LIMITER", "Limiter value of the y-velocity"); |
278 | 282 | if (nDim == 3) |
279 | | - AddVolumeOutput("LIMITER_MOMENTUM-Z", "Limiter_Momentum_z", "LIMITER", "Limiter value of the z-momentum"); |
280 | | - AddVolumeOutput("LIMITER_ENERGY", "Limiter_Energy", "LIMITER", "Limiter value of the energy"); |
| 283 | + AddVolumeOutput("LIMITER_VELOCITY-Z", "Limiter_Velocity_z", "LIMITER", "Limiter value of the z-velocity"); |
| 284 | + AddVolumeOutput("LIMITER_PRESSURE", "Limiter_Pressure", "LIMITER", "Limiter value of the pressure"); |
281 | 285 | } |
282 | 286 |
|
283 | 287 | SetVolumeOutputFieldsScalarLimiter(config); |
@@ -363,15 +367,22 @@ void CNEMOCompOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolv |
363 | 367 | } |
364 | 368 |
|
365 | 369 | if (config->GetKind_SlopeLimit_Flow() != LIMITER::NONE && config->GetKind_SlopeLimit_Flow() != LIMITER::VAN_ALBADA_EDGE) { |
366 | | - SetVolumeOutputValue("LIMITER_DENSITY", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, 0)); |
367 | | - SetVolumeOutputValue("LIMITER_MOMENTUM-X", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, 1)); |
368 | | - SetVolumeOutputValue("LIMITER_MOMENTUM-Y", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, 2)); |
369 | | - if (nDim == 3){ |
370 | | - SetVolumeOutputValue("LIMITER_MOMENTUM-Z", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, 3)); |
371 | | - SetVolumeOutputValue("LIMITER_ENERGY", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, 4)); |
372 | | - } else { |
373 | | - SetVolumeOutputValue("LIMITER_ENERGY", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, 3)); |
374 | | - } |
| 370 | + /*--- Primitive variables: species densities, T, Tve, velocity, pressure. ---*/ |
| 371 | + const CNEMOEulerVariable::CIndices<unsigned long> prim_idx(nDim, nSpecies); |
| 372 | + for (auto iSpecies = 0u; iSpecies < nSpecies; iSpecies++) |
| 373 | + SetVolumeOutputValue("LIMITER_DENSITY_" + std::to_string(iSpecies), iPoint, |
| 374 | + Node_Flow->GetLimiter_Primitive(iPoint, prim_idx.SpeciesDensities() + iSpecies)); |
| 375 | + SetVolumeOutputValue("LIMITER_TEMPERATURE_TR", iPoint, |
| 376 | + Node_Flow->GetLimiter_Primitive(iPoint, prim_idx.Temperature())); |
| 377 | + SetVolumeOutputValue("LIMITER_TEMPERATURE_VE", iPoint, |
| 378 | + Node_Flow->GetLimiter_Primitive(iPoint, prim_idx.Temperature_ve())); |
| 379 | + SetVolumeOutputValue("LIMITER_VELOCITY-X", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, prim_idx.Velocity())); |
| 380 | + SetVolumeOutputValue("LIMITER_VELOCITY-Y", iPoint, |
| 381 | + Node_Flow->GetLimiter_Primitive(iPoint, prim_idx.Velocity() + 1)); |
| 382 | + if (nDim == 3) |
| 383 | + SetVolumeOutputValue("LIMITER_VELOCITY-Z", iPoint, |
| 384 | + Node_Flow->GetLimiter_Primitive(iPoint, prim_idx.Velocity() + 2)); |
| 385 | + SetVolumeOutputValue("LIMITER_PRESSURE", iPoint, Node_Flow->GetLimiter_Primitive(iPoint, prim_idx.Pressure())); |
375 | 386 | } |
376 | 387 |
|
377 | 388 | LoadVolumeDataScalar(config, solver, geometry, iPoint); |
|
0 commit comments