Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #354 analytical damper fix #437

Open
wants to merge 6 commits into
base: update-0.3.3
Choose a base branch
from

Conversation

sy-cui
Copy link
Contributor

@sy-cui sy-cui commented Oct 10, 2024

Fix #354.

Instead of the dimensionally inconsistent implementation, three variations of analytical linear dampers are now supported:

  1. Uniform damper. The input damping constant uniform_damping_constant $\gamma$ is of dimension 1 / T. Translation and rotation uses the same exponential damping coefficient $\exp(-\gamma t)$. Example:
    simulator.dampen(rod).using(
        AnalyticalLinearDamper,
        uniform_damping_constant=0.1,
        time_step = 1e-4, 
    )
  1. Physical damper. The translational and rotational damping constant are in general different, which follows the following formulae
$$m\frac{\partial v}{\partial t} = -\gamma_t v, ~~~~ \frac{J}{e}\frac{\partial \omega}{\partial t} = -\gamma_r \omega$$

such that

$$[\gamma_t] = FL^{-1} T, ~~~~ [\gamma_r] = FLT$$

The users are responsible for choosing the appropriate, dimensionally consistent damping constants for both modes. Example:

    simulator.dampen(rod).using(
        AnalyticalLinearDamper,
        translational_damping_constant=0.1,
        rotational_damping_constant=0.05,
        time_step = 1e-4, 
    )
  1. Old implementation (to be deprecated). The syntax is designed to be identical as before, so that client codes do not break. Example:
    simulator.dampen(rod).using(
        AnalyticalLinearDamper,
        damping_constant=0.1,
        time_step = 1e-4, 
    )

Test cases are updated to accommodate the changes. Dissipation module and test cases are moved to dedicated directories.

@sy-cui sy-cui self-assigned this Oct 10, 2024
@sy-cui sy-cui requested review from Ali-7800 and removed request for bhosale2 October 10, 2024 21:50
Copy link
Collaborator

@skim0119 skim0119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the changes in dissipation.py?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants