RACustomInput#
- class ansys.rocky.app.ra_custom_input.RACustomInput(id: str, model_id: str | None = None)#
Bases:
ansys.rocky.app.api_element_item.ApiElementItem,ansys.rocky.app.ra_addins.ElementWithAddins,ansys.rocky.app.motion._with_movement_mixin._WithMovementMixinRocky PrePost Scripting wrapper for a single Custom Input.
This wrapper class corresponds to an individual entry under the “Inputs” item on the project’s data tree. Particle inputs can be retrieved from the
RAStudyor theRAInletsOutletsCollectionvia:input_1 = study.GetElement('Custom Input <1>') input_2 = input_collection.GetParticleInput('Custom Input <2>')
Instances of
RACustomInputgives access to its two properties: The id of the Particle that will be used in the particle generation and the path of the csv file which will contain the information for each desired particle to be generated, such as, positioning, size, release time.
Overview#
Get the value of “File Path”. |
|
Set the path of the file that will be used to generate the particles |
|
Get the “Motion Frame”. |
|
Assign a Motion Frame to the custom input. |
|
Get all available Motion Frames. |
|
Get the value of “Default Temperature”. |
|
Set the value of “Default Temperature”. |
|
Get the value of “Name”. |
|
Set the value of “Name”. |
|
Get the “Particle”. |
|
Set the “Particle”. |
|
Get all available Particles. |
Import detail#
from ansys.rocky.app.ra_custom_input import RACustomInput
Method detail#
- classmethod RACustomInput.GetWrappedClass()#
- classmethod RACustomInput.GetClassName()#
- RACustomInput.SetFilePath(file_path) None#
Set the path of the file that will be used to generate the particles described on the content of the file.
The accepted file extensions are [“.csv”, “.xls”, “.xlsx”, “.xlsm”, “.xlsb”, “.odf”].
- Parameters:
file_path (str or Path)
- RACustomInput.GetMotionFrame()#
Get the “Motion Frame”.
- Return type:
RAMotionFrame
- RACustomInput.SetMotionFrame(motion_frame: ansys.rocky.app.motion.ra_motion_frame.RAMotionFrame | str | None) None#
Assign a Motion Frame to the custom input.
- Parameters:
motion_frame – Either the API object or its name.
- RACustomInput.GetAvailableMotionFrames()#
Get all available Motion Frames.
- Return type:
List[
RAMotionFrame] A list ofRAMotionFrame.
- RACustomInput.GetDefaultTemperature(unit: str | None = None) float#
Get the value of “Default Temperature”.
- Parameters:
unit – The unit for the returned value. If no unit is provided, the returned value will be in “K”.
- RACustomInput.SetDefaultTemperature(value: str | float, unit: str | None = None) None#
Set the value of “Default Temperature”.
- Parameters:
value – The value to set. This value can be an expression with input variables or float type.
unit – The unit for value. If no unit is provided, value is assumed to be in “K”.
- RACustomInput.SetName(value: str) None#
Set the value of “Name”.
- Parameters:
value – The value to set.
- RACustomInput.GetParticle()#
Get the “Particle”.
- Return type:
RAParticle
- RACustomInput.SetParticle(value) None#
Set the “Particle”.
- :param unicode,
RAParticlevalue: Either the API object wrapping the desired entity or its name.
- :param unicode,
- RACustomInput.GetAvailableParticles()#
Get all available Particles.
- Return type:
List[
RAParticle] A list ofRAParticle.