# 2D Explicit CFD - dumb/frustrating question

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

 October 13, 2005, 11:53 2D Explicit CFD - dumb/frustrating question #1 Kevin Guest   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. -Kevin

 October 14, 2005, 02:25 Re: 2D Explicit CFD - dumb/frustrating question #2 dragon Guest   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

 October 14, 2005, 08:06 Thanks, dragon #3 Kevin Guest   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

 October 15, 2005, 05:35 Re: 2D Explicit CFD - dumb/frustrating question #4 dragon Guest   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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Moonlighter Main CFD Forum 2 December 21, 2009 15:29 Mateo Main CFD Forum 4 January 5, 2006 04:52 John C. Chien Main CFD Forum 36 January 24, 2001 22:10 John Buckley Main CFD Forum 5 March 8, 2000 06:00 Tim Franke Main CFD Forum 5 September 29, 1999 15:01

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