CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Boundary conditions using SIMPLER algorithm (http://www.cfd-online.com/Forums/main/81190-boundary-conditions-using-simpler-algorithm.html)

lost.identity October 19, 2010 09:20

Boundary conditions using SIMPLER algorithm
 
I have seen a number of forum posts on this topic but I'm still struggling with my boundary conditions.

I'm running a 1-D spherical calculation (only radial dependence considered). I decided to have velocity boundary conditions at the inlet and outlet. So the BCs I have are:

inlet: u=0
outlet: u_1 = u_2 which is zero gradient BC.

I understand that for subsonic simulations you either have to specify velocity or pressure BCs. I have a staggered grid where the velocities are staggered forward.

My discretised equation for the pressure looks of the form

a_Pp_P = a_Ep_E + a_Wp_W + b

I used the discretised equation to calculate the pressure values at the boundary. At the inlet since I have u_e therefore, I do not have p_E in the discretised pressure equation and for the outlet I do not have p_W. Is this correct?

johnhelt October 19, 2010 11:01

How can you have 0 velocity in and non-zero velocity out, unless of course you are generating matter inside your volume?

lost.identity October 20, 2010 05:54

I'm studying combustion where the zero-upstream velocity is a far-field velocity and there is a flame in the middle of the domain and the boundary condition at the outlet is a zero-gradient boundary condition but the flow reaches about 60 m/s at this outlet.

I was at first baffled by your question but I think the combustion, creates density difference which creates mass.

johnhelt October 20, 2010 07:54

Could you maybe sketch your geometry?

I understood it as:
Flame (r=0)-----inlet (r=r_i)-----------outlet (r=r_o)----> radial coordinate

Please bear with me if that is not how it looked :-)

lost.identity October 20, 2010 08:46

It's actually,

Outlet (r=0) ----------------------------------------Flame------------------Inet (r=R)

I use a normalised temperature to define the flame location. I study spherical explosions where the flame starts at the centre and moves radially outward. Therefore at the centre (r=0) is the highest temperature (burnt side) where the normalised temperature C=1. I end simulations before the flame reaches R (end of the domain). Since there is no flame here, the normalised temperature C=0 at the outlet. So the profile of normalised temperature (C) looks like a backward ramp function.

So the flame actually moves from left to right during my calculations. However, relative to the flame is the flow velocity, so for a particle fixed on the flame the flow direction will be from right-to-left. That's why I defined my inlet to be at r=R, and outlet to be at r=0.

johnhelt October 20, 2010 09:36

Ok, I think I get it finally. These are suggestions, I am by no means a CFD expert ...

With regards to the pressure: for symmetry you should have a zero gradient at r=0, so then P(N)=P(N-1), where N is the outlet node and N-1 is the node right next to it (here to the EAST). You could do that by setting b=0, a_W=0, a_P=1 and a_E=1 in the pressure-equation written above.

At the inlet boundary (r=R), I would specify that the pressure on the EAST point would be equal to the ambient pressure P0. You could do by lumping a_E P_0 into the source term (b). In b, I think the velocities at the faces are also given, so there you would have to specify that the velocity at east face is 0.

Let me hear what you think.

Regards

lost.identity October 20, 2010 13:00

Hi thanks very much for the quick reply.

I'm still confused. This is a lengthy reply but I'm trying to understand certain things between what I have now and what you've just told me.

So I'm using SIMPLER as I said before and I use a staggered grid.

What I have now is a zero-gradient BC at the outlet (r=0) for velocity which says u_w = u_e. Am I correct in thinking that if I have this velocity BC then I can't have a pressure BC at the same location for incompressible flow?

At this boundary I discretise the pressure equation to obtain (just neglecting a_w term):

a_Pp_P = a_Ep_E + b

and according to SIMPLER method the mass source term b looks like

b = (\rho_P + \rho_P^0)r_P^2\frac{\Delta{r}}{\Delta{t}} - r_e^2(\rho\hat{u})_e + r_w^2(\rho\hat{u})_w ------------- (1)

where r_P, r_w and r_e are the radii at the relevant points along the grid (these terms only come about because of the spherical discretisaiton). Also my grid is staggered and I store the velocities at the velocity-cell faces. So with my current boundary conditions I set u_w = \hat{u}_e, where the pseduo-velocities are only calculated for the internal nodes. The problem with this is that the b term doesn't go to zero at this location for spherical coordinates. This is ecause even though the velocities u_w and u_e are the same, the change in radii r_e and r_w creates a source. So even if I have neglected the a_w in the discretised equation for this boundary p_1\neq{p_2}. Therefore, this violates symmetry. So am I right in thinking that rather than having zero-gradient with respect to velocity I should have zero-gradient with respect to pressure?


With regards to the inlet (r=R) BC, I have the discretised equation

a_Pp_P = a_Wp_W + b

by just neglecting a_E. A problem I have now is that I don't know what the cell face velocities should be at this location for a staggered grid to evaluate b according to Eq.(1). At the end I do not have u_e since it's that point is outside the grid, but I set u_e=u_w. However, my boundary condition for u_w=0. So despite the fact that there is a radius change the mass term b goes to zero here since the velocities are zero anyway. I'm really not sure about this bit.

lost.identity October 20, 2010 16:10

Actually I realise that I don't include the centre point of the sphere, r=0 because it creates a singularity. Instead I start it at r=a, some finite value. So I'm not sure if I need to have symmetry BCs in this case.

johnhelt October 21, 2010 10:18

If your centre point for the pressure discretization is at 0, then wouldn't the control volume at that point would be a sphere, rather than a spherical shell? Then you only have flow out of there, right?. I think this should change your discretized equations there.

With regards to the inlet, you could move the grid for the pressure so it does not end at r=R, but at R-1/2\Delta r. Then as you are staggering the velocity grid forward 1/2 \Delta r your last velocity node will be at r=R, right? In 'b' in the pressure-equation you could set u_e = 0, while keeping u_w from your solution to the momentum equation. Also you set a_E = 0 here, as you already wrote.

Again, I'm by no means sure of this.. I don't remember seeing an example in the textbooks I've been reading except for Patankar, regarding discretization in spherical coordinates and that wasn't for the NS equations).

Hopefully someone more qualified will answer you soon :confused:

ahazbavi October 25, 2010 18:27

Hello, I am a mechanical engineering.I need to use a subroutine ables to solve (in unsteady condition) 3-D fluid flow (the pressure and velocity and temperature) fields in cylindrical coordinate .Who Can send me the source code for SIMPLE / SIMPLER scheme (preferably on fortran) so that I can get & proceed from it.
please send me through my email, ahazbavi@ymail.com.


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