CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Solution of Navier-Stokes with FEM in Matlab (https://www.cfd-online.com/Forums/main/76066-solution-navier-stokes-fem-matlab.html)

vincial May 13, 2010 05:12

Solution of Navier-Stokes with FEM in Matlab
 
Hello everyone,
I'm an italian student of Aerospace Engineering, and I've to do just the last exam for the bachelor degree. Unfortunately, this exam is very difficult, and so I hope that someone can help me because the professor hasn't explain this tool.

I've to create a tool in Matlab that resolve Navier-Stokes equations in a square domain, using the Finite Element Method and Galerkin matrix. I've to use a staggered grid.

I cannot begin this tool, and so I'm waiting for your suggestions...

Thanks.

amar raza May 23, 2010 07:31

same problem
 
I also need the same information. If you got it, can you share it with me.

Amar

Quote:

Originally Posted by vincial (Post 258605)
Hello everyone,
I'm an italian student of Aerospace Engineering, and I've to do just the last exam for the bachelor degree. Unfortunately, this exam is very difficult, and so I hope that someone can help me because the professor hasn't explain this tool.

I've to create a tool in Matlab that resolve Navier-Stokes equations in a square domain, using the Finite Element Method and Galerkin matrix. I've to use a staggered grid.

I cannot begin this tool, and so I'm waiting for your suggestions...

Thanks.


walli May 25, 2010 10:10

If you want to learn something: Do it for a simple mesh with paper and pen first, do not start coding right away... Start with Poisson's problem. Then Stokes and Advection-Diffusion. If you can do the stabilization of the advective term (e.g. by some upwindig like SUPG or similar) and a mixed problem, Navier-Stokes is more or less straightforward if you linearize the problem. The steps to develop a FE code are always the same. You need some mesh generation procedure or some import function for generated meshes. Then you need some piece of code to evaluate shape functions and their gradients and some transformation stuff between physical and reference geometries. The rest is just numerical integration, assembly and solving the linear system. There are a couple of books, which focus on FEM with Matlab. Maybe you can get one of those for further information.

If you just want code for your exam... Google for IFISS and see if you can understand it. There are also many other code samples available online which you can modify. In any case... understanding what you do helps.


All times are GMT -4. The time now is 01:04.