Skip to content

Commit 8af4397

Browse files
authoredJan 7, 2021
Merge pull request #340 from STEllAR-GROUP/modify_rot_star
Changed the ambient medium density and energy
2 parents 3f12e67 + c65e08f commit 8af4397

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎src/test_problems/rotating_star/rotating_star.cpp

+11-4
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,20 @@ std::vector<real> rotating_star(real x, real y, real z, real dx) {
101101
const real fgamma = 5.0 / 3.0;
102102
rs.state_at(u[rho_i], u[egas_i], u[sx_i], u[sy_i], x, y, z);
103103
// u[egas_i] = (1.681244e-01) * std::pow(u[rho_i],fgamma) / (fgamma-1.0);
104-
u[rho_i] = std::max(u[rho_i], 1.0e-15);
105-
u[egas_i] = std::max(u[egas_i], 1.0e-15);
104+
u[rho_i] = std::max(u[rho_i], 1.0e-10);
105+
u[egas_i] = std::max(u[egas_i], 1.0e-10);
106106
u[tau_i] = std::pow(u[egas_i], 1.0 / fgamma);
107107
u[egas_i] += 0.5 * (std::pow(u[sx_i], 2) + std::pow(u[sy_i], 2)) / u[rho_i];
108+
u[spc_i] = u[rho_i];
109+
if (u[rho_i] > 1.0e-10) {
110+
u[spc_i + 1] = 0.0;
111+
} else {
112+
u[spc_i] = 0.0;
113+
u[spc_i + 1] = u[rho_i];
114+
}
108115
// if( u[rho_i] < 0.5 ) {
109-
u[spc_i + 1] = u[rho_i];
110-
u[spc_i + 0] = 0;
116+
// u[spc_i + 1] = u[rho_i];
117+
// u[spc_i + 0] = 0;
111118
// } else {
112119
// u[spc_i + 0] = u[rho_i];
113120
// u[spc_i + 1] = 0;

0 commit comments

Comments
 (0)
Please sign in to comment.