:class:`SimulationDirect` ========================= .. py:class:: ansys.speos.core.simulation.SimulationDirect(project, name, description = '', metadata = None, simulation_instance = None, default_values = True) Bases: :py:obj:`BaseSimulation` Type 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** : :obj:`ansys.speos.core.project.Project` Project in which simulation shall be created. **name** : :class:`python:str` Name of the simulation. **description** : :class:`python:str` Description of the Simulation. By default, ``""``. **metadata** : :obj:`Optional`\[:obj:`Mapping`\[:class:`python:str`, :class:`python:str`]] Metadata of the feature. By default, ``{}``. **simulation_instance** : :obj:`ansys.api.speos.scene.v2.scene_pb2.Scene.SimulationInstance`, :obj:`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_values** : :ref:`bool ` Uses default values when True. .. !! processed by numpydoc !! .. py:currentmodule:: SimulationDirect Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~set_geom_distance_tolerance` - Set the geometry distance tolerance. * - :py:attr:`~set_max_impact` - Define a value to determine the maximum number of ray impacts during propagation. * - :py:attr:`~set_weight` - Activate weight. Highly recommended to fill. * - :py:attr:`~set_weight_none` - Deactivate weight. * - :py:attr:`~set_colorimetric_standard_CIE_1931` - Set the colorimetric standard to CIE 1931. * - :py:attr:`~set_colorimetric_standard_CIE_1964` - Set the colorimetric standard to CIE 1964. * - :py:attr:`~set_dispersion` - Activate/Deactivate the dispersion calculation. * - :py:attr:`~set_ambient_material_file_uri` - To define the environment in which the light will propagate (water, fog, smoke etc.). * - :py:attr:`~set_stop_condition_rays_number` - To stop the simulation after a certain number of rays were sent. * - :py:attr:`~set_stop_condition_duration` - To stop the simulation after a certain duration. * - :py:attr:`~set_automatic_save_frequency` - Define a backup interval (s). Import detail ------------- .. code-block:: python from ansys.speos.core.simulation import SimulationDirect Method detail ------------- .. py:method:: set_geom_distance_tolerance(value = 0.01) Set the geometry distance tolerance. :Parameters: **value** : :class:`python:float` Maximum distance in mm to consider two faces as tangent. By default, ``0.01``. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:int` The maximum number of impacts. By default, ``100``. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: set_weight() Activate weight. Highly recommended to fill. :Returns: :obj:`ansys.speos.core.simulation.BaseSimulation.Weight` Weight. .. !! processed by numpydoc !! .. py:method:: set_weight_none() Deactivate weight. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: set_colorimetric_standard_CIE_1931() Set the colorimetric standard to CIE 1931. 2 degrees CIE Standard Colorimetric Observer Data. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: set_colorimetric_standard_CIE_1964() Set the colorimetric standard to CIE 1964. 10 degrees CIE Standard Colorimetric Observer Data. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: set_dispersion(value = True) Activate/Deactivate the dispersion calculation. :Parameters: **value** : :ref:`bool ` Activate/Deactivate. By default, ``True``, means activate. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: set_ambient_material_file_uri(uri = '') To define the environment in which the light will propagate (water, fog, smoke etc.). :Parameters: **uri** : :class:`python:str` The ambient material, expressed in a .material file. By default, ``""``, means air as ambient material. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:int`, :obj:`optional` The number of rays to send. Or None if no condition about the number of rays. By default, ``200000``. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:int`, :obj:`optional` Duration requested (s). Or None if no condition about duration. By default, ``None``. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:int`, :obj:`optional` Backup interval (s). By default, ``1800``. :Returns: :obj:`ansys.speos.core.simulation.SimulationDirect` Direct simulation .. !! processed by numpydoc !!