CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

2D Explicit CFD - dumb/frustrating question

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   October 13, 2005, 11:53
Default 2D Explicit CFD - dumb/frustrating question
Posts: n/a
Hi - first time posting on this forum.

I've been struggling for a while with coding the 2D driven lid cavity flow and have tried many approaches. I've gotten close many times, but the solution is not quite correct and has erratic behavior.

Right now I'm trying to do the following: *Collocated variables *10X10 equi-spaced Cartesian grid *Explicit Euler for time integration

I'm following Ferziger and Peric (3rd. ed). The procedure I'm trying to follow is on page 170: 1) Start w/ velocity field (divergence free) 2) Compute Hx,y (discretization of advective and viscous terms for x and y momentum equations) at cell centers 3) Solve Poisson equation for new pressure 4) Update velocity field

Since the variables are collocated, the form of the Poisson equation that I'm using is on page 199, equation 7.126. It is the inconsistent Poisson equation, with pressure differenced twice using central differencing, and Hx,y (from step 2) is interpolated on cell edges using the values at the cell centers (page 200, eq. 7.127), then central differenced.

My question is, how do you calculate the pressure and H on the boundary edges? Right now I'm just extrapolating to the edge using the neighboring derivative, but it doesn't work.

Any clarification or advice would be great. Thanks.


  Reply With Quote

Old   October 14, 2005, 02:25
Default Re: 2D Explicit CFD - dumb/frustrating question
Posts: n/a
hi, for 2d finite volume code and 2d cavity flow the H on the boundary edges are all known(since velocity is given there), you needn't extrapolate it at all. hope this helps
  Reply With Quote

Old   October 14, 2005, 08:06
Default Thanks, dragon
Posts: n/a
Thank you for your response, dragon.

I don't know if I made it clear before, but I'm using a collocated grid, not a staggered one. The variables are located at the cell centers, not the vertices.

After more thought, I'm guessing that the interpolation of H must be done in some way so that when you add it to the pressure discretization is equivalent to the boundary condition for velocity (if one were to simply put the new velocities into the continuity equation).

For now I got my first code running by doing just that. The aim is to solve the Poisson equation. I'm using a modified Newton's method (I know, inefficient for now compared to just treating it as a linear problem). For each guess of Pressure, I'm explicitly updating the velocity, then computing the divergence of the velocity, and zeroing out the result (i.e., satisfying the continuity equation). The boundary conditions there are extrapolation of pressure from the interior cells, and velocity boundary conditions (driven-lid boundary conditions). The boundary condition for H is side-stepped in this way.

Thanks again, Kevin

  Reply With Quote

Old   October 15, 2005, 05:35
Default Re: 2D Explicit CFD - dumb/frustrating question
Posts: n/a
I see it is a colocated grid but in the pressure equation,H appears in a divergence operator,when discretized with the finite volume method, the volume integral of dHi/dXi can be transformed into the boundary surface integral. Thus you need not interpolate it at all ,just use the value in the boundary surface(Line) is enough.
  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD output question Moonlighter Main CFD Forum 2 December 21, 2009 15:29
Question regarding CFD PhD Mateo Main CFD Forum 4 January 5, 2006 04:52
Where do we go from here? CFD in 2001 John C. Chien Main CFD Forum 36 January 24, 2001 22:10
explicit CFD solver and multigrid John Buckley Main CFD Forum 5 March 8, 2000 06:00
PC vs. Workstation Tim Franke Main CFD Forum 5 September 29, 1999 15:01

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