Skip to content

Commit

Permalink
Add missing conformal factor in tau
Browse files Browse the repository at this point in the history
  • Loading branch information
dinatraykova committed Aug 5, 2024
1 parent 57ea33d commit 3bbb8c3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Examples/Fluid_Kerr_merged/ConservedQuantities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ void PtoC(const data_t P_of_rho, vars_t<data_t> &vars)
data_t hh = 1. + vars.eps + P_of_rho / vars.rho;

data_t rho_conformal = vars.rho / pow(chi_regularised, 1.5);
data_t P_conformal = P_of_rho / pow(chi_regularised, 1.5);

vars.D = rho_conformal * sqrt(WW);
vars.tau = rho_conformal * hh * WW - P_of_rho - vars.D;
vars.tau = rho_conformal * hh * WW - P_conformal - vars.D;

// S_j (note lower index) = - n^a T_ai
FOR(i) { vars.Sj[i] = rho_conformal * hh * WW * vi_D[i]; }
Expand Down
3 changes: 2 additions & 1 deletion Examples/Fluid_Kerr_merged/Fluxes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ vars_t<data_t> compute_flux(const data_t P_of_rho, const vars_t<data_t> &vars,
data_t hh = 1. + vars.eps + P_of_rho / vars.rho;

data_t rho_conformal = vars.rho / pow(vars.chi, 1.5);
data_t P_conformal = P_of_rho / pow(chi_regularised, 1.5);

FOR(j)
{
out.Sj[j] =
vars.lapse * rho_conformal * hh * WW * vars.vi[idir] * vi_D[j] -
vars.shift[idir] * vars.Sj[j];
FOR(k)
out.Sj[j] += vars.lapse * P_of_rho * h_UU[idir][k] * vars.h[j][k];
out.Sj[j] += vars.lapse * P_conformal * h_UU[idir][k] * vars.h[j][k];
}

out.tau = vars.lapse * (Sj_U[idir] - vars.D * vars.vi[idir]) -
Expand Down
3 changes: 2 additions & 1 deletion Examples/Fluid_Kerr_merged/InitialFluidData.impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ void InitialFluidData::compute(Cell<data_t> current_cell) const
data_t hh = 1. + matter_vars.eps + P_of_rho / matter_vars.rho;

data_t rho_conformal = matter_vars.rho / pow(chi_regularised, 1.5);
data_t P_conformal = P_of_rho / pow(chi_regularised, 1.5);

matter_vars.D = rho_conformal * sqrt(WW);
matter_vars.tau = rho_conformal * hh * WW - P_of_rho - matter_vars.D;
matter_vars.tau = rho_conformal * hh * WW - P_conformal - matter_vars.D;

FOR(i)
{
Expand Down
5 changes: 3 additions & 2 deletions Examples/Fluid_Kerr_merged/Sources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ vars_t<data_t> compute_source(const data_t P_of_rho, const vars_t<data_t> &vars,
data_t hh = 1. + vars.eps + P_of_rho / vars.rho;

data_t rho_conformal = vars.rho / pow(chi_regularised, 1.5);
data_t P_conformal = P_of_rho / pow(chi_regularised, 1.5);

out.D = 0.;
FOR(j)
Expand All @@ -44,7 +45,7 @@ vars_t<data_t> compute_source(const data_t P_of_rho, const vars_t<data_t> &vars,
vars.h[i][k] * d1.chi[j] / chi_regularised) *
(rho_conformal * hh * WW * vars.vi[i] *
vars.vi[k] / chi_regularised +
P_of_rho * h_UU[i][k]);
P_conformal * h_UU[i][k]);
}
}
}
Expand All @@ -54,7 +55,7 @@ vars_t<data_t> compute_source(const data_t P_of_rho, const vars_t<data_t> &vars,
out.tau += vars.lapse * (vars.A[i][j] + vars.h[i][j] / 3. * vars.K) *
(rho_conformal * hh * WW * vars.vi[i] * vars.vi[j] /
chi_regularised +
P_of_rho * h_UU[i][j]) -
P_conformal * h_UU[i][j]) -
vars.chi * h_UU[i][j] * vars.Sj[i] * d1.lapse[j];
}

Expand Down

0 comments on commit 3bbb8c3

Please sign in to comment.