Skip to content

Commit

Permalink
Update pyrocky project with the latest stubs (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-B-Moreira authored Nov 19, 2024
1 parent 1eb3190 commit a058a72
Show file tree
Hide file tree
Showing 16 changed files with 189 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ class RAFeedConveyor(RABaseConveyor, ElementWithAddins):
def GetSphBoundaryType(self) -> str: ...
def SetSphBoundaryType(self, value: str) -> None: ...
def GetValidSphBoundaryTypeValues(self) -> List[str]: ...
def GetSurfaceTensionContactAngle(self, unit: Optional[str] = ...) -> float: ...
def SetSurfaceTensionContactAngle(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
def GetMaterial(self): ...
def SetMaterial(self, value) -> None: ...
def GetAvailableMaterials(self): ...
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ class RAReceivingConveyor(RABaseConveyor, ElementWithAddins):
def GetSphBoundaryType(self) -> str: ...
def SetSphBoundaryType(self, value: str) -> None: ...
def GetValidSphBoundaryTypeValues(self) -> List[str]: ...
def GetSurfaceTensionContactAngle(self, unit: Optional[str] = ...) -> float: ...
def SetSurfaceTensionContactAngle(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
def GetMaterial(self): ...
def SetMaterial(self, value) -> None: ...
def GetAvailableMaterials(self): ...
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# SOFTWARE.

from collections.abc import Sequence
from typing import NamedTuple, Union
from typing import Union

from rocky30.plugins.addins.model.addin_manager import AddinManager as AddinManager
from rocky30.plugins.addins.model.property_set import PropertyEntry as PropertyEntry
Expand All @@ -37,9 +37,15 @@ from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_addin_process import (
RAModuleOutput as RAModuleOutput,
)

class ModulePropertyIdentifier(NamedTuple):
class ModulePropertyIdentifier:
name: str
modules: set[str]
all_captions: dict[str, str]
def __init__(self, name, modules, all_captions) -> None: ...
def __lt__(self, other): ...
def __le__(self, other): ...
def __gt__(self, other): ...
def __ge__(self, other): ...

class ElementWithAddins:
def GetModuleProperties(self) -> Sequence[ModulePropertyIdentifier]: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_divisions_tagging import
from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_grid_process_element import (
RAGridProcessElementItem as RAGridProcessElementItem,
)
from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_residence_time import (
RAResidenceTime as RAResidenceTime,
)
from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_sph_tagging import (
RASPHTagging as RASPHTagging,
)
Expand All @@ -86,7 +89,7 @@ class RACalculations(ApiElementItem):
@classmethod
def GetClassName(self) -> str: ...
def CreateSelectionResidenceTime(
self, selection: RAGridProcessElementItem
self, selection: Union[RAGridProcessElementItem, str]
) -> ParticlesSelectionCalculator: ...
def CreateSelectionFlipCount(
self, selection: RAGridProcessElementItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class RACustomCurveAndGridProperty:
name: str,
curve_type: str = ...,
output_unit: str = ...,
domain: str = ...,
scope: str = ...,
sources: Union[dict[str, str], None] = ...,
expression: str = ...,
Expand Down Expand Up @@ -70,3 +69,13 @@ class RACustomCurveAndGridProperty:
expression: Union[str, None] = ...,
) -> None: ...
def RemoveCustomProperty(self, name: str) -> None: ...

class RACustomCurveParameters:
variable_to_association_and_unit: Incomplete
output_quantity: Incomplete
domain_association: Incomplete
def __init__(
self,
process: RACustomCurveAndGridProperty,
sources: Union[dict[str, str], None] = ...,
) -> None: ...
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ class RAFluentTwoWayCoupling(RABaseCFDCoupling):
def GetAveragingMethod(self) -> str: ...
def SetAveragingMethod(self, value: str): ...
def GetValidAveragingMethodValues(self) -> List[str]: ...
def GetMinimumIterations(self) -> int: ...
def SetMinimumIterations(self, value: Union[str, int]) -> None: ...
def GetAveragingRadiusType(self) -> str: ...
def SetAveragingRadiusType(self, value: str) -> None: ...
def GetValidAveragingRadiusTypeValues(self) -> List[str]: ...
Expand All @@ -140,6 +142,10 @@ class RAFluentTwoWayCoupling(RABaseCFDCoupling):
def SetCouplingFilesKept(self, value: Union[str, int]) -> None: ...
def GetDecompositionFactor(self) -> float: ...
def SetDecompositionFactor(self, value: Union[str, float]) -> None: ...
def GetDiffusionCoefficient(self, unit: Optional[str] = ...) -> float: ...
def SetDiffusionCoefficient(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
def GetFluentAdditionalArgs(self) -> str: ...
def SetFluentAdditionalArgs(self, value: str) -> None: ...
def GetFluentExecutionMode(self) -> str: ...
Expand All @@ -155,10 +161,25 @@ class RAFluentTwoWayCoupling(RABaseCFDCoupling):
) -> None: ...
def GetMaximumResidualTolerance(self) -> float: ...
def SetMaximumResidualTolerance(self, value: Union[str, float]) -> None: ...
def GetMaximumTimeSteps(self) -> int: ...
def SetMaximumTimeSteps(self, value: Union[str, int]) -> None: ...
def GetMinimumTimeSteps(self) -> int: ...
def SetMinimumTimeSteps(self, value: Union[str, int]) -> None: ...
def GetNumberOfSubsteps(self) -> int: ...
def SetNumberOfSubsteps(self, value: Union[str, int]) -> None: ...
def GetNumberOfThreads(self) -> int: ...
def SetNumberOfThreads(self, value: Union[str, int]) -> None: ...
def GetOverwriteCfdUpdateDistance(self) -> bool: ...
def SetOverwriteCfdUpdateDistance(self, value: bool) -> None: ...
def GetMaximumVolumeFraction(self, unit: Optional[str] = ...) -> float: ...
def SetMaximumVolumeFraction(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
def GetBackDiffusion(self) -> bool: ...
def SetBackDiffusion(self, value: bool) -> None: ...
def EnableBackDiffusion(self) -> None: ...
def DisableBackDiffusion(self) -> None: ...
def IsBackDiffusionEnabled(self) -> bool: ...
def GetUseDatInitialization(self) -> bool: ...
def SetUseDatInitialization(self, value: bool) -> None: ...
def GetSubstepping(self) -> bool: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,42 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from pathlib import Path
from typing import Optional, Union

from rocky30.models.point_cloud.point_cloud import PointCloud as PointCloud

from ansys.rocky.core._api_stubs.rocky30.plugins.api.motion._with_movement_mixin import (
_WithMovementMixin,
)
from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_addins import (
ElementWithAddins as ElementWithAddins,
)
from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_api import (
RockyApiError as RockyApiError,
)
from ansys.rocky.core._api_stubs.rocky30.plugins.api.ra_grid_process_element import (
RAGridProcessElementItem as RAGridProcessElementItem,
)

class RAPointCloud(RAGridProcessElementItem, ElementWithAddins):
class RAPointCloud(RAGridProcessElementItem, ElementWithAddins, _WithMovementMixin):
@classmethod
def GetWrappedClass(self): ...
def GetWrappedClass(self) -> type[PointCloud]: ...
@classmethod
def GetClassName(self): ...
def GetFilePath(self): ...
def SetFilePath(self, file_path) -> None: ...
def GetClassName(self) -> str: ...
def GetFilePath(self) -> str: ...
def SetFilePath(self, file_path: Union[str, Path]) -> None: ...
def IsTransient(self) -> bool: ...
def GetEnablePeriodic(self) -> bool: ...
def SetEnablePeriodic(self, value: bool) -> None: ...
def EnablePeriodic(self) -> None: ...
def DisablePeriodic(self) -> None: ...
def IsPeriodicEnabled(self) -> bool: ...
def GetPeriodicStartTime(self, unit: Optional[str] = ...) -> float: ...
def SetPeriodicStartTime(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
def GetPeriodicStopTime(self, unit: Optional[str] = ...) -> float: ...
def SetPeriodicStopTime(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ from rocky30.process.user_process.cube_process_with_movement import (
from rocky30.process.user_process.cylinder_process_with_movement import (
CylinderProcessWithMovement as CylinderProcessWithMovement,
)
from rocky30.process.user_process.polyhedron_process_with_movement import (
PolyhedronProcessWithMovement as PolyhedronProcessWithMovement,
)
from sci20.plugins.api.api_process_element import SciApiProcessElementItem
from sci20.plugins.process.plane_process.plane_process_subject import PlaneProcessSubject
from sci20.plugins.process.polyhedron_process.polyhedron_process_subject import (
PolyhedronProcessSubject,
)

from ansys.rocky.core._api_stubs.rocky30.plugins.api._ra_orientation_mixin import (
_RAOrientationMixin,
Expand Down Expand Up @@ -179,13 +179,14 @@ class RAInspectorProcess(RAUserProcess):

class RAPolyhedronProcess(RAUserProcess, _WithMovementMixin, _RAOrientationMixin):
@classmethod
def GetWrappedClass(cls) -> type[PolyhedronProcessSubject]: ...
def GetWrappedClass(cls) -> type[PolyhedronProcessWithMovement]: ...
@classmethod
def GetClassName(cls) -> str: ...
def GetCenter(self, unit: Incomplete | None = ...) -> Tuple3F: ...
def SetCenter(
self, x: float, y: float, z: float, unit: Union[str, None] = ...
) -> None: ...
def GetCenterAfterMovement(self, timestep: int) -> Tuple3F: ...
def GetSize(self, unit: Union[str, None] = ...) -> Tuple3F: ...
def SetSize(
self, x: float, y: float, z: float, unit: Union[str, None] = ...
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from typing import Optional, Type, Union

from rocky30.plugins.particles_calculations.selection_residence_time_calculation import (
ParticlesSelectionResidenceTimeCalculator as ParticlesSelectionResidenceTimeCalculator,
)

from ansys.rocky.core._api_stubs.plugins10.plugins.api.api_element_item import (
ApiElementItem,
)

class RAResidenceTime(ApiElementItem):
@classmethod
def GetWrappedClass(self) -> Type[ParticlesSelectionResidenceTimeCalculator]: ...
@classmethod
def GetClassName(self) -> str: ...
def GetGridFunctionName(self) -> str: ...
def GetCalculatorName(self) -> str: ...
def GetNameMask(self) -> str: ...
def SetNameMask(self, value: str) -> None: ...
def GetStopTime(self, unit: Optional[str] = ...) -> float: ...
def SetStopTime(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
def GetStartTime(self, unit: Optional[str] = ...) -> float: ...
def SetStartTime(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class RAFluentSemiResolvedCoupling(ApiElementItem):
def GetFluentReleases(self) -> list[str]: ...
def GetFluentVersion(self) -> str: ...
def SetFluentVersion(self, fluent_version: str) -> None: ...
def GetConvergenceCriteria(self) -> float: ...
def SetConvergenceCriteria(self, value: Union[str, float]) -> None: ...
def GetCouplingFilesKept(self) -> int: ...
def SetCouplingFilesKept(self, value: Union[str, int]) -> None: ...
def GetFluentAdditionalArgs(self) -> str: ...
Expand All @@ -56,9 +54,5 @@ class RAFluentSemiResolvedCoupling(ApiElementItem):
def SetFluentOutputFrequencyMultiplier(self, value: Union[str, int]) -> None: ...
def GetFluentSolverProcesses(self) -> int: ...
def SetFluentSolverProcesses(self, value: Union[str, int]) -> None: ...
def GetIntegralCoefficient(self) -> float: ...
def SetIntegralCoefficient(self, value: Union[str, float]) -> None: ...
def GetProportionalCoefficient(self) -> float: ...
def SetProportionalCoefficient(self, value: Union[str, float]) -> None: ...
def GetUseDatInitialization(self) -> bool: ...
def SetUseDatInitialization(self, value: bool) -> None: ...
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ class RASimulatorRun(RAGridProcessElementItem):
def SetDisableTrianglesOnPeriodicBoundaries(self, value: bool) -> None: ...
def GetDragLimiterFactor(self) -> float: ...
def SetDragLimiterFactor(self, value: Union[str, float]) -> None: ...
def GetMoveCfdCellsWithRockyBoundaries(self) -> bool: ...
def SetMoveCfdCellsWithRockyBoundaries(self, value: bool) -> None: ...
def EnableMoveCfdCellsWithRockyBoundaries(self) -> None: ...
def DisableMoveCfdCellsWithRockyBoundaries(self) -> None: ...
def IsMoveCfdCellsWithRockyBoundariesEnabled(self) -> bool: ...
def GetFixedTimestep(self, unit: Optional[str] = ...) -> float: ...
def SetFixedTimestep(
self, value: Union[str, float], unit: Optional[str] = ...
Expand Down Expand Up @@ -165,6 +170,16 @@ class RASimulatorRun(RAGridProcessElementItem):
def SetUseArraysGrowthRate(self, value: bool) -> None: ...
def GetUseBreakageOverlapFactor(self) -> bool: ...
def SetUseBreakageOverlapFactor(self, value: bool) -> None: ...
def GetUse3RdPowerForCfdCgm(self) -> bool: ...
def SetUse3RdPowerForCfdCgm(self, value: bool) -> None: ...
def EnableUse3RdPowerForCfdCgm(self) -> None: ...
def DisableUse3RdPowerForCfdCgm(self) -> None: ...
def IsUse3RdPowerForCfdCgmEnabled(self) -> bool: ...
def GetUseDpmBlockingEffectForSinglePhaseSimulations(self) -> bool: ...
def SetUseDpmBlockingEffectForSinglePhaseSimulations(self, value: bool) -> None: ...
def EnableDpmBlockingEffectForSinglePhaseSimulations(self) -> None: ...
def DisableDpmBlockingEffectForSinglePhaseSimulations(self) -> None: ...
def IsDpmBlockingEffectForSinglePhaseSimulationsEnabled(self) -> bool: ...
def GetUseDragLimiterFactor(self) -> bool: ...
def SetUseDragLimiterFactor(self, value: bool) -> None: ...
def GetUseFixedTimestep(self) -> bool: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class RASPHSettings(RAGridProcessElementItem):
def GetKernelType(self) -> str: ...
def SetKernelType(self, value: str) -> None: ...
def GetValidKernelTypeValues(self) -> List[str]: ...
def GetLimitTurbulentViscosity(self) -> bool: ...
def SetLimitTurbulentViscosity(self, value: bool) -> None: ...
def GetMaximumExpectedVelocity(self, unit: Optional[str] = ...) -> float: ...
def SetMaximumExpectedVelocity(
self, value: Union[str, float], unit: Optional[str] = ...
Expand Down Expand Up @@ -136,6 +138,8 @@ class RASPHSettings(RAGridProcessElementItem):
def GetValidTurbulenceTypeValues(self) -> List[str]: ...
def GetTurbulentPrandtl(self) -> float: ...
def SetTurbulentPrandtl(self, value: Union[str, float]) -> None: ...
def GetTurbulentViscosityMaximumRatio(self) -> float: ...
def SetTurbulentViscosityMaximumRatio(self, value: Union[str, float]) -> None: ...
def GetUpdateCoupledDensity(self) -> bool: ...
def SetUpdateCoupledDensity(self, value: bool) -> None: ...
def GetUseParticlesNeighborsList(self) -> bool: ...
Expand Down
16 changes: 11 additions & 5 deletions src/ansys/rocky/core/_api_stubs/rocky30/plugins/api/ra_study.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
# SOFTWARE.

from collections.abc import Sequence
from typing import Any, Optional, Union
from typing import Any

from _typeshed import Incomplete
from barril.units import Scalar
from ben10.foundation.types_ import AsList as AsList
from coilib50.process import IProcess as IProcess
from coilib50.status.status_interface import IStatusMessage
from coilib50.subject import Subject as Subject
Expand Down Expand Up @@ -65,6 +66,9 @@ from ansys.rocky.core._api_stubs.rocky30.plugins.api.conveyors.ra_feed_conveyor
from ansys.rocky.core._api_stubs.rocky30.plugins.api.conveyors.ra_receiving_conveyor import (
RAReceivingConveyor as RAReceivingConveyor,
)
from ansys.rocky.core._api_stubs.rocky30.plugins.api.motion.ra_motion_frame import (
RAMotionFrame as RAMotionFrame,
)
from ansys.rocky.core._api_stubs.rocky30.plugins.api.motion.ra_motion_frame_source import (
RAMotionFrameSource as RAMotionFrameSource,
)
Expand Down Expand Up @@ -167,10 +171,11 @@ from ansys.rocky.core._api_stubs.rocky30.plugins.api.rocky_api_deprecated_decora
ApiDeprecated as ApiDeprecated,
)

RAMaterialOrName = Union[RASolidMaterial, str]
RAMaterialOrName: Incomplete
Status = dict[str, Sequence[tuple[IStatusMessage, str]]]
Particle = Optional[Union[RAParticle, list[RAParticle]]]
ParticleInletExtensions = list[tuple[str, Union[float, Scalar]]]
Particle: Incomplete
ParticleInletExtensions: Incomplete
PeriodicMotionExtensions: Incomplete

class RAStudy(ApiElementItem):
@classmethod
Expand Down Expand Up @@ -362,7 +367,8 @@ class RAStudy(ApiElementItem):
extension_amount: Union[float, Scalar] = ...,
time: Union[int, TimeStep, None] = ...,
inlet_extensions: Union[ParticleInletExtensions, None] = ...,
): ...
periodic_motion_extensions: Union[PeriodicMotionExtensions, None] = ...,
) -> None: ...
def GetTimeSet(self) -> TimeSet: ...
def SetVariable(self, name: str, value: float) -> None: ...
STATUS_ERROR: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class RASystemCouplingWall(RABaseGeometry, _WithMovementMixin):
def EnableStructuralCouplingType(self) -> None: ...
def DisableStructuralCouplingType(self) -> None: ...
def IsStructuralCouplingTypeEnabled(self) -> bool: ...
def GetSurfaceTensionContactAngle(self, unit: Optional[str] = ...) -> float: ...
def SetSurfaceTensionContactAngle(
self, value: Union[str, float], unit: Optional[str] = ...
) -> None: ...
def GetThermalCouplingTypeEnabled(self) -> bool: ...
def SetThermalCouplingTypeEnabled(self, value: bool) -> None: ...
def EnableThermalCouplingType(self) -> None: ...
Expand Down
Loading

0 comments on commit a058a72

Please sign in to comment.