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

ajout second membre pour impulsion et energie dans diffusion pour kidder sol de ns

parent f79d1e8b
No related branches found
No related tags found
No related merge requests found
...@@ -176,7 +176,7 @@ int main(int argc, char *argv[]) ...@@ -176,7 +176,7 @@ int main(int argc, char *argv[])
} }
acoustic_solver.computeNextStep(t,dt_euler, unknowns); acoustic_solver.computeNextStep(t,dt_euler, unknowns);
t += dt_euler; t += dt_euler;
/*
// ETAPE 2 DU SPLITTING - DIFFUSION // ETAPE 2 DU SPLITTING - DIFFUSION
double dt_diff = 0.4*finite_volumes_diffusion.diffusion_dt(rhoj, kj); double dt_diff = 0.4*finite_volumes_diffusion.diffusion_dt(rhoj, kj);
...@@ -196,7 +196,7 @@ int main(int argc, char *argv[]) ...@@ -196,7 +196,7 @@ int main(int argc, char *argv[])
} }
std::cout << "diff : " << t_diff << std::endl; std::cout << "diff : " << t_diff << std::endl;
} }
*/
// DIFFUSION PURE // DIFFUSION PURE
......
...@@ -85,7 +85,6 @@ public: ...@@ -85,7 +85,6 @@ public:
} }
}); });
} }
*/ */
~Mesh() ~Mesh()
......
...@@ -278,6 +278,10 @@ public: ...@@ -278,6 +278,10 @@ public:
Kokkos::View<double*> kL = unknowns.kL(); Kokkos::View<double*> kL = unknowns.kL();
Kokkos::View<double*> kR = unknowns.kR(); Kokkos::View<double*> kR = unknowns.kR();
Kokkos::View<const Rd*> xr = m_mesh.xr();
uR[0] = (-t/((50./9.)-t*t))*xr[m_mesh.numberOfNodes()-1];
const Kokkos::View<const Rd*> xj = m_mesh_data.xj(); const Kokkos::View<const Rd*> xj = m_mesh_data.xj();
const Kokkos::View<const double*> Vj = m_mesh_data.Vj(); const Kokkos::View<const double*> Vj = m_mesh_data.Vj();
const Kokkos::View<const Rd**> Cjr = m_mesh_data.Cjr(); const Kokkos::View<const Rd**> Cjr = m_mesh_data.Cjr();
...@@ -307,8 +311,12 @@ public: ...@@ -307,8 +311,12 @@ public:
} }
uj[j] += (dt*inv_mj[j]) * momentum_fluxes; uj[j] += (dt*inv_mj[j]) * momentum_fluxes;
//uj[j] += std::exp(-t)*(dt*inv_mj[j])*Vj(j)*Sj(j) + (dt*inv_mj[j]) * momentum_fluxes; // test avec k non constant
Ej[j] += (dt*inv_mj[j]) * energy_fluxes; Ej[j] += (dt*inv_mj[j]) * energy_fluxes;
//uj[j] += std::exp(-t)*(dt*inv_mj[j])*Vj(j)*Sj(j) + (dt*inv_mj[j]) * momentum_fluxes; // test avec k non constant
// ajout second membre pour kidder (k non constant)
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)));
}); });
......
...@@ -236,14 +236,14 @@ public: ...@@ -236,14 +236,14 @@ public:
}); });
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){
m_kj[j] = 1.; m_kj[j] = xj[j][0];
}); });
// Conditions aux bords de Dirichlet sur u et k // Conditions aux bords de Dirichlet sur u et k
m_uL[0] = zero; m_uL[0] = zero;
m_uR[0] = zero; m_uR[0] = zero;
m_kL[0] = 1.; m_kL[0] = 0.;
m_kR[0] = 1.; m_kR[0] = 1.;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment