Skip to content

Feature Request: Native Support for Unbalance Forces in run_time_response() #1198

@ArthurIasbeck

Description

@ArthurIasbeck

Summary

run_time_response() presently obliges users to build the complete external‐force matrix (F) or to supply a custom callback via add_to_RHS whenever unbalance effects are required. This leads to redundant, error-prone code, as each user must recreate the same harmonic loading scheme. Introducing first-class, declarative unbalance parameters—similar to the existing run_unbalance_response() in the frequency domain—would streamline time-domain simulations.


Current Limitation

  • Users must manually construct the unbalance force terms (or embed them in a callback).
  • There is no built-in mechanism to combine a user-supplied force matrix with standard unbalance loading in a transparent manner.

Proposed Enhancement

Add native unbalance handling to run_time_response(), enabling the caller to specify any number of unbalances via the following parameters:

Parameter Type Description
node int or list[int] Node index where the unbalance is located.
mass (mε) float or Quantity Unbalance magnitude (kg·m).
phase float (rad) Initial phase angle.
(optional) speed float or np.ndarray Rotor speed; defaults to the speed argument already passed to the method.

For each unbalance the method would form

$$ F_x(t) = mε\,Ω(t)^2 \cos\!\bigl[Ω(t)\,t + \varphi\bigr],\qquad F_y(t) = mε\,Ω(t)^2 \sin\!\bigl[Ω(t)\,t + \varphi\bigr] $$

and inject these components at the relevant global DoFs.

If a user also supplies an explicit force matrix, the internally generated unbalance forces must be superimposed (i.e., F_total = F_user + F_unbalance).


Implementation Suggestions

  1. API Extension

    def run_time_response(
        self,
        speed,
        force=None,
        time_range=None,
        …,
        unbalance_nodes=None,
        unbalance_masses=None,
        unbalance_phases=None,
    ):
        …
    

    Behaviour

    • If all unbalance_* arguments are None, keep current behaviour.
    • If any unbalance_* argument is provided:
      1. Build F_unbalance internally.
      2. If force is also provided, compute F = force + F_unbalance; otherwise set F = F_unbalance.
  2. Code Reuse

    • Leverage the existing node-to-DoF mapping and vectorised operations from run_unbalance_response() to assemble F_unbalance.
    • Support both scalar-speed (steady) and array-speed (transient spin-up/down) cases.
  3. Multiple Unbalances & Vectorisation

    • Accept sequences for nodes, masses, and phases to handle multiple unbalances in one call.
    • Employ numpy broadcasting to avoid explicit Python loops over time steps.
  4. Documentation & Examples

    • Add a subsection “Time Response with Native Unbalance” detailing constant- and variable-speed scenarios.
    • Provide comparative plots demonstrating equivalence between the new interface and the manual force-matrix approach.
  5. Unit Tests

    • Validate that results obtained with the new parameters match legacy manual constructions.
    • Include tests combining user-supplied force matrices with unbalance parameters to ensure correct superposition.

Expected Benefits

  • Usability – Removes routine boilerplate and reduces user error in force-matrix assembly.
  • Flexibility – Allows simultaneous use of bespoke external forces and standard unbalance loads through simple superposition.
  • Consistency – Brings the time-domain API in line with the well-established frequency-domain workflow.
  • Extensibility – Provides a foundation for future enhancements such as automated parametric studies or stochastic unbalance modelling.

Thank you for considering this enhancement. Native unbalance support in run_time_response() will improve the fidelity and ergonomics of time-domain simulations within ROSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions