PointArray2D#

class PointArray2D[source]#

Bases: EntityBase

PointArray2D class for defining multiple equally spaced points along the u and v axes of a parallelogram.

Example

Define PointArray2D with points equally distributed on a parallelogram with origin (1.0, 0.0, 0.0) * fl.u.m. There are 7 equally spaced points along the parallelogram’s u-axis of (0.5, 1.0, 0.2) * fl.u.m and 10 equally spaced points along the its v-axis of (0.1, 0, 1) * fl.u.m.

Both the starting and end points are included in the PointArray.

>>> fl.PointArray2D(
...     name="Parallelogram_1",
...     origin=(1.0, 0.0, 0.0) * fl.u.m,
...     u_axis_vector=(0.5, 1.0, 0.2) * fl.u.m,
...     v_axis_vector=(0.1, 0, 1) * fl.u.m,
...     u_number_of_points=7,
...     v_number_of_points=10
... )

Attributes

name: str#
origin: LengthType.Vector#

The corner of the parallelogram.

u_axis_vector: LengthType.Direction#

The scaled u-axis of the parallelogram.

v_axis_vector: LengthType.Direction#

The scaled v-axis of the parallelogram.

u_number_of_points: int#

The number of points along the u axis.

v_number_of_points: int#

The number of points along the v axis.

Properties

id: str#

Returns private_attribute_id of the entity.

Additional Constructors

classmethod from_file(filename)#

Loads a Flow360BaseModel from .json, or .yaml file.

Parameters:

filename (str) – Full path to the .yaml or .json file to load the Flow360BaseModel from.

Returns:

An instance of the component class calling load.

Return type:

Flow360BaseModel

Example

>>> params = Flow360BaseModel.from_file(filename='folder/sim.json') 

Methods

help(methods=False)#

Prints message describing the fields and methods of a Flow360BaseModel.

Parameters:

methods (bool = False) – Whether to also print out information about object’s methods.

Return type:

None

Example

>>> params.help(methods=True) 
to_file(filename, **kwargs)#

Exports Flow360BaseModel instance to .json or .yaml file

Parameters:

filename (str) – Full path to the .json or .yaml or file to save the Flow360BaseModel to.

Return type:

None

Example

>>> params.to_file(filename='folder/flow360.json')