Simulation settings
The SimulationSettings object allows you to control advanced parameters related to the computation and post-processing applied by Treble during the simulation run-time. If no SimulationSetting object is provided to the simulation definition, default settings are used. All parameters included in the object are optional, and the object passed to the definition can included only one or several at once.
Property | Type | Description | Example value |
---|---|---|---|
speed_of_sound | float | The speed of sound in m/s for use in the simulations. Defaults to 343 m/s. | 344 |
ga_settings | GaSolverSettings | Settings specific to the GA solver. | |
ambisonics_order | int | Ambisonics order of spatial receivers, limited to the example values. | [1, 2, 4, 8, 16, 32] |
gpu_count | int | Sets the number of GPUs to allocate for each wave-solver task in the simulation. | 4 |
Customise the simulation settings
The following snippet changes some of the default settings, and adds GA-specific settings to the simulation definition.
sim_settings = treble.SimulationSettings(ambisonics_order=16,speed_of_sound=340, ga_settings=ga_settings)
# specify the settings in the simulation definition
sim_def = treble.SimulationDefinition(
name="My simulation",
simulation_type=treble.SimulationType.hybrid,
model=room,
crossover_frequency=720,
energy_decay_threshold=35,
receiver_list=receivers,
source_list=source,
material_assignment=material_assignment
simulation_settings=sim_settings
)