In this project, the numerical simulation of well-known problems in fluid mechanics under the title of slow flow in a pipe is discussed. To solve this problem, with the help of the available results, the Darcy-Weissbach coefficient is investigated and verified with its equation for laminar flow, as well as the length of the inlet after which the flow is developed. The generation of the network and the solution of this problem have been done with the Prick code and compared with the openFoam codes. Also, during this project, it has been tried to point out important and significant points in CFD and evaluate their impact on this issue.
Internal flow is a flow in which the fluid is enclosed by a surface and viscous effects develop and are observed throughout the flow (such as flow in a pipe). Therefore, the boundary layer cannot expand without limits. When examining external flow, the only question is whether the flow is laminar or turbulent. But for the internal flow, the presence of the entrance area or the completely inclusive area should also be checked.
Reynolds number is the only parameter that affects the inlet length:
(1) \( Re = \frac{\rho U_m d}{\mu} \)
Also, for the average velocity inside the tube, we can write:
(2) \( u_m = \frac{1}{\pi r_0^2} \int_0^{r_0} 2\pi r u dr \)
Also, using the \( C_f \) relation, it is concluded that:
(3) \( f = 4C_f = \frac{8 \tau_w}{\rho u_m^2} = \frac{64}{Re_D} \)
In this project, Prick code has been used to analyze the problem and changes have been applied in three parts of the input file of the main code named dcpipe, the input files of the network generation code named dgpipe and the main code named pcol1.f. In the input file of the main code, fixed parameters are determined, and in that, fluid properties such as density, viscosity, Prandtl number, compressibility value, and input variables, pressure velocity and inlet temperature, as well as problem-solving conditions such as the type of solution method and accuracy of solution are recorded. All of these changes are applied in a multi-line format.
In the input file of the network generation (dgpipe), the dimensions of the channel geometry and the number of nodes are defined in the direction of its length and width. In the network generation code, the location of the node code and the density of the network are determined, which does not require changes in this code.