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 197 forks source link

upload mix pressure velocity flow #534

Closed ShuoguoZhangTUM closed 1 month ago

ShuoguoZhangTUM commented 2 months ago

add a new case

DrChiZhang commented 2 months ago

Seems that you did not follow the clang format. This maybe helpful as vscode has clang-format extension. https://skillupwards.com/blog/formatting-c-cplusplus-code-using-clangformat-and-vscode

Xiangyu-Hu commented 2 months ago

@ShuoguoZhangTUM After I read you code, I found that the code requires intensive revision. First, mix-using the body part by particles and buffer particle indicator. if you use the indicator, you do not need the list. In this case, you need use body part by cell to save some time on indicating particle and restrict the range of computation to near buffer region. Second, your using self-defined exe(), that is not desirable as there is no specially operations are used. Third, all the method should be based on using BodyAlignedBoxByCell.

Xiangyu-Hu commented 2 months ago

@ShuoguoZhangTUM Also, as the BodyPartByCell only indicate body part particle briefly, you need to use AlignedBox function checkInBound to found the body part particles accurately. Or you need use buffer indictor to ensure the right particles you are imposing boundary conditions.