SimulationDirect#
- class ansys.speos.core.simulation.SimulationDirect(project, name, description='', metadata=None, simulation_instance=None, default_values=True)#
Bases:
BaseSimulationType of Simulation: Direct.
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 True, 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 200000 rays, with an automatic save frequency of 1800s.
- Parameters:
- project
ansys.speos.core.project.Project Project in which simulation shall be created.
- name
str Name of the simulation.
- description
str Description of the Simulation. By default,
"".- metadata
Optional[Mapping[str,str]] Metadata of the feature. By default,
{}.- simulation_instance
ansys.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_valuesbool
Uses default values when True.
- project
- Parameters:
Overview#
Set the geometry distance tolerance. |
|
Define a value to determine the maximum number of ray impacts during propagation. |
|
Activate weight. Highly recommended to fill. |
|
Deactivate weight. |
|
Set the colorimetric standard to CIE 1931. |
|
Set the colorimetric standard to CIE 1964. |
|
Activate/Deactivate the dispersion calculation. |
|
To define the environment in which the light will propagate (water, fog, smoke etc.). |
|
To stop the simulation after a certain number of rays were sent. |
|
To stop the simulation after a certain duration. |
|
Define a backup interval (s). |
|
Activate/Deactivate the generation of light expert file. |
|
Save feature: send the local data to the speos server database. |
Import detail#
from ansys.speos.core.simulation import SimulationDirect
Method detail#
- SimulationDirect.set_geom_distance_tolerance(value=0.01)#
Set the geometry distance tolerance.
- Parameters:
- value
float Maximum distance in mm to consider two faces as tangent. By default,
0.01.
- value
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_max_impact(value=100)#
Define a value to determine the maximum number of ray impacts during propagation.
When a ray has interacted N times with the geometry, the propagation of the ray stops.
- Parameters:
- value
int The maximum number of impacts. By default,
100.
- value
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_weight()#
Activate weight. Highly recommended to fill.
- Returns:
- SimulationDirect.set_weight_none()#
Deactivate weight.
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_colorimetric_standard_CIE_1931()#
Set the colorimetric standard to CIE 1931.
2 degrees CIE Standard Colorimetric Observer Data.
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_colorimetric_standard_CIE_1964()#
Set the colorimetric standard to CIE 1964.
10 degrees CIE Standard Colorimetric Observer Data.
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_dispersion(value=True)#
Activate/Deactivate the dispersion calculation.
- Parameters:
- valuebool
Activate/Deactivate. By default,
True, means activate.
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_ambient_material_file_uri(uri='')#
To define the environment in which the light will propagate (water, fog, smoke etc.).
- Parameters:
- uri
str The ambient material, expressed in a .material file. By default,
"", means air as ambient material.
- uri
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_stop_condition_rays_number(value=200000)#
To stop the simulation after a certain number of rays were sent.
Set None as value to have no condition about rays number.
- Parameters:
- value
int,optional The number of rays to send. Or None if no condition about the number of rays. By default,
200000.
- value
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_stop_condition_duration(value=None)#
To stop the simulation after a certain duration.
Set None as value to have no condition about duration.
- Parameters:
- value
int,optional Duration requested (s). Or None if no condition about duration. By default,
None.
- value
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_automatic_save_frequency(value=1800)#
Define a backup interval (s).
This option is useful when computing long simulations. But a reduced number of save operations naturally increases the simulation performance.
- Parameters:
- value
int,optional Backup interval (s). By default,
1800.
- value
- Returns:
ansys.speos.core.simulation.SimulationDirectDirect simulation
- SimulationDirect.set_light_expert(value=False, ray_number=10000000.0)#
Activate/Deactivate the generation of light expert file.
- Parameters:
- Returns:
ansys.speos.core.simulation.SimulationDirectInteractive simulation
- SimulationDirect.commit()#
Save feature: send the local data to the speos server database.
- Returns:
ansys.speos.core.simulation.SimulationDirectSimulation feature.