shamrock.model_sph.SPHModel_f64_3_C4_SPHSetup#
- class shamrock.model_sph.SPHModel_f64_3_C4_SPHSetup#
Bases:
pybind11_objectMethods
Create a Monte Carlo disc particle generator.
- apply_setup(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, setup: shammodels::sph::modules::ISPHSetupNode, *, part_reordering: bool = True, gen_step: Optional[int] = None, insert_step: Optional[int] = None, msg_count_limit: Optional[int] = None, rank_comm_size_limit: Optional[int] = None, max_msg_size: Optional[int] = None, do_setup_log: bool = False, use_new_setup: bool = True, speculative_balancing: bool = False) None#
- make_combiner_add(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, arg0: shammodels::sph::modules::ISPHSetupNode, arg1: shammodels::sph::modules::ISPHSetupNode) shammodels::sph::modules::ISPHSetupNode#
- make_generator_disc_mc(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, *, part_mass: float, disc_mass: float, r_in: float, r_out: float, sigma_profile: Callable[[float], float], H_profile: Callable[[float], float], rot_profile: Callable[[float], float] = None, cs_profile: Callable[[float], float] = None, velocity_field: Callable[[f64_3], f64_3] = None, cs_field: Callable[[f64_3], float] = None, random_seed: int, init_h_factor: float = 0.8) shammodels::sph::modules::ISPHSetupNode#
Create a Monte Carlo disc particle generator.
Particles are sampled in cylindrical coordinates: the radius is drawn with rejection sampling from
sigma_profile, the azimuth is uniform, and the vertical coordinate follows a Gaussian with scaleH_profile(r). The initial density is extrapolated from the surface density profile, and smoothing lengths are set from that density.- Args:
part_mass: Mass of each SPH particle. disc_mass: Total disc mass. The particle count is
disc_mass / part_mass. r_in: Inner disc radius. r_out: Outer disc radius. sigma_profile: Surface density profilesigma(r). H_profile: Disc scale height profileH(r). rot_profile: Azimuthal speed profilev_theta(r). The velocity isprojected along the cylindrical azimuthal direction at each particle position. Mutually exclusive with
velocity_field.- cs_profile: Sound speed profile
c_s(r). Evaluated at the cylindrical radius of each particle. Required when the solver uses a locally isothermal EOS. Mutually exclusive with
cs_field.- velocity_field: Velocity profile
v(x, y, z). Mutually exclusive with
rot_profile.- cs_field: Sound speed profile
c_s(x, y, z). Required when the solver uses a locally isothermal EOS. Mutually exclusive with
cs_profile.
random_seed: Seed for the Monte Carlo sampler. init_h_factor: Multiplier applied to the smoothing length inferred from
the generated density. Defaults to
0.8.- cs_profile: Sound speed profile
- Notes:
Exactly one of
velocity_fieldorrot_profilemust be provided.If the solver uses a locally isothermal EOS, exactly one of
cs_fieldorcs_profilemust be provided. Otherwise both sound-speed profiles are ignored and a warning is emitted if either is supplied.- Returns:
A setup node to pass to
apply_setup().
- make_generator_from_context(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, arg0: shamrock.pyshamrock.Context) shammodels::sph::modules::ISPHSetupNode#
- make_generator_lattice_cubic(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, arg0: float, arg1: f64_3, arg2: f64_3) shammodels::sph::modules::ISPHSetupNode#
- make_generator_lattice_hcp(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, dr: float, box_min: f64_3, box_max: f64_3, discontinuous: bool = True) shammodels::sph::modules::ISPHSetupNode#
- make_modifier_custom_warp(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, *, parent: shammodels::sph::modules::ISPHSetupNode, inc_profile: Callable[[float], float], psi_profile: Callable[[float], float], k_profile: Callable[[float], f64_3]) shammodels::sph::modules::ISPHSetupNode#
- make_modifier_filter(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, *, parent: shammodels::sph::modules::ISPHSetupNode, filter: Callable[[f64_3], bool]) shammodels::sph::modules::ISPHSetupNode#
- make_modifier_offset(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, *, parent: shammodels::sph::modules::ISPHSetupNode, offset_position: f64_3, offset_velocity: f64_3) shammodels::sph::modules::ISPHSetupNode#
- make_modifier_split_part(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, *, parent: shammodels::sph::modules::ISPHSetupNode, n_split: int, seed: int, h_scaling: float = 0.6) shammodels::sph::modules::ISPHSetupNode#
- make_modifier_warp_disc(self: shamrock.pyshamrock.model_sph.SPHModel_f64_3_C4_SPHSetup, *, parent: shammodels::sph::modules::ISPHSetupNode, Rwarp: float, Hwarp: float, inclination: float, posangle: float = 0.0) shammodels::sph::modules::ISPHSetupNode#