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

How to formulate the problem with the semi-implicit Euler Formula? #5

Open
J2thearo opened this issue Aug 1, 2023 · 0 comments
Open

Comments

@J2thearo
Copy link

J2thearo commented Aug 1, 2023

Hello Ben,

how would you tackle the whole thing if you determine the next position and velocity with the Euler method? This approach is mainly used to simulate physics in video games and produces an approximate discrete solution by iterating position and velocity. Here, b is the damping, which is typically between 0 and 1, and d is the position in force equilibrium.

function step(x_0, v_0) {
  a_spring = k * (d - x_0)
  v_1 = b * v_0 + a_spring * delta_t
  x_1 = x_0 + v_1 * delta_t
  return [x_1, v_1]
}

What I would like to get in the end is a neural network that does the following:

x_n+1, v_n+1 = NN(x_n, v_n)

I think I would treat it essentially like a time series forecasting but how would I formulate the "physics loss"?

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

No branches or pull requests

1 participant