pttools.bubble.fluid_bag

Functions for fluid differential equations with the bag model

Now in parametric form (Jacky Lindsay and Mike Soughton MPhys project 2017-18). RHS is Eq (33) in Espinosa et al (plus \(\frac{dw}{dt}\) not written there)

Functions

pttools.bubble.fluid_bag.fluid_shell_alpha_plus(v_wall, alpha_plus, sol_type=SolutionType.UNKNOWN, n_xi=const.N_XI_DEFAULT, w_n=1., cs2_fun=bag.cs2_bag, df_dtau_ptr=integrate.DF_DTAU_BAG_PTR, sol_type_fun=None)

Finds the fluid shell profile (v, w, xi) from a given \(v_\text{wall}, \alpha_+\) (at-wall strength parameter). When \(v=0\) (behind and ahead of shell), this uses only two points.

Bag model only!

Parameters:
  • v_wall (float) – \(v_\text{wall}\)

  • alpha_plus (float) – \(\alpha_+\)

  • sol_type (SolutionType) – specify wall type if more than one permitted.

  • n_xi (int) – increase resolution

  • w_n (float) – specify enthalpy outside fluid shell

  • cs2_fun (Callable[[float | float64 | ndarray, float | float64 | ndarray], float | float64 | ndarray] | CPUDispatcher) – sound speed squared as a function of enthalpy, default

  • df_dtau_ptr ((float64, float64*, float64*, float64*) -> none*) – pointer to the differential equation function

  • sol_type_fun (callable)

Returns:

\(v, w, \xi\)

Return type:

Tuple[ndarray, ndarray, ndarray]

pttools.bubble.fluid_bag.fluid_shell_bag(v_wall, alpha_n, n_xi=const.N_XI_DEFAULT, cs2_fun=bag.cs2_bag_scalar, cs2_fun_ptr=bag.CS2_BAG_SCALAR_PTR, df_dtau_ptr=integrate.DF_DTAU_BAG_PTR)

Finds fluid shell \((v, w, \xi)\) from a given \(v_\text{wall}, \alpha_n\), which must be scalars.

Computes \(\alpha_+\) from \(\alpha_n\) and then calls fluid_shell_alpha_plus().

Assumes the bag model, but can also create rough approximations for other models.

Parameters:
  • v_wall (float) – \(v_\text{wall}\)

  • alpha_n (float) – \(\alpha_n\)

  • n_xi (int) – number of \(\xi\) points

  • cs2_fun (Callable[[float | float64 | ndarray, float | float64 | ndarray], float | float64 | ndarray] | CPUDispatcher)

  • cs2_fun_ptr ((float64, float64) -> float64*)

  • df_dtau_ptr ((float64, float64*, float64*, float64*) -> none*)

Returns:

\(v, w, \xi\) or alternatively \(v, w, \xi\), sol_type

Return type:

Tuple[ndarray, ndarray, ndarray]

pttools.bubble.fluid_bag.fluid_shell_dict(v_wall, alpha_n, Np=const.N_XI_DEFAULT, low_v_approx=False, high_v_approx=False)
Parameters:
  • v_wall (float)

  • alpha_n (float)

  • Np (int)

  • low_v_approx (bool)

  • high_v_approx (bool)

pttools.bubble.fluid_bag.sound_shell_alpha_plus(v_wall, alpha_plus, sol_type=SolutionType.UNKNOWN, n_xi=const.N_XI_DEFAULT, w_n=1., cs2_fun=bag.cs2_bag, df_dtau_ptr=integrate.DF_DTAU_BAG_PTR, sol_type_fun=None)

Finds the fluid shell profile (v, w, xi) from a given \(v_\text{wall}, \alpha_+\) (at-wall strength parameter). When \(v=0\) (behind and ahead of shell), this uses only two points.

Bag model only!

Parameters:
  • v_wall (float) – \(v_\text{wall}\)

  • alpha_plus (float) – \(\alpha_+\)

  • sol_type (SolutionType) – specify wall type if more than one permitted.

  • n_xi (int) – increase resolution

  • w_n (float) – specify enthalpy outside fluid shell

  • cs2_fun (Callable[[float | float64 | ndarray, float | float64 | ndarray], float | float64 | ndarray] | CPUDispatcher) – sound speed squared as a function of enthalpy, default

  • df_dtau_ptr ((float64, float64*, float64*, float64*) -> none*) – pointer to the differential equation function

  • sol_type_fun (callable)

Returns:

\(v, w, \xi\)

Return type:

Tuple[ndarray, ndarray, ndarray]

pttools.bubble.fluid_bag.sound_shell_bag(v_wall, alpha_n, n_xi=const.N_XI_DEFAULT, cs2_fun=bag.cs2_bag_scalar, cs2_fun_ptr=bag.CS2_BAG_SCALAR_PTR, df_dtau_ptr=integrate.DF_DTAU_BAG_PTR)

Finds fluid shell \((v, w, \xi)\) from a given \(v_\text{wall}, \alpha_n\), which must be scalars.

Computes \(\alpha_+\) from \(\alpha_n\) and then calls fluid_shell_alpha_plus().

Assumes the bag model, but can also create rough approximations for other models.

Parameters:
  • v_wall (float) – \(v_\text{wall}\)

  • alpha_n (float) – \(\alpha_n\)

  • n_xi (int) – number of \(\xi\) points

  • cs2_fun (Callable[[float | float64 | ndarray, float | float64 | ndarray], float | float64 | ndarray] | CPUDispatcher)

  • cs2_fun_ptr ((float64, float64) -> float64*)

  • df_dtau_ptr ((float64, float64*, float64*, float64*) -> none*)

Returns:

\(v, w, \xi\) or alternatively \(v, w, \xi\), sol_type

Return type:

Tuple[ndarray, ndarray, ndarray]

pttools.bubble.fluid_bag.sound_shell_dict(v_wall, alpha_n, Np=const.N_XI_DEFAULT, low_v_approx=False, high_v_approx=False)
Parameters:
  • v_wall (float)

  • alpha_n (float)

  • Np (int)

  • low_v_approx (bool)

  • high_v_approx (bool)