Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://www.sphinxsys.org/
Apache License 2.0
259 stars 199 forks source link

Unable to reproduce droplet oscillation results from Adami et. al (2010) #378

Closed nilot-pal closed 8 months ago

nilot-pal commented 9 months ago

Hi all, I was trying to reproduce the 2d droplet oscillation results presented in the following two papers:

  1. Hu, X. Y., & Adams, N. A. (2006). A multi-phase SPH method for macroscopic and mesoscopic flows. Journal of Computational Physics, 213(2), 844-861.
  2. Adami, S., Hu, X. Y., & Adams, N. A. (2010). A new surface-tension formulation for multi-phase SPH using a reproducing divergence approximation. Journal of Computational Physics, 229(13), 5011-5021. However, my results don't match exactly with the literature. Attached is a screenshot of the mismatch-: COM_pos_SPH_Hu_2010_vs_lit I am using an earlier version of SPHinXsys with some modifications (you can find it here: https://github.com/nilot-pal/SPHinXsys-nilo.git) to incorporate classes for finding the COM position and time steps from the 2010 paper. Please let me know your thoughts on this!
DrChiZhang commented 9 months ago

Would you please also attach the particle distribution at t = 0, 0.08, 0.16, 0.26 and 0.5?

nilot-pal commented 9 months ago

t=0 image t = 0.08 image t = 0.16 image t= 0.26 image t = 0.5 image

Xiangyu-Hu commented 9 months ago

@nilot-pal Thanks. We will take effort to have look.

Xiangyu-Hu commented 9 months ago

@Shuaihao-Zhang Could you take some time to have a look this issue?

Shuaihao-Zhang commented 9 months ago

@Shuaihao-Zhang Could you take some time to have a look this issue?

We also found this problem before, refer to this issue #288. @nilot-pal

This is because the function ReinitializedDensity was changed in this pull request #274.

I haven't had much time to pay attention to this issue in the past few weeks. I will try to fix this later.

Xiangyu-Hu commented 9 months ago

@Shuaihao-Zhang @nilot-pal Is in this case the air modeled?

nilot-pal commented 9 months ago

@Xiangyu-Hu , yes air is modelled, I just hid that phase in paraview. I used the 2d square droplet deformation test case as reference for the air-water-wall interaction, if that helps.

Xiangyu-Hu commented 9 months ago

@nilot-pal Please have check the bug fix at pull request #382 . Please try modify your case with this bug fix.

Xiangyu-Hu commented 9 months ago

Screenshot from 2023-07-26 21-44-48

nilot-pal commented 9 months ago

@Xiangyu-Hu , thanks. I incorporated your changes and ran the simulation again. In terms of the COM position, the results have improved as far as being close to literature data is concerned, i.e., droplet remains stable till 0.5 sec. However, there is still some mismatch with the literature data (2006 paper) as we can see in the figure below. image

Xiangyu-Hu commented 9 months ago

@nilot-pal the current algorithm is neither the 2006 or 2010 version. It is a simplified version. We can have a further look on it. The worst case is we simply re-implement the old algorithm.

nilot-pal commented 9 months ago

@Xiangyu-Hu , thanks a lot for the clarification, because I was under the impression that the algo is from the 2010 paper. Eventually, I want to simulate droplet impact on a solid surface and was trying to reproduce the droplet oscillation results from literature just to confirm if the surface tension model in SPHinXsys can reproduce some standard example problem. Instead of implementing the old algorithm again, I am more interested to find out how to model surface tension that can handle droplet impact. So, if you want me to close this issue, I'll do it.

Xiangyu-Hu commented 9 months ago

@nilot-pal thanks for clarification. Please toke some time on other things. We will solve issue as soon as possible.

Xiangyu-Hu commented 9 months ago

@nilot-pal Hi, there is a bug in mulit-phase viscous acceleration and was corrected in the new pull request. Please have a try for your case.

nilot-pal commented 9 months ago

@Xiangyu-Hu , thanks. After incorporating changes as per #391, I got the following result: image

Xiangyu-Hu commented 9 months ago

Still need to work on it so that the simulation be stable in long time.

Xiangyu-Hu commented 9 months ago

@nilot-pal I have found the problem behind the issue, it is due to the wrongly imposed transport velocity formulation. My simple ad hoc correction leas to very stable solution. I will update the new test soon.

Xiangyu-Hu commented 9 months ago

myFile8-1-2023_121439_PM

Shuaihao-Zhang commented 9 months ago

Great! Seems much better!

Xiangyu-Hu commented 9 months ago

@nilot-pal please check the new version. I think that this version, is still not perfect, but should be be sufficient for your test.

nilot-pal commented 9 months ago

@Xiangyu-Hu, thanks a lot for your attention to this. New result after incorporating #398 is as follows: image As you said, the droplet oscillation is stable for longer time.

Xiangyu-Hu commented 9 months ago

@nilot-pal Great! Could you update the square_droplet case in repository with your cases test. I think that your case is more comprehensive and easier to maintain as it has observed quantitates for regression test.

Xiangyu-Hu commented 9 months ago

@Shuaihao-Zhang @nilot-pal We will continuously improve the surface tension model.

Xiangyu-Hu commented 9 months ago

Another formulation has very good stability,https://youtu.be/r7SJ7mxoPFs, until time 10.