-
Notifications
You must be signed in to change notification settings - Fork 217
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
Verification/3d pressure driven poiseuille flow 20240222 #533
base: master
Are you sure you want to change the base?
Verification/3d pressure driven poiseuille flow 20240222 #533
Conversation
@ShuoguoZhangTUM |
show me the equation about how you calculate the mu_f and U_f. |
|
choose the max velocity as U_f, not the average velocity. |
In the most scenario, its seem more make sense to define viscosity than Reynolds number. Therefore, As The current set up in the case is set to !The U_max prescribed in code is maximum velocity in system, not equal to $U_{max} of fluid profile |
|
@YuVirtonomy How about the result? |
This case is built on the test_2d_pulsatile_poiseuille_flow. It seems you've defined the resolution as resolution_ref = radius/10. ![]() The difference is in test_2d_pulsatile_poiseuille_flow: in LeftBidirectionalBufferCondition & RightBidirectionalBufferCondition, you declared Real pressure = Inlet_pressure & Real pressure = outlet_pressure in getTargetPressure. Whereas, I've implemented an inlet_pressure_ member in my BidirectionalBufferCondition class and initialized the value according to inlet and outlet pressure. In getTargetPressure, a function compute_pressure is deployed to update the target_pressure according to runtime if necessary. In the current case, compute_pressure does nothing other than directly feedback the pressure. The same applies to LeftInflowPressure & RightInflowPressure in test_2d_pulsatile_poiseuille_flow and the InflowPressure in the current case. I've also tried your way of declaring both LeftBidirectionalBufferCondition, RightBidirectionalBufferCondition, LeftInflowPressure, and RightInflowPressure. It seems the results are exactly the same. The result of the simulation with a resolution equal to diameter / 10 is shown in the image. The velocity in the radial direction is based on the observer deployed at half the length. Here is a summary: ![]() This result is the simulation with a resolution equal to diameter / 10. The velocity is obtained through observers located at (length * 0.5, 0, Z). I see some major problems,
@ShuoguoZhangTUM can you please provide your full code of 3d flow in this branch and provide the cross-section velocity result? |
@YuVirtonomy could you also show pressure profile? |
![]() This is the pressure profile in the axial direction ![]() This is the velocity in the axial direction |
|
@ShuoguoZhangTUM we should continue this pull request until the corrected obtained. |
When i use resolution=D/10, i get the same max velocity around 0.06 as your result. When i change it to D/20, the max velocity is almost same to the analytical solution. So i suggest you try higher resolution.Furthermore, my 3D flow code is same to the 2D flow code. The only difference is the parameter setting. So again, i suggest you to make your 3D flow code same as the 2D . because I can not make sure where the bug is, if you change the code too much |
I uploaded the code based on LeftBidirectionalBufferCondition, RightBidirectionalBufferCondition, LeftInflowPressure and RightInflowPressure classes. however, I still observe the same result. And, it can not explain why with adding an offset pressure to both inlet and outlet, the difference between the analytical solution and simulation result increases. Also, with pressure inlet and velocity outlet, the difference between the analytical solution and simulation result decreases. |
@YuVirtonomy @ShuoguoZhangTUM we may need to arrange an online meeting on this issue.
Do you have results at resolution of D/20? |
@YuVirtonomy @ShuoguoZhangTUM I suggest that we arrange a online meeting on this. |
Ok I also think a online meeting is very necessary |
Could you check your email? Thanks |
…ssure_driven_poiseuille_flow_20240222
22b5906 Short_offset & Short_no_offset: Long_offset & Long_no_offset:
Real mu_f = sqrt(2 * rho0_f * pow(CR, 3.0) * fabs(Inlet_pressure - Outlet_pressure) / (4.0 * Re * CL)); // using max velocity |
Something irrelevant: the entries in I know this is unrelated to the simulation since we never use the vector I have added two lines to fix this issue in
You can uncomment them if you feel that it's necessary to solve this problem. |
left_pressure = 5.0;
![image](https://private-user-images.githubusercontent.com/111049554/307301732-5d39ca23-9f46-4b85-85a2-52735cd06d13.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTg5ODQsIm5iZiI6MTcyNDcxODY4NCwicGF0aCI6Ii8xMTEwNDk1NTQvMzA3MzAxNzMyLTVkMzljYTIzLTlmNDYtNGI4NS04NWEyLTUyNzM1Y2QwNmQxMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QwMDMxMjRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00OGY2NmMyMmQ0MWMxZjMyZmVlMWJjZGVmZDg4ZWNjNzY1NzQxNzcyNzQwNzI3MTkzNmY2NDExZGU2ZGNmZTM3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.swJXUK0dzR4MJyc91w9W6dBLzVrw_21pmT_zzhf5oaM)
right_pressure = 0.0;
delta_p = left_pressure - right_pressure;
mu_f = 3.5e-3;
Analytical solution of velocity:
U_f = delta_p * radius * radius / (8 * full_length * mu_f);
U_f = 0.0377976
Reynolds number = 144.009
result:
The velocity magnitude is about 20% lower than the analytical solution
If offset the pressure
left_pressure = 20.0;
right_pressure = 15.0;
Then the maximum velocity decrease even more
![image](https://private-user-images.githubusercontent.com/111049554/307314848-2caef694-d4f1-4534-ba58-b8fc625d05f6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MTg5ODQsIm5iZiI6MTcyNDcxODY4NCwicGF0aCI6Ii8xMTEwNDk1NTQvMzA3MzE0ODQ4LTJjYWVmNjk0LWQ0ZjEtNDUzNC1iYTU4LWI4ZmM2MjVkMDVmNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QwMDMxMjRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YzRhNzY5NmExY2Y3YjlkYzQ0NWZiNDY4NThkMzVmNmY2MmE1Yjk0MjE5ODRiYTk2NTIzMWJlODZhNDJkMDUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.S85NIvSkp-iB0E5kr7YaB4HOGcQrzZy4KAa7uoYwDCY)
velocity at middle of axial in radial direction (P_in = 20, P_out = 15)