CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Verification & Validation (https://www.cfd-online.com/Forums/openfoam-verification-validation/)
-   -   laminar pipe flow (https://www.cfd-online.com/Forums/openfoam-verification-validation/241103-laminar-pipe-flow.html)

asarmakeeva February 8, 2022 15:52

laminar pipe flow
 
1 Attachment(s)
Hi! I was running laminar pipe flow, when I sampled at the place around the entrance length ~0.04m, I was getting fine results. When I expand my pipe, I have some changes in maximum velocity(flow is still changing), and the error with the analytical solution gets bigger when I increased the number of mesh cells.

Initial settings:
length of the pipe = 0.2 meters
R = 0.00227
rho = 1.0
v = 0.5216m/s

Analytical maximum velocity = 1.043 m/s I am getting for the most refined case for 460k cells velocity 1.071 m/s and for the coarse mesh 57k cells max velocity is 1.059m/s. I know that to have some errors is fine, but this is a very simple case.

Maybe a problem in my boundary solution or this variation in velocity field is well known and fine?

Attaching the table to show how velocity is changing Attachment 88304and link with the case and my postprocessing https://github.com/asarmakeeva/PipeFlowVerification


Thank you for your time and help.

joshwilliams February 9, 2022 02:41

Quote:

Originally Posted by asarmakeeva (Post 821887)
Hi! I was running laminar pipe flow, when I sampled at the place around the entrance length ~0.04m, I was getting fine results. When I expand my pipe, I have some changes in maximum velocity(flow is still changing), and the error with the analytical solution gets bigger when I increased the number of mesh cells.

Initial settings:
length of the pipe = 0.2 meters
R = 0.00227
rho = 1.0
v = 0.5216m/s

Analytical maximum velocity = 1.043 m/s I am getting for the most refined case for 460k cells velocity 1.071 m/s and for the coarse mesh 57k cells max velocity is 1.059m/s. I know that to have some errors is fine, but this is a very simple case.

Maybe a problem in my boundary solution or this variation in velocity field is well known and fine?

Attaching the table to show how velocity is changing Attachment 88304and link with the case and my postprocessing https://github.com/asarmakeeva/PipeFlowVerification


Thank you for your time and help.


Hi Ana,



The issue is that you have an ill-posed set of boundary conditions. Specifically, you define a velocity at the inlet and outlet in this case. You should change the velocity outlet to

Code:

type        zeroGradient;

A good indicator of your BC issue is that the mesh is so fine -- way too fine in fact for the simple case of laminar flow in a pipe. As it is a simple solver (no multiphase or non-isothermal effects to introduce error), our first debugging check should usually be the boundary conditions.


Best,
Josh

asarmakeeva February 9, 2022 15:49

Hi Josh, thank you for your answer,

because zero gradient is the boundary condition which extrapolates the quantity to the patch from the nearest cell value the issue is not in the the ill-posed bc at the outlet.

for the sanity check I run simulation with changes which you suggested and got same result.

Kind regards, Ana.

Karimh89 August 2, 2023 10:15

Hi Anna
You also need to change the pressure at the outlet i agree the boundary condition is ill posed in summary this is what should be done
Inlet U-fixedValue
P-zeroGradient
Outlet U-zeroGradient
p-FixedValue
Also i noticed your running the case in transient state i beleive it should run fine under steady state condition

regards
Karim


All times are GMT -4. The time now is 10:08.