CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Please help with implemetation of boundaries conditions for flow in a pipe (https://www.cfd-online.com/Forums/main/69301-please-help-implemetation-boundaries-conditions-flow-pipe.html)

Michail October 19, 2009 08:07

Please help with implemetation of boundaries conditions for flow in a pipe
 
Hello all. Please help with implementation of boundary conditions for fully developed flow in a pipe. I use SIMPLE-algorithm on collocated grid. The enumerating of CV is below. I implemented dp/dx = constant and dU/dx=0 as:

-------------------------
For inlet :


P(1,J)= P(2,J)-( P(3,J) - P(2,J) )*0.5

U(1,J) = U_inlet

-------------------------
For outlet:

P(NXmaxC,J)= P(NXmaxC,J)-( P(NXmaxC-3,J) - P(NXmaxC-2,J) )*0.5

U(NXmaxC,j)=U(NXmaxC-1,j)

http://photofile.ru/photo/michail_k/.../132211755.jpg

But the solution diverged. May be I am wrong?

esozer October 19, 2009 09:27

dp/dx=0 is not a good idea for pipe flow. Fix the pressure at the outlet and velocity or mass flow rate (or pressure) at the inlet.
-------------------------

For inlet :


U(1,J) = U_inlet

-------------------------
For outlet:

P(NXmaxC,J)= P_outlet


Michail October 19, 2009 09:39

Thank You very much for Your suggestion. I'll try immediately and shall answer you today.

But what to do with pressure at inlet?

esozer October 19, 2009 09:59

I suggest linearly extrapolating the inlet pressure from inside

parsad July 19, 2011 09:38

help
 
Quote:

Originally Posted by Michail (Post 233210)
Hello all. Please help with implementation of boundary conditions for fully developed flow in a pipe. I use SIMPLE-algorithm on collocated grid. The enumerating of CV is below. I implemented dp/dx = constant and dU/dx=0 as:

-------------------------
For inlet :


P(1,J)= P(2,J)-( P(3,J) - P(2,J) )*0.5

U(1,J) = U_inlet

-------------------------
For outlet:

P(NXmaxC,J)= P(NXmaxC,J)-( P(NXmaxC-3,J) - P(NXmaxC-2,J) )*0.5

U(NXmaxC,j)=U(NXmaxC-1,j)

http://photofile.ru/photo/michail_k/.../132211755.jpg

But the solution diverged. May be I am wrong?

hello mr
i have problem i want a solve turbulence flows of air on a flat plate in two dimensional with matlab but i dont know what starting from where i request help me,can u help me?
my method is control volume and my algorithm is simplec.

michaelmoor.aero July 12, 2012 05:47

Hello everyone, I am trying to solve for steady Poiseulle flow on a backward staggered grid using FVM and SIMPLE, these are the initial boundary conditions that I set...
%% Wall 1,The inlet
u(2,:)=uin; % U values are stored at i=2
v(1,:)=vin; % V values are stored at I=1
p(1:2,:)=pstaticin; % Pressure is stored at I=1, and using dp/dx=0 enters the domain at I=2

%% Wall 2, The top plate
%For Poiseulle flow; No slip boundary condition:
u(:,nYp)=0;
v(:,nY)=0;
p(:,nYp)=0;

%% Wall 3, Outlet
u(nX,2:nYp-1)=u(nX-1,2:nYp-1); % First extrapolate values from the domain
u(nX,2:nYp-1)=u(nX-1,2:nYp-1)*sum(u(2,2:nYp-1))/sum(u(nX,2:nYp-1)); % This multiplier is the mass in divided by the mass out, which ensures continuity.
v(nXp,:)=v(nXp-1,:); % See Versteeg page 273
p(nXp,2:nYp-1)=0; % Constant static pressure value of '0' set at the outlet (I = NI)

%% Wall 4, Plate
%For Poiseulle flow; No slip boundary condition:
u(:,1)=0;
v(:,2)=0;
p(:,1)=0;

From here, I solve for the momentum equations, noting that the source term is the pressure gradient, as well as the source terms in appendix C of Versteeg. The wall shear stress also enters the u-momentum equations in the central coefficient, Versteeg: Sp = -(mu/delta yp)*Acell ... eqn 9.11 pg 275. Since I am using a backward staggered grid, there is no need to incorporate the inlet and outlet boundary conditions as source terms (right hand side of equation), since the hybrid differencing scheme ustilizes the already stored inlet value of uin at i=2, and the u-momentum equations are calculated from i=3.

Once u* and v* are calculated, solve for the pressure correction equaiton, being sure to cut the coefficients to the inlet (aW), outlet (aE), and the top and bottom plates (aN and aS), noting also that the coefficients are simply the central coeficients of the u- & v- momentum equations, multiplied by the density and the cellface area (rho*d*a)i,J etc... and that the source term is the continuity imbalance accross a pressure volume, i.e West face - East face + south face -north face.

I am using the MATLAB function BICGSTAB to solve the sets of equations... can anyone point out something wrong?
REgards, 0565113@gmail.com


All times are GMT -4. The time now is 05:27.