SimulationInverse#

class ansys.speos.core.simulation.SimulationInverse(project, name, description='', metadata=None, simulation_instance=None, default_parameters=None)#

Bases: BaseSimulation

Type of simulation : Inverse.

By default, geometry distance tolerance is set to 0.01, maximum number of impacts is set to 100, colorimetric standard is set to CIE 1931, dispersion is set to False, splitting is set to False, number of gathering rays per source is set to 1, maximum gathering error is set to 0, fast transmission gathering is set to False, ambient material URI is empty, and weight’s minimum energy percentage is set to 0.005. By default, the simulation will stop after 5 passes, with an automatic save frequency of 1800s.

Parameters:
projectansys.speos.core.project.Project

Project in which simulation shall be created.

namestr

Name of the simulation.

descriptionstr

Description of the Simulation. By default, "".

metadataOptional[Mapping[str, str]]

Metadata of the feature. By default, {}.

simulation_instanceansys.api.speos.scene.v2.scene_pb2.Scene.SimulationInstance, optional

Simulation instance to provide if the feature does not have to be created from scratch By default, None, means that the feature is created from scratch by default.

default_parametersansys.speos.core.generic.parameters.InverseSimulationParameters, optional

If defined the values in the inverse simulation instance will be overwritten by the values of the data class.

Parameters:

Notes

Three exclusive optimized propagation modes are available. The relative and absolute optimized propagation modes require Speos 2025 R1 SP1 or higher and are only compatible with radiance sensors.

Overview#

set_weight

Activate weight. Highly recommended to fill.

set_weight_none

Deactivate weight.

set_colorimetric_standard_CIE_1931

Set the colorimetric standard to CIE 1931.

set_colorimetric_standard_CIE_1964

Set the colorimetric standard to CIE 1964.

set_optimized_propagation_relative

Set the optimized propagation relative stop condition.

set_optimized_propagation_absolute

Set the optimized propagation absolute stop condition.

commit

Save feature: send the local data to the speos server database.

timeline

Switch to enable/disable the simulation timeline.

start_time

Timeline start time (s).

dispersion

Activate/Deactivate the dispersion calculation.

splitting

Activate/Deactivate the splitting.

number_of_gathering_rays_per_source

The number of gathering rays per source.

maximum_gathering_error

The maximum gathering error.

fast_transmission_gathering

Activate/Deactivate the fast transmission gathering.

ambient_material_file_uri

The ambient material file URI.

stop_condition_passes_number

To stop the simulation after a certain number of passes.

stop_condition_duration

The duration to stop the simulation.

automatic_save_frequency

The automatic save frequency.

light_expert

Whether light expert is enabled.

Import detail#

from ansys.speos.core.simulation import SimulationInverse

Property detail#

property SimulationInverse.timeline: bool#

Switch to enable/disable the simulation timeline.

Returns:
bool

State of timeline activation.

property SimulationInverse.start_time: float | None#

Timeline start time (s).

Returns:
Optional[float]

the start time (s) of the simulation timeline, or None to disable timeline

property SimulationInverse.dispersion: bool#

Activate/Deactivate the dispersion calculation.

Returns:
bool

True if dispersion is activated.

property SimulationInverse.splitting: bool#

Activate/Deactivate the splitting.

To split each propagated ray into several paths at their first impact after leaving the observer point.

Parameters:
valuebool

Activate/Deactivate. By default, False, means deactivate.

Returns:
ansys.speos.core.simulation.SimulationInverse

Inverse simulation

property SimulationInverse.number_of_gathering_rays_per_source: int#

The number of gathering rays per source.

Returns:
int

The number of gathering rays per source.

property SimulationInverse.maximum_gathering_error: int#

The maximum gathering error.

Returns:
int

The maximum gathering error.

property SimulationInverse.fast_transmission_gathering: bool#

Activate/Deactivate the fast transmission gathering.

To accelerate the simulation by neglecting the light refraction that occurs when the light is being transmitted through a transparent surface.

The geometries on which the fast transmission gathering is applied are defined at project level with ansys.speos.core.project.Project.create_fast_transmission_gathering().

Returns:
bool

True if the fast transmission gathering is activated.

Notes

Activating this property has no effect if no geometry is selected in the project fast transmission gathering feature.

property SimulationInverse.ambient_material_file_uri: str#

The ambient material file URI.

Returns:
str

The ambient material file URI.

property SimulationInverse.stop_condition_passes_number: int | None#

To stop the simulation after a certain number of passes.

Set None as value to have no condition about passes.

Parameters:
valueint, optional

The number of passes requested. Or None if no condition about passes. By default, 5.

Returns:
int
property SimulationInverse.stop_condition_duration: int | None#

The duration to stop the simulation.

Returns:
Optional[int]

The duration in seconds, or None if no condition.

property SimulationInverse.automatic_save_frequency: int#

The automatic save frequency.

This option is useful when computing long simulations. But a reduced number of save operations naturally increases the simulation performance.

Returns:
int

The save frequency in seconds.

property SimulationInverse.light_expert: bool#

Whether light expert is enabled.

Returns:
bool

True if light expert is enabled.

Method detail#

SimulationInverse.set_weight()#

Activate weight. Highly recommended to fill.

Returns:
ansys.speos.core.simulation.BaseSimulation.Weight

Weight

SimulationInverse.set_weight_none()#

Deactivate weight.

Returns:
ansys.speos.core.simulation.SimulationInverse

Inverse simulation

SimulationInverse.set_colorimetric_standard_CIE_1931()#

Set the colorimetric standard to CIE 1931.

2 degrees CIE Standard Colorimetric Observer Data.

Returns:
ansys.speos.core.simulation.SimulationInverse

Inverse simulation

SimulationInverse.set_colorimetric_standard_CIE_1964()#

Set the colorimetric standard to CIE 1964.

10 degrees CIE Standard Colorimetric Observer Data.

Returns:
ansys.speos.core.simulation.SimulationInverse

Inverse simulation

SimulationInverse.set_optimized_propagation_relative()#

Set the optimized propagation relative stop condition.

The algorithm adapts the number of passes per pixel to send the optimal number of rays according to the signal each pixel needs.

Returns:
ansys.speos.core.simulation.SimulationInverse.OptimizedPropagationRelative

Optimized propagation relative stop condition.

Notes

Selecting this mode discards any other optimized propagation mode previously set, including stop_condition_passes_number. Default values are applied only the first time this mode is selected, subsequent calls return the stop condition with its current values. Starting from 271, the job information used by optimized propagation is kept in the job template.

SimulationInverse.set_optimized_propagation_absolute()#

Set the optimized propagation absolute stop condition.

The algorithm adapts the number of passes per pixel to send the optimal number of rays according to the signal each pixel needs.

Returns:
ansys.speos.core.simulation.SimulationInverse.OptimizedPropagationAbsolute

Optimized propagation absolute stop condition.

Notes

Selecting this mode discards any other optimized propagation mode previously set, including stop_condition_passes_number. Default values are applied only the first time this mode is selected, subsequent calls return the stop condition with its current values. Starting from 271, the job information used by optimized propagation is kept in the job template.

SimulationInverse.commit()#

Save feature: send the local data to the speos server database.

Returns:
ansys.speos.core.simulation.SimulationInverse

Simulation feature.

Classes#

SourceSampling

Disabled - Setting source sampling is not available for this simulation type.

OptimizedPropagationRelative

Optimized propagation using a relative pixel standard deviation stop condition.

OptimizedPropagationAbsolute

Optimized propagation using an absolute pixel standard deviation stop condition.