Skip to content
Snippets Groups Projects
Commit fedea1f0 authored by Fanny CHOPOT's avatar Fanny CHOPOT
Browse files

ajout cas nu constant

parent 4a8c3da7
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
......@@ -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]);
});
*/
}
};
......
......@@ -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
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment