Skip to content

Commit

Permalink
Merge pull request #340 from STEllAR-GROUP/modify_rot_star
Browse files Browse the repository at this point in the history
Changed the ambient medium density and energy
  • Loading branch information
diehlpk committed Jan 7, 2021
2 parents 3f12e67 + c65e08f commit 8af4397
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/test_problems/rotating_star/rotating_star.cpp
Expand Up @@ -101,13 +101,20 @@ std::vector<real> rotating_star(real x, real y, real z, real dx) {
const real fgamma = 5.0 / 3.0;
rs.state_at(u[rho_i], u[egas_i], u[sx_i], u[sy_i], x, y, z);
// u[egas_i] = (1.681244e-01) * std::pow(u[rho_i],fgamma) / (fgamma-1.0);
u[rho_i] = std::max(u[rho_i], 1.0e-15);
u[egas_i] = std::max(u[egas_i], 1.0e-15);
u[rho_i] = std::max(u[rho_i], 1.0e-10);
u[egas_i] = std::max(u[egas_i], 1.0e-10);
u[tau_i] = std::pow(u[egas_i], 1.0 / fgamma);
u[egas_i] += 0.5 * (std::pow(u[sx_i], 2) + std::pow(u[sy_i], 2)) / u[rho_i];
u[spc_i] = u[rho_i];
if (u[rho_i] > 1.0e-10) {
u[spc_i + 1] = 0.0;
} else {
u[spc_i] = 0.0;
u[spc_i + 1] = u[rho_i];
}
// if( u[rho_i] < 0.5 ) {
u[spc_i + 1] = u[rho_i];
u[spc_i + 0] = 0;
// u[spc_i + 1] = u[rho_i];
// u[spc_i + 0] = 0;
// } else {
// u[spc_i + 0] = u[rho_i];
// u[spc_i + 1] = 0;
Expand Down

0 comments on commit 8af4397

Please sign in to comment.