Data exploration#

The SimAI client provides utilities to help you run a large number of predictions and postprocessings, explore your data, and gather insights from it.

Selections#

Selections enable you to manipulate a large number of geometries and boundary conditions simultaneously. They also allow you to easily run many predictions or postprocessings in parallel.

You create a selection by combining a list of geometries with a list of boundary conditions:

import ansys.simai.core
from ansys.simai.core.data.selections import Selection

simai = ansys.simai.core.from_config()
geometries = simai.geometries.list()[:4]
boundary_conditions = [dict(Vx=vx) for vx in [12.2, 12.4, 12.6]]
selection = Selection(geometries, boundary_conditions)

# run all predictions
selection.run_predictions()

# compute all global coefficients
selection.post.global_coefficients()

# get all results
all_selection_coefficients = [
    global_coefficients.data
    for global_coefficients in selection.post.global_coefficients()
]

To help build selections, the Sim AI client exposes two methods that are useful for different strategies:

For more information on selections and geometry exploration methods, see Selections and Geometries.

Sweeping#

The geometry.sweep method allows you to explore the surroundings of a given geometry, which can help with local optimization or gradient descent. This method, only for numerical metadata, finds geometries that have metadata closest to the candidate geometry.

geometry = simai.geometries.list()[0]
neighbour_geometries = geometry.sweep(sweep_variables=["height", "length"])

# with which a selection can be built:
selection = Selection(neighbour_geometries, [dict(Vx=13.4)])

Filtering geometries#

The GeometryDirectory.list method allows you to take a more brute-force approach. With this method, you can select large swaths of geometries with range filters.

from ansys.simai.core.data.types import Range

geometries = simai.geometries.list(filters={"SINK": Range(-5.1, -4.8)})