Skip to content

Add support for more forms of Quantity to be passed to RealList (and potentially RealVector and IntegerList) #4879

Open

Description

@Gobot1234

📝 Description of the feature

While updating the examples I have run into many cases where I want to be able to initialise a point like property with all of these types, tuple[Quantity, Quantity, Quantity] | list[Quantity] | Quantity[np.ndarray] (and potentially the 2d variation of the tuple)

💡 Steps for implementing the feature

Changes in flobject

🔗 Useful links and references

Would be nice if you could also figure out the autogeneration to update parameters for this but I will cover this at some point using some types only descriptor magic

Activity

  1. added
    enhancement
    on Jan 30, 2026
  2. dnwillia-work commented on Feb 4, 2026

    @dnwillia-work
    Collaborator

    That seems pretty reasonable. Could you propose a couple of short examples that make it clear what the API is you are after?

  3. Gobot1234 commented on Feb 4, 2026

    @Gobot1234
    ContributorAuthor

    Course, these are all taken from #4887

    discs.solid_motion.solid_motion_velocity = [0, 0, 0] * m / s  # Quantity[np.ndarray]
    n_mode = [0, 1, 2, 3]  # Impeller frequency harmonics
    r = 0.082 * m
    z = -0.037 * m
    d_theta = 5  # degrees
    
    for angle in range(0, 360, d_theta):
        x = math.cos(math.radians(angle)) * r
        y = math.sin(math.radians(angle)) * r
        PointSurface.create(solver, name=f"point-{angle}"), point=(x, y, z))  # tuple[Quantity, ...] | list[Quantity]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions