modulus-sym icon indicating copy to clipboard operation
modulus-sym copied to clipboard

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

Open chaous opened this issue 2 years ago • 12 comments

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

chaous avatar Jun 27 '23 12:06 chaous

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

chaous avatar Jul 11 '23 16:07 chaous

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

michaltakac avatar Aug 15 '23 22:08 michaltakac

Implemented all suggestions

chaous avatar Oct 03 '23 12:10 chaous

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?

cfd1 avatar Oct 04 '23 22:10 cfd1

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

chaous avatar Oct 05 '23 10:10 chaous

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

cfd1 avatar Oct 05 '23 20:10 cfd1

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.

cfd1 avatar Oct 05 '23 20:10 cfd1

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 avatar Mar 14 '24 07:03 YouqiongLiu

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])

YouqiongLiu avatar Mar 20 '24 04:03 YouqiongLiu

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

chaous avatar Mar 23 '24 18:03 chaous

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.

ktangsali avatar Mar 27 '24 15:03 ktangsali

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

chaous avatar Mar 28 '24 14:03 chaous