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

Temperature #70

Open
Zac8668 opened this issue Jan 27, 2024 · 4 comments
Open

Temperature #70

Zac8668 opened this issue Jan 27, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Zac8668
Copy link
Collaborator

Zac8668 commented Jan 27, 2024

Thermodynamic simulation will be awesome! So that we can have rocks melt, water freeze, etc
We probably want to add #52 first

@Zac8668
Copy link
Collaborator Author

Zac8668 commented Jan 28, 2024

My idea for the implementation is like this:

The problem with just adding a temperature field to the atoms is that if we want to update the temperature we would need to keep a lot of atoms "awake", that would drastically affect performance negatively.

But temperature spreading is not something that makes particles move, so we can probably use a compute shader to do that, that way we can make it awake only the particles that change state, and by having this separate simulation we can probably have some nice thermodynamics without damaging performance.

It would also spread temperature on a vast portion of the map without problems.

References: https://github.com/bevyengine/bevy/blob/main/examples/shader/compute_shader_game_of_life.rs

@Zac8668
Copy link
Collaborator Author

Zac8668 commented Jan 30, 2024

We can maybe also use a similar system to implement how fluids(gas/liquids) dissolve into each other.
For that we would probably need each fluid atom to have unique properties that can be changed in runtime.
We would probably have space for 4 properties, so that we can fit in a RGBA

@Zac8668
Copy link
Collaborator Author

Zac8668 commented Jan 30, 2024

@Zac8668 Zac8668 added the enhancement New feature or request label Jan 31, 2024
@Zac8668
Copy link
Collaborator Author

Zac8668 commented Feb 1, 2024

Another resource: https://thermtest.com/what-is-thermal-conductivity

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

1 participant