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

[Feature]: How do I apply external forces to a rigid body? #776

Open
Tryoe opened this issue Feb 24, 2025 · 5 comments
Open

[Feature]: How do I apply external forces to a rigid body? #776

Tryoe opened this issue Feb 24, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@Tryoe
Copy link

Tryoe commented Feb 24, 2025

What feature or enhancement are you proposing?

How do I apply external forces to a rigid body?

Motivation

As a [e.g. civil engineering researcher working on flood simulation]
I want to [e.g. be able to simulate city-scale fluid / terrain simulations]
Because [e.g. this enables the efficient design and validation of flood protection structures].

Potential Benefit

How do I apply external forces to a rigid body?

What is the expected outcome of the implementation work?

  • [ ]

Additional information

No response

@Tryoe Tryoe added the enhancement New feature or request label Feb 24, 2025
@Kashu7100
Copy link
Collaborator

You can apply via RigidSolver

for solver in scene.sim.solvers:
        if not isinstance(solver, RigidSolver):
            continue
        rigid_solver = solver

rigid_solver.apply_links_external_force(
            force=np.array([[1,0,0]]),
            links_idx=[1], # global link idx
        )

@Tryoe
Copy link
Author

Tryoe commented Feb 25, 2025 via email

@Kashu7100
Copy link
Collaborator

yes you can apply forces to each link in the model. you can set_dofs_stiffness if this is what you mean.

@Tryoe
Copy link
Author

Tryoe commented Mar 4, 2025

是的,您可以对模型中的每个链接施加力。如果这是您的意思,您可以。set_dofs_stiffness

Thanks, my problem is that different forces need to be set for a mesh object to be discretized into different parts.

@JunyinLi7758
Copy link

BTW, Is there any possible to apply contraint or force on a FEM entity or MPM entity?

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

No branches or pull requests

3 participants