MATLAB Answers


How to solve for pressure using the velocity field?

Orlando Rojas 님이 질문을 제출함. 25 Jan 2015
최근 활동 Youssef Khmou 님이 편집함. 26 Jan 2015
I'm trying to solve for the pressure field on a 120x120 grid. I have the velocity field, and I have to use the Pressure Poisson Equation to solve for the pressure. The known boundary condition is P=Patm along the right edge of the grid. Using this I can get all the boundary conditions. I've created my coefficient matrix and I've tried so many different ways to solve the problems but I keep getting and error saying "Out of memory". I've tried solving by the easiest way which is Ax=b, x=A\b. Also by using reduced row echelon form. I'm now trying to solve using lower triangular matrix and the other an upper triangular matrix, but when I try using the function lu on MATLAB, again I get the same "Out of memory" message. Any comments or ideas are appreciated.
Thank you,
Orlando R.

  댓글 수: 5

표시 이전 댓글 수: 2
What are ‘umean’ and ‘vmean’? I can’t find them in the online MATLAB documentation.
umean is on the data file u.mat and vmean is on v.mat The first is the x-component of the velocity and the second is the y-component.
OK. Thanks. I didn’t look at the .mat files yet.

로그인 to comment.

답변 수: 1

Youssef Khmou 님의 답변 26 Jan 2015

This problem is for non compressible fluid, first you have to explain the equation you want use, for this two dimensional case, the Poission Pressure equation is D(P)=d((1/Re).D(u)-u.d(u)), D is the Laplacian, d is divergence and Re denotes the Reynold number. What is not clear is that you need only one matrix for velocity u as field of x and y components, anyway i suggest that you use Jacobi method; for (i,j) component of P at iteration m+1 u have :
P(i,j,m+1) = ( P(i-1,j,m) + P(i+1,j,m) + P(i,j-1,m) + P(i,j+1,m) +C(i,j) )/4
C(i,j) is result of right hand side of equation, parallel to this approach try to use gradient function of velocity U to obtain C.

  댓글 수: 2

I've attached an image of the equation I'm trying to use.
For discrete solution, you initialize the matrix P with zeros, you define the boundaries conditions numerically and the size of P(M,N), then you implement the loop:

로그인 to comment.

Translated by