-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of Standard k-ε Turbulence Model within ESPH #724
Implementation of Standard k-ε Turbulence Model within ESPH #724
Conversation
Introduce riemann solver in the tke and dissipation rate transport equation
…kar/SPHinXsys-learning into SharedTurbulenceModel
Made small corrections to the FVM 3d incompressible channel flow case.
@FengWang3119 Could you please review this pull request when you have a chance? Thank you! |
...examples/test_3d_FVM_incompressible_channel_flow/test_3d_FVM_incompressible_channel_flow.cpp
Outdated
Show resolved
Hide resolved
...d_examples/test_3d_FVM_incompressible_channel_flow/test_3d_FVM_incompressible_channel_flow.h
Outdated
Show resolved
Hide resolved
Hello @FengWang3119 and @yyc84 I’m facing issues with the CI tests: test_2d_mixed_poiseuille_flow: Fails only on Windows. It works fine on other platforms. Any idea why? Your guidance would be greatly appreciated! |
Is is possible to shorten the channel length? |
YES, it is possible but will require lot of rework. I will first try reducing the simulation time and increasing the CFL number from 0.6 to 1.0. Thanks for your input. |
Dear Professor @Xiangyu-Hu The test case test_2d_FVM_turbulent_channelflow is failing because of timeout. The channel is long in order to achieve fully developed turbulence (also becasue: periodic boundary conditions are unavailable in the FVM framework), hence the simulation time is also long. Could you please advice me, how to solve the timeout issue? |
...extra_source_and_tests/test_2d_FVM_turbulent_channelflow/test_2d_FVM_turbulent_channelflow.h
Outdated
Show resolved
Hide resolved
...extra_source_and_tests/test_2d_FVM_turbulent_channelflow/test_2d_FVM_turbulent_channelflow.h
Outdated
Show resolved
Hide resolved
...ource_and_tests/test_2d_FVM_turbulent_channelflow/common_weakly_compressible_FVM_classes.cpp
Show resolved
Hide resolved
@Yashmandaokar It seems that there is some incompatibility to the macOS system. You can try to compile the code using clang compiler in Linux to have a check first. If it also gives the same problem, you can debug the code and find the bug. |
@Yashmandaokar I also have no clue on what makes the fsi2 fail, but it is not a issue of your pull request. It is a long time mystery (it happens occasionally) which we need to wait a long time so that the reason shows up. |
I am not expecting that a 2d test case requires more than 1000s. How many cells have you used in this case? |
The case has 55322 cells. It is a long channel length 120 m heigth 2 m. The channel is long in order to achieve fully developed turbulence (also becasue: periodic boundary conditions are unavailable in the FVM framework). Also the simulation time is 140 sec in order to reach steady state. Should I make the mesh coarse? |
@Yashmandaokar It is also not meaning full to use 60 time of the height as the length. |
For the freestream inlet conditions, the length seems tobe neccessary for the turbulent kinetic energy to achieve fully-developed acoording to the FVM result. |
At the early stage, my focus was on reducing complexity, as the code was already encountering several other issues. I did not anticipate that a 15-minute simulation would pose a problem—apologies for that oversight. However, I can now look into shortening the channel length (to 15 times of height) and implementing a fully developed velocity profile at the inlet, if that would be an acceptable approach. Should I proceed with this approch @Xiangyu-Hu and @FengWang3119 ? |
Sure, it seems to be the only way to resolve this issue. |
Apply fully developed turbulence profiles at inlet in order to reduce the channel length.
This pull request introduces the implementation of the standard k-ε turbulence model with the standard wall function in the ESPH framework. The implementation is verified against a 2D turbulent channel flow case at a Reynolds number of 20,000. Additionally, the PR ensures naming consistency by renaming a test case.
The standard k-ε transport equations are implemented along with a standard wall function for turbulence modeling.
Files: turbulence_model.h, turbulence_model.cpp, and turbulence_model.hpp:
Extends the Eulerian HLLC Riemann solver to handle the advection terms for turbulence variables (k and ε).
Files: extended_eulerian_riemann_solver.h and extended_eulerian_riemann_solver.cpp:
Implements the turbulence forces necessary for the RANS momentum equation:
Files: rans_turbulence_dynamics.h and rans_turbulence_dynamics.hpp:
The test_2d_FVM_turbulent_channelflow test case is developed to verify the turbulence model implementation:
Verification Details:
copilot generated summary:
This pull request includes several changes to improve the fluid dynamics simulations and refactor the test files for better organization and functionality. The changes focus on adding turbulence models, refactoring test files, and minor code cleanups.
Improvements to fluid dynamics simulations:
src/shared/particle_dynamics/fluid_dynamics/eulerian_fluid_dynamics/eulerian_fluid_integration.hpp
: Added turbulence model calculations forEulerianIntegration1stHalf
andEulerianIntegration2ndHalf
interactions. [3] [2]tests/extra_source_and_tests/extra_src/for_2D_build/turbulence_model.cpp
: Introduced new turbulence model implementations, includingBaseTurbulence
,WallAdjacentCells
, andStdWallFunctionFVM
classes.Refactoring and renaming test files:
tests/3d_examples/test_3d_FVM_incompressible_channel_flow/test_3d_FVM_incompressible_channel_flow.cpp
: Renamed the file and updated references to reflect the new name for consistency. [1] [2] [3]tests/3d_examples/test_3d_FVM_incompressible_channel_flow/test_3d_FVM_incompressible_channel_flow.h
: Renamed the file and updated references to reflect the new name for consistency. [1] [2] [3] [4]Minor code cleanups:
tests/2d_examples/test_2d_FVM_flow_around_cylinder/common_weakly_compressible_FVM_classes.h
: Removed unnecessary blank lines for better code readability.