diff --git a/examples/Planetary/KelvinHelmholtz_2D/makeIC.py b/examples/Planetary/KelvinHelmholtz_2D/makeIC.py index c650f8301a4821a9b9ab2afd6f2d3bc312bd52c9..57f82ea9c4b750e804b1693bb18e56957fe8aac4 100644 --- a/examples/Planetary/KelvinHelmholtz_2D/makeIC.py +++ b/examples/Planetary/KelvinHelmholtz_2D/makeIC.py @@ -42,9 +42,9 @@ numPart2 = L2 * L2 L1 = int(sqrt(numPart2 / rho2 * rho1)) numPart1 = L1 * L1 -# print "N2 =", numPart2, "N1 =", numPart1 -# print "L2 =", L2, "L1 = ", L1 -# print "rho2 =", rho2, "rho1 =", (float(L1*L1)) / (float(L2*L2)) +print("N2 =", numPart2, "N1 =", numPart1) +print("L2 =", L2, "L1 = ", L1) +print("rho2 =", rho2, "rho1 =", (float(L1 * L1)) / (float(L2 * L2))) coords1 = zeros((numPart1, 3)) coords2 = zeros((numPart2, 3)) @@ -110,8 +110,8 @@ vel[:, 1] = ( omega0 * sin(4 * pi * coords[:, 0]) * ( - exp(-(coords[:, 1] - 0.25) ** 2 / (2 * sigma ** 2)) - + exp(-(coords[:, 1] - 0.75) ** 2 / (2 * sigma ** 2)) + exp(-((coords[:, 1] - 0.25) ** 2) / (2 * sigma ** 2)) + + exp(-((coords[:, 1] - 0.75) ** 2) / (2 * sigma ** 2)) ) ) @@ -155,5 +155,4 @@ ds[()] = ids.reshape((numPart, 1)) ds = grp.create_dataset("MaterialIDs", (numPart, 1), "i") ds[()] = mat.reshape((numPart, 1)) - fileOutput.close() diff --git a/src/hydro/Planetary/hydro.h b/src/hydro/Planetary/hydro.h index f0d94e1d8639cf9ae78738934325d4031e2774ab..0c7186a8358854e803a3e54efd406a6d39a3d4b6 100644 --- a/src/hydro/Planetary/hydro.h +++ b/src/hydro/Planetary/hydro.h @@ -472,6 +472,28 @@ __attribute__((always_inline)) INLINE static float hydro_signal_velocity( return ci + cj - beta * mu_ij; } +/** + * @brief returns the signal velocity + * + * @brief p the particle + */ +__attribute__((always_inline)) INLINE static float hydro_get_signal_velocity( + const struct part *restrict p) { + + return p->force.v_sig; +} + +/** + * @brief returns the div_v + * + * @brief p the particle + */ +__attribute__((always_inline)) INLINE static float hydro_get_div_v( + const struct part *restrict p) { + + return p->density.div_v; +} + /** * @brief Does some extra hydro operations once the actual physical time step * for the particle is known. diff --git a/src/hydro/Planetary/hydro_part.h b/src/hydro/Planetary/hydro_part.h index d5d7ab9890ec7f47e3c9b9e265fb60a5f8a24b1f..c82739355db5c82b3124002273c9429b87601c51 100644 --- a/src/hydro/Planetary/hydro_part.h +++ b/src/hydro/Planetary/hydro_part.h @@ -79,10 +79,10 @@ struct xpart { /*! Additional data used by the tracers */ struct tracers_xpart_data tracers_data; - /* Additional data used by the star formation */ + /*! Additional data used by the star formation */ struct star_formation_xpart_data sf_data; - /* Additional data used by the feedback */ + /*! Additional data used by the feedback */ struct feedback_part_data feedback_data; /*! Additional data used by the MHD scheme */