isl-org / DeepLagrangianFluids

Code repository for "Lagrangian Fluid Simulation with Continuous Convolutions", ICLR 2020.
Other
207 stars 41 forks source link

Question about learning viscosity #26

Closed duytrangiale closed 1 year ago

duytrangiale commented 1 year ago

Hi Benjamin,

Could you please describe more details on how did you train the network to learn different viscosity? The results in the paper showed that the model can predict different behaviors for different viscosity but it is not clear how to get that results. Thanks for your help.

Cheers, Duy

benjaminum commented 1 year ago

In that case the viscosity parameter becomes an input feature for each particle. It also needs specialized training data that covers a range of viscosity parameters.

duytrangiale commented 1 year ago

Hi Benjamin,

Thanks for your suggestion. I just wonder how the kernel can learn the viscosity feature from data. I thought that it was designed to find the spatial correlation like position or velocity but this one is viscosity. Could you please explain a little bit? So if that possible, can I add more features in addition to velocity and position and the model can automatically learn it?

Thanks

benjaminum commented 1 year ago

Yes, the viscosity is just another input feature similar to the velocity. The network then learns from data how the viscosity changes the particle movement.

duytrangiale commented 1 year ago

Thanks for your suggestion, Benjamin.

duytrangiale commented 1 year ago

Hi Benjamin,

Could you please describe the process that you backpropagate through the network and optimize viscosity using gradient descent? How did you set up the loss function for that case? How can you get the estimated viscosity from prediction?

Thanks

benjaminum commented 1 year ago

The viscosity is an input for each particle and the value doesn't change (no backpropagation to the viscosity value). The loss function is the same. The only thing that changes is the data which should contain examples of fluids simulated with different viscosity parameters.

duytrangiale commented 1 year ago

Hi Benjamin, Thanks for your suggestion.