diff --git a/src/main.cpp b/src/main.cpp index f7e34b27fad3c6180ca617bb8803db4beb9d851d..9ca54fe27ac91abbb37d82633c4d27a64b07f40f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -265,7 +265,7 @@ int main(int argc, char *argv[]) // ETAPE 1 DU SPLITTING - EULER - double dt_euler = 0.4*acoustic_solver.acoustic_dt(Vj, cj); + double dt_euler = 0.2*acoustic_solver.acoustic_dt(Vj, cj); if (t+dt_euler > tmax) { dt_euler = tmax-t; @@ -654,6 +654,18 @@ int main(int argc, char *argv[]) } } + { // gnuplot output u^2*0.5 + T + const Kokkos::View<const Rd*> xj = mesh_data.xj(); + const Kokkos::View<const double*> Tj = unknowns.Tj(); + const Kokkos::View<const Rd*> uj = unknowns.uj(); + double h = std::sqrt(1. - (tmax*tmax)/(50./9.)); + std::ofstream fout("essai"); + fout.precision(15); + for (size_t j=0; j<mesh.numberOfCells(); ++j) { + fout << xj[j][0] << ' ' << Tj[j]+uj[j][0]*uj[j][0]*0.5 << ' ' << (std::sqrt((3.*((xj[j][0]*xj[j][0])/(h*h)) + 100.)/100.)/h)*(std::sqrt((3.*((xj[j][0]*xj[j][0])/(h*h)) + 100.)/100.)/h) + (-(xj[j][0]*tmax)/((50./9.)-tmax*tmax))*(-(xj[j][0]*tmax)/((50./9.)-tmax*tmax))*0.5 << '\n'; // kidder + } + } + /* { // gnuplot output for entropy (gaz parfait en prenant cv = 1)) diff --git a/src/scheme/AcousticSolver.hpp b/src/scheme/AcousticSolver.hpp index 4370758c2544dc345f1ee1f51b9b0738bcdb5dab..98762c84a0aa937e1232414eccc245fb13cdc8e5 100644 --- a/src/scheme/AcousticSolver.hpp +++ b/src/scheme/AcousticSolver.hpp @@ -407,11 +407,11 @@ public: }); // Mise a jour de nu - + /* Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j) { nuj(j) = 0.5*(1.+xj[j][0]); }); - + */ } }; diff --git a/src/scheme/FiniteVolumesDiffusion.hpp b/src/scheme/FiniteVolumesDiffusion.hpp index b178c4b13b64d65f0338a6b9e5d53da56642a56b..56e63b96e7e88ff0dd6723b844ec268cc075a09a 100644 --- a/src/scheme/FiniteVolumesDiffusion.hpp +++ b/src/scheme/FiniteVolumesDiffusion.hpp @@ -247,8 +247,14 @@ private: */ double h = std::sqrt(1. - (t*t)/(50./9.)); - m_Bl(0) = ((1.+h*x0[0][0])*3.*h*x0[0][0])/(100.*h*h*h*h); - m_Bl(m_mesh.numberOfFaces()-1) = ((1.+h*xmax[0][0])*3.*h*xmax[0][0])/(100.*h*h*h*h); + + // nu = (1+x)*0.5 + //m_Bl(0) = ((1.+h*x0[0][0])*3.*h*x0[0][0])/(100.*h*h*h*h); + //m_Bl(m_mesh.numberOfFaces()-1) = ((1.+h*xmax[0][0])*3.*h*xmax[0][0])/(100.*h*h*h*h); + + // nu = 0.2 + m_Bl(0) = (0.2*3.*h*x0[0][0])/(50.*h*h*h*h); + m_Bl(m_mesh.numberOfFaces()-1) = (0.2*3.*h*xmax[0][0])/(50.*h*h*h*h); return m_Bl ; @@ -469,7 +475,8 @@ public: // ajout second membre pour kidder (k = x) uj[j][0] += (dt*inv_mj[j])*Vj(j)*(t/((50./9.)-t*t)); - Ej[j] -= (dt*inv_mj[j])*Vj(j)*((2.*xj[j][0]*t*t)/(((50./9.)-t*t)*((50./9.)-t*t))+(6*xj[j][0]+3.)/(100*(1-t*t/(50/9))*(1-t*t/(50/9)))); + Ej[j] -= (dt*inv_mj[j])*Vj(j)*((2.*xj[j][0]*t*t)/(((50./9.)-t*t)*((50./9.)-t*t))+(0.2*3.)/(50.*h*h*h*h)); + //Ej[j] -= (dt*inv_mj[j])*Vj(j)*((2.*xj[j][0]*t*t)/(((50./9.)-t*t)*((50./9.)-t*t))+(6*xj[j][0]+3.)/(100*(1-t*t/(50/9))*(1-t*t/(50/9)))); }); // Calcul de e par la formule e = E-0.5 u^2 diff --git a/src/scheme/FiniteVolumesEulerUnknowns.hpp b/src/scheme/FiniteVolumesEulerUnknowns.hpp index 8b59faecaf065042fda766c1f918d609ffabb4b9..66775dd20e320b18cb40f90a4545ec6d0bbd0851 100644 --- a/src/scheme/FiniteVolumesEulerUnknowns.hpp +++ b/src/scheme/FiniteVolumesEulerUnknowns.hpp @@ -396,7 +396,8 @@ public: m_S0(j) = m_entropy(j); }); Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ - m_nuj(j) = 0.5*(1.+xj[j][0]); // k = x + //m_nuj(j) = 0.5*(1.+xj[j][0]); + m_nuj(j) = 0.2; }); Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ @@ -407,8 +408,8 @@ public: m_TL[0] = 1.; m_TR[0] = 103./100.; - m_nuL[0] = 0.5; - m_nuR[0] = 1.; + m_nuL[0] = 0.2; + m_nuR[0] = 0.2; }