Skip to content
Snippets Groups Projects
Commit 87e8c0e2 authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[kepsilon] Add nominal y^+ and nominal u^+ to output

parent 4dea43a1
No related branches found
No related tags found
1 merge request!1040Freeflow/kepsilon wallfunction rebased
...@@ -99,6 +99,10 @@ public: ...@@ -99,6 +99,10 @@ public:
storedDissipation_ = problem.storedDissipation_[RANSParentType::elementID()]; storedDissipation_ = problem.storedDissipation_[RANSParentType::elementID()];
storedTurbulentKineticEnergy_ = problem.storedTurbulentKineticEnergy_[RANSParentType::elementID()]; storedTurbulentKineticEnergy_ = problem.storedTurbulentKineticEnergy_[RANSParentType::elementID()];
stressTensorScalarProduct_ = problem.stressTensorScalarProduct_[RANSParentType::elementID()]; stressTensorScalarProduct_ = problem.stressTensorScalarProduct_[RANSParentType::elementID()];
const Scalar uStarNominal = problem.uStarNominal(RANSParentType::elementID());
const auto flowNormalAxis = problem.flowNormalAxis_[RANSParentType::elementID()];
yPlusNominal_ = RANSParentType::wallDistance() * uStarNominal / problem.kinematicViscosity_[RANSParentType::elementID()];
uPlusNominal_ = RANSParentType::velocity()[flowNormalAxis] / uStarNominal;
if (problem.useStoredEddyViscosity_) if (problem.useStoredEddyViscosity_)
dynamicEddyViscosity_ = problem.storedDynamicEddyViscosity_[RANSParentType::elementID()]; dynamicEddyViscosity_ = problem.storedDynamicEddyViscosity_[RANSParentType::elementID()];
else else
...@@ -232,6 +236,18 @@ public: ...@@ -232,6 +236,18 @@ public:
const Scalar cTwoEpsilon() const const Scalar cTwoEpsilon() const
{ return 1.92; } { return 1.92; }
/*!
* \brief Return the nominal dimensionless wall distance \f$\mathrm{[-]}\f$.
*/
Scalar yPlusNominal() const
{ return yPlusNominal_; }
/*!
* \brief Return the nominal dimensionless velocity \f$\mathrm{[-]}\f$.
*/
Scalar uPlusNominal() const
{ return uPlusNominal_; }
/*! /*!
* \brief Returns the eddy diffusivity \f$\mathrm{[m^2/s]}\f$ * \brief Returns the eddy diffusivity \f$\mathrm{[m^2/s]}\f$
*/ */
...@@ -257,6 +273,8 @@ protected: ...@@ -257,6 +273,8 @@ protected:
Scalar storedTurbulentKineticEnergy_; Scalar storedTurbulentKineticEnergy_;
Scalar storedDissipation_; Scalar storedDissipation_;
Scalar stressTensorScalarProduct_; Scalar stressTensorScalarProduct_;
Scalar yPlusNominal_;
Scalar uPlusNominal_;
bool inNearWallRegion_; bool inNearWallRegion_;
bool isMatchingPoint_; bool isMatchingPoint_;
}; };
......
...@@ -53,6 +53,8 @@ public: ...@@ -53,6 +53,8 @@ public:
{ {
vtk.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k"); vtk.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k");
vtk.addVolumeVariable([](const auto& v){ return v.dissipation(); }, "epsilon"); vtk.addVolumeVariable([](const auto& v){ return v.dissipation(); }, "epsilon");
vtk.addVolumeVariable([](const auto& v){ return v.yPlusNominal(); }, "y^+_nom");
vtk.addVolumeVariable([](const auto& v){ return v.uPlusNominal(); }, "u^+_nom");
vtk.addVolumeVariable([](const auto& v){ return v.inNearWallRegion(); }, "inNearWallRegion"); vtk.addVolumeVariable([](const auto& v){ return v.inNearWallRegion(); }, "inNearWallRegion");
vtk.addVolumeVariable([](const auto& v){ return v.isMatchingPoint(); }, "isMatchingPoint"); vtk.addVolumeVariable([](const auto& v){ return v.isMatchingPoint(); }, "isMatchingPoint");
} }
......
...@@ -245,6 +245,8 @@ int main(int argc, char** argv) try ...@@ -245,6 +245,8 @@ int main(int argc, char** argv) try
#elif KEPSILON #elif KEPSILON
gnuplot_lawOfTheWall.addFileToPlot("pdelab-kepsilon_twolayers.csv", "u 34:33 w l lw 2 t 'PDELab k-epsilon (two layers)'"); gnuplot_lawOfTheWall.addFileToPlot("pdelab-kepsilon_twolayers.csv", "u 34:33 w l lw 2 t 'PDELab k-epsilon (two layers)'");
gnuplot_lawOfTheWall.addFileToPlot("pdelab-kepsilon_wallfunction.csv", "u 36:35 w l lw 2 t 'PDELab k-epsilon (wall function)'"); gnuplot_lawOfTheWall.addFileToPlot("pdelab-kepsilon_wallfunction.csv", "u 36:35 w l lw 2 t 'PDELab k-epsilon (wall function)'");
gnuplot_lawOfTheWall.addFileToPlot(std::string(fileName) + ".csv", "u 12:13 w l lc 7 t 'with u_{tau}'");
gnuplot_lawOfTheWall.addFileToPlot(std::string(fileName) + ".csv", "u 16:17 w l lc 8 t 'with u_{tau,nom}'");
gnuplot_lawOfTheWall.addFileToPlot(std::string(fileName) + ".csv", "u 12:13 w l lc 7"); gnuplot_lawOfTheWall.addFileToPlot(std::string(fileName) + ".csv", "u 12:13 w l lc 7");
#elif KOMEGA #elif KOMEGA
gnuplot_lawOfTheWall.addFileToPlot("pdelab-komega.csv", "u 24:23 w l lw 2 t 'PDELab k-omega'"); gnuplot_lawOfTheWall.addFileToPlot("pdelab-komega.csv", "u 24:23 w l lw 2 t 'PDELab k-omega'");
......
...@@ -291,6 +291,54 @@ ...@@ -291,6 +291,54 @@
0.48073 0.480728 0.480727 0.480726 0.480726 0.480725 0.480724 0.48109 0.483474 0.48707 0.491341 0.495899 0.48073 0.480728 0.480727 0.480726 0.480726 0.480725 0.480724 0.48109 0.483474 0.48707 0.491341 0.495899
0.500445 0.504741 0.508665 0.51055 0.500445 0.504741 0.508665 0.51055
</DataArray> </DataArray>
<DataArray type="Float32" Name="y^+_nom" NumberOfComponents="1" format="ascii">
8.83052 8.83049 8.83047 8.83045 8.83044 8.83042 8.83041 8.83264 8.8472 8.86907 8.8949 8.92231
8.94949 8.97501 8.9982 9.00929 30.0238 30.0237 30.0236 30.0235 30.0235 30.0234 30.0234 30.031
30.0805 30.1548 30.2427 30.3359 30.4283 30.515 30.5939 30.6316 59.6943 59.6941 59.694 59.6939
59.6938 59.6937 59.6936 59.7086 59.8071 59.9549 60.1295 60.3148 60.4985 60.6711 60.8279 60.9028
101.233 101.233 101.232 101.232 101.232 101.232 101.232 101.257 101.424 101.675 101.971 102.285
102.597 102.89 103.155 103.283 159.387 159.387 159.386 159.386 159.386 159.386 159.385 159.426
159.688 160.083 160.549 161.044 161.535 161.995 162.414 162.614 240.803 240.802 240.802 240.801
240.801 240.801 240.8 240.861 241.258 241.854 242.559 243.307 244.047 244.744 245.376 245.678
354.786 354.784 354.784 354.783 354.782 354.782 354.781 354.871 355.456 356.334 357.372 358.474
359.565 360.591 361.523 361.968 514.361 514.359 514.358 514.357 514.356 514.355 514.354 514.484
515.332 516.606 518.111 519.708 521.291 522.777 524.128 524.774 514.361 514.359 514.358 514.357
514.356 514.355 514.354 514.484 515.332 516.606 518.111 519.708 521.291 522.777 524.128 524.774
354.786 354.784 354.784 354.783 354.782 354.782 354.781 354.871 355.456 356.334 357.372 358.474
359.565 360.591 361.523 361.968 240.803 240.802 240.802 240.801 240.801 240.801 240.8 240.861
241.258 241.854 242.559 243.307 244.047 244.744 245.376 245.678 159.387 159.387 159.386 159.386
159.386 159.386 159.385 159.426 159.688 160.083 160.549 161.044 161.535 161.995 162.414 162.614
101.233 101.233 101.232 101.232 101.232 101.232 101.232 101.257 101.424 101.675 101.971 102.285
102.597 102.89 103.155 103.283 59.6943 59.6941 59.694 59.6939 59.6938 59.6937 59.6936 59.7086
59.8071 59.9549 60.1295 60.3148 60.4985 60.6711 60.8279 60.9028 30.0238 30.0237 30.0236 30.0235
30.0235 30.0234 30.0234 30.031 30.0805 30.1548 30.2427 30.3359 30.4283 30.515 30.5939 30.6316
8.83052 8.83049 8.83047 8.83045 8.83044 8.83042 8.83041 8.83264 8.8472 8.86907 8.8949 8.92231
8.94949 8.97501 8.9982 9.00929
</DataArray>
<DataArray type="Float32" Name="u^+_nom" NumberOfComponents="1" format="ascii">
28.3854 20.0546 18.2001 17.4836 17.1369 16.9586 16.8731 16.8398 16.8196 16.8084 16.8029 16.8014
16.8028 16.8064 16.8109 16.8235 32.8405 29.1624 27.4368 26.5981 26.173 25.9634 25.8769 25.8574
25.8458 25.8388 25.8348 25.8332 25.8335 25.8354 25.8385 25.8561 34.4351 32.6318 31.1534 30.207
29.641 29.3128 29.1338 29.0428 28.9732 28.92 28.8799 28.8502 28.8294 28.8159 28.8081 28.8207
35.2239 34.6268 33.6711 32.8123 32.1824 31.7615 31.4963 31.3328 31.2021 31.099 31.019 30.9579
30.9126 30.8807 30.8591 30.8642 35.6124 35.8069 35.5297 35.0606 34.5618 34.1369 33.8185 33.5908
33.3964 33.236 33.1069 33.0053 32.927 32.8688 32.8263 32.8193 35.7856 36.3898 36.6176 36.6508
36.5363 36.3305 36.097 35.8754 35.6489 35.4424 35.2642 35.1157 34.9955 34.9008 34.8275 34.801
35.852 36.63 37.1086 37.4618 37.7142 37.8708 37.9391 37.9261 37.8136 37.6492 37.4676 37.2905
37.1308 36.9937 36.8785 36.8227 35.8703 36.7052 37.2772 37.758 38.1767 38.5402 38.8487 39.0901
39.2176 39.2536 39.2171 39.1264 38.9993 38.8532 38.7021 38.6115 35.8703 36.7052 37.2772 37.758
38.1767 38.5402 38.8487 39.0901 39.2176 39.2536 39.2171 39.1264 38.9993 38.8532 38.7021 38.6115
35.852 36.63 37.1086 37.4618 37.7142 37.8708 37.9391 37.9261 37.8136 37.6492 37.4676 37.2905
37.1308 36.9937 36.8785 36.8227 35.7856 36.3898 36.6176 36.6508 36.5363 36.3305 36.097 35.8754
35.6489 35.4424 35.2642 35.1157 34.9955 34.9008 34.8275 34.801 35.6124 35.8069 35.5297 35.0606
34.5618 34.1369 33.8185 33.5908 33.3964 33.236 33.1069 33.0053 32.927 32.8688 32.8263 32.8193
35.2239 34.6268 33.6711 32.8123 32.1824 31.7615 31.4963 31.3328 31.2021 31.099 31.019 30.9579
30.9126 30.8807 30.8591 30.8642 34.4351 32.6318 31.1534 30.207 29.641 29.3128 29.1338 29.0428
28.9732 28.92 28.8799 28.8502 28.8294 28.8159 28.8081 28.8207 32.8405 29.1624 27.4368 26.5981
26.173 25.9634 25.8769 25.8574 25.8458 25.8388 25.8348 25.8332 25.8335 25.8354 25.8385 25.8561
28.3854 20.0546 18.2001 17.4836 17.1369 16.9586 16.8731 16.8398 16.8196 16.8084 16.8029 16.8014
16.8028 16.8064 16.8109 16.8235
</DataArray>
<DataArray type="Float32" Name="inNearWallRegion" NumberOfComponents="1" format="ascii"> <DataArray type="Float32" Name="inNearWallRegion" NumberOfComponents="1" format="ascii">
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment