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

correction CL pour nu, T et flux nu partial_x T

parent aab22b2b
Branches
No related tags found
No related merge requests found
...@@ -613,7 +613,7 @@ int main(int argc, char *argv[]) ...@@ -613,7 +613,7 @@ int main(int argc, char *argv[])
const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> xj = mesh_data.xj();
const Kokkos::View<const double*> rhoj = unknowns.rhoj(); const Kokkos::View<const double*> rhoj = unknowns.rhoj();
double h = std::sqrt(1. - (tmax*tmax)/(50./9.)); double h = std::sqrt(1. - (tmax*tmax)/(50./9.));
std::ofstream fout("rho1600"); std::ofstream fout("rho");
fout.precision(15); fout.precision(15);
for (size_t j=0; j<mesh.numberOfCells(); ++j) { for (size_t j=0; j<mesh.numberOfCells(); ++j) {
fout << xj[j][0] << ' ' << rhoj[j] << ' ' << std::sqrt((3.*((xj[j][0]*xj[j][0])/(h*h)) + 100.)/100.)/h << '\n'; // kidder fout << xj[j][0] << ' ' << rhoj[j] << ' ' << std::sqrt((3.*((xj[j][0]*xj[j][0])/(h*h)) + 100.)/100.)/h << '\n'; // kidder
...@@ -625,7 +625,7 @@ int main(int argc, char *argv[]) ...@@ -625,7 +625,7 @@ int main(int argc, char *argv[])
const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> xj = mesh_data.xj();
const Kokkos::View<const Rd*> uj = unknowns.uj(); const Kokkos::View<const Rd*> uj = unknowns.uj();
double pi = 4.*std::atan(1.); double pi = 4.*std::atan(1.);
std::ofstream fout("u1600"); std::ofstream fout("u");
fout.precision(15); fout.precision(15);
for (size_t j=0; j<mesh.numberOfCells(); ++j) { for (size_t j=0; j<mesh.numberOfCells(); ++j) {
...@@ -642,7 +642,7 @@ int main(int argc, char *argv[]) ...@@ -642,7 +642,7 @@ int main(int argc, char *argv[])
const Kokkos::View<const double*> Ej = unknowns.Ej(); const Kokkos::View<const double*> Ej = unknowns.Ej();
//double pi = 4.*std::atan(1.); //double pi = 4.*std::atan(1.);
double h = std::sqrt(1. - (tmax*tmax)/(50./9.)); double h = std::sqrt(1. - (tmax*tmax)/(50./9.));
std::ofstream fout("E1600"); std::ofstream fout("E");
fout.precision(15); fout.precision(15);
for (size_t j=0; j<mesh.numberOfCells(); ++j) { for (size_t j=0; j<mesh.numberOfCells(); ++j) {
......
...@@ -192,7 +192,6 @@ private: ...@@ -192,7 +192,6 @@ private:
m_Gl(0) = -(t/((50./9.)-t*t))*h*Fl(0,0)*x0(0); m_Gl(0) = -(t/((50./9.)-t*t))*h*Fl(0,0)*x0(0);
m_Gl(m_mesh.numberOfFaces()-1) = -(t/((50./9.)-t*t))*h*Fl(m_mesh.numberOfFaces()-1,0)*xmax(0); m_Gl(m_mesh.numberOfFaces()-1) = -(t/((50./9.)-t*t))*h*Fl(m_mesh.numberOfFaces()-1,0)*xmax(0);
return m_Gl ; return m_Gl ;
} }
...@@ -239,14 +238,20 @@ private: ...@@ -239,14 +238,20 @@ private:
}); });
// Conditions aux bords // Conditions aux bords
/*
int cell_here = face_cells(0,0); int cell_here = face_cells(0,0);
m_Bl(0) = (nuL(0) + nuj(cell_here))*(1./(2*Vl(0)))*(Tj(cell_here) - TL(0)); m_Bl(0) = (nuL(0) + nuj(cell_here))*(1./(2*Vl(0)))*(Tj(cell_here) - TL(0));
cell_here = face_cells(m_mesh.numberOfFaces()-1,0); cell_here = face_cells(m_mesh.numberOfFaces()-1,0);
m_Bl(m_mesh.numberOfFaces()-1) = -(nuR(0) + nuj(cell_here))*(1/(2.*Vl(m_mesh.numberOfFaces()-1)))*(Tj(cell_here) - TR(0)); m_Bl(m_mesh.numberOfFaces()-1) = -(nuR(0) + nuj(cell_here))*(1/(2.*Vl(m_mesh.numberOfFaces()-1)))*(Tj(cell_here) - TR(0));
*/
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);
return m_Bl ; return m_Bl ;
} }
...@@ -413,8 +418,16 @@ public: ...@@ -413,8 +418,16 @@ public:
//TR(0) = 2-0.5*pi*pi*(std::exp(-2.*t)-1.); //TR(0) = 2-0.5*pi*pi*(std::exp(-2.*t)-1.);
// Kidder // Kidder
TL(0) = (1./(100*h*h))*((3.*x0[0][0]*x0[0][0])/(h*h) + 100.); /*
TR(0) = (1./(100*h*h))*((3.*xmax[0][0]*xmax[0][0])/(h*h) + 100.); TL(0) = (1./(100*h*h))*((3.*h*x0[0][0]*h*x0[0][0])/(h*h) + 100.);
TR(0) = (1./(100*h*h))*((3.*h*xmax[0][0]*h*xmax[0][0])/(h*h) + 100.);
nuL(0) = (h*x0[0][0]+1.)*0.5;
nuR(0) = (h*xmax[0][0]+1.)*0.5;
uL[0] = (-h*x0[0][0]*t)/((50./9.)-t*t);
uR[0] = (-h*xmax[0][0]*t)/((50./9.)-t*t);
kL[0] = h*x0[0][0];
kR[0] = h*xmax[0][0] ;
*/
// Calcule les flux // Calcule les flux
computeExplicitFluxes(uj, Cjr, kj, uL, uR, kL, kR, Tj, nuj, TL, TR, nuL, nuR, t); computeExplicitFluxes(uj, Cjr, kj, uL, uR, kL, kR, Tj, nuj, TL, TR, nuL, nuR, t);
...@@ -431,8 +444,8 @@ public: ...@@ -431,8 +444,8 @@ public:
// Mise a jour de la vitesse et de l'energie totale specifique // Mise a jour de la vitesse et de l'energie totale specifique
const Kokkos::View<const double*> inv_mj = unknowns.invMj(); const Kokkos::View<const double*> inv_mj = unknowns.invMj();
Kokkos::parallel_for(m_mesh.numberOfCells()-2, KOKKOS_LAMBDA(const int& j0) { Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j) {
const int j = j0+1; //const int j = j0+1;
Rd momentum_fluxes = zero; Rd momentum_fluxes = zero;
double energy_fluxes = 0.; double energy_fluxes = 0.;
Rd trich = zero; Rd trich = zero;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment