Skip to content
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

FreeStreamVelocityCorrection not working properly in 3D #193

Closed
anastazja-virtonomy opened this issue Jan 26, 2023 · 7 comments · May be fixed by #194
Closed

FreeStreamVelocityCorrection not working properly in 3D #193

anastazja-virtonomy opened this issue Jan 26, 2023 · 7 comments · May be fixed by #194

Comments

@anastazja-virtonomy
Copy link
Contributor

anastazja-virtonomy commented Jan 26, 2023

FreeStreamVelocityCorrection in a 3D case is causing unexpected changes in the density distribution and incorrect velocity profile near the outlet #194
image
image

@YuVirtonomy
Copy link
Collaborator

The first picture is the result with FreeStreamVelocityCorrection and the second picture is the result without FreeStreamVelocityCorrection.
With FreeStreamVelocityCorrection you can see at the end of x and y axis directions, the stream no longer points in the +X direction.

WithFreeStreamVelocityCorrection

WithoutFreeStreamVelocityCorrection

@ShuoguoZhangTUM
Copy link
Collaborator

sorry, I can't analyze the causes only according to your pictures, if you can send me your C++ case file, I am pleased to help you.
my email address is [email protected]

@YuVirtonomy
Copy link
Collaborator

Hii shuoguo,

This issue is related to the pull request #194 , you can click #194 to find the test case. Than you.

@ShuoguoZhangTUM
Copy link
Collaborator

I have read your code, I think the definition of the freestream velocity profile is wrong. Here is the code you write.
target_velocity[0] = u_ave * (DH/2 - position[1]) * (DH/2 + position[1]) / DH / DH;
In 2D case, the velocity profile is defined by the position[0] and position[1].
but in 3D, there should also be a position[2] together to define the velocity profile.
In 3d channel flow, both the velocity profile in xy and xz planes are parabolic.
however, your code only defines the parabolic profile in xy plane.

@anastazja-virtonomy
Copy link
Contributor Author

Hi Shuoguo,
The purpose of this case was to extend the 2D case, so the parabolic velocity profile was meant to be maintained only in xy plane, while in xz plane it's just part of the infinite flow, so it should be constant in z direction.
The reason, why I needed the velocity correction is that the two z-normal walls were supposed to be removed and for now the only other way to simulate this case was to manually set velocity[2] of free surface particles to 0. Otherwise, there is no boundary condition on z-normal surfaces and the flow obviously goes to the sides.

@Xiangyu-Hu
Copy link
Owner

Hi, @anastazja-bro does Shuoguo's solution work?

@Xiangyu-Hu
Copy link
Owner

Please check the communications respect to the pull request for the solution of the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants