NVIDIA / modulus-sym

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts
https://developer.nvidia.com/modulus
Apache License 2.0
165 stars 68 forks source link

Added NS incompressible and Euler equation. Also fixed tessellation, so now will work on windows via docker or pip #30

Open chaous opened 1 year ago

chaous commented 1 year ago

In some cases it is better to use incompressible NS and Euler equation uses way less memory

chaous commented 1 year ago

I fixed tessellation, so now will work on windows via docker or pip. I used mesh_to_sdf instead of pysdf

michaltakac commented 1 year ago

Looking forward for reviews, since our team cannot upgrade to modulus:23.05 due to missing pysdf library

chaous commented 1 year ago

Implemented all suggestions

cfd1 commented 1 year ago

I need to check the code when I get a chance, but how is this different from calling the Navier Stokes with a constant rho?

chaous commented 1 year ago

In classical CFD, for better results, incompressible form is used for low Mach numbers. I was able to achieve better results with an incompressible equation for PINNs than with a compressible equation but with constant rho

cfd1 commented 1 year ago

Just for the record I can’t review or merge your work.

cfd1 commented 1 year ago

If you can it would be good to have an example of your changes working. You could use the lid driven cavity for the incompressible formulation. I’m not sure if there is a compressible example with shockwaves to show off the Euler equations.

YouqiongLiu commented 6 months ago

If you can it would be good to have an example of your changes working. You could use the lid driven cavity for the incompressible formulation. I’m not sure if there is a compressible example with shockwaves to show off the Euler equations.

Can you work via pip?

YouqiongLiu commented 6 months ago

I fixed tessellation, so now will work on windows via docker or pip. I used mesh_to_sdf instead of pysdf

e.g modulus-sym\examples\geometry\tessellated_example.py
your fixed tessellation can work, but the following warning appears.
/modulus/sym/geometry/tessellation.py:179: RuntimeWarning: divide by zero encountered in divide np.full(x.shape, triangle_areas[index] / x.shape[0])

chaous commented 6 months ago

I fixed tessellation, so now will work on windows via docker or pip. I used mesh_to_sdf instead of pysdf

e.g modulus-sym\examples\geometry\tessellated_example.py your fixed tessellation can work, but the following warning appears. /modulus/sym/geometry/tessellation.py:179: RuntimeWarning: divide by zero encountered in divide np.full(x.shape, triangle_areas[index] / x.shape[0])

It appears on on regular tessellation too. This warning can be ignored

ktangsali commented 6 months ago

Hi @chaous , sorry for the delay in getting attention to this PR. Thanks for the contribution! Can we split this PR into two? One that adds equations and the other that adds changes to tessellation? Reviewing the tessellation might take some time, but we can get the equations added much sooner. Also, if you can add an example to go along with your equation additions that can demonstrate potential speed-up/improvement in accuracy, that would be helpful.

chaous commented 6 months ago

Hi @chaous , sorry for the delay in getting attention to this PR. Thanks for the contribution! Can we split this PR into two? One that adds equations and the other that adds changes to tessellation? Reviewing the tessellation might take some time, but we can get the equations added much sooner. Also, if you can add an example to go along with your equation additions that can demonstrate potential speed-up/improvement in accuracy, that would be helpful.

I split my pull request into two and added examples Equations https://github.com/NVIDIA/modulus-sym/pull/142 tessellation https://github.com/NVIDIA/modulus-sym/pull/143