CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   MATLAB PROGRAMMING (https://www.cfd-online.com/Forums/fluent/47880-matlab-programming.html)

Natasha April 10, 2008 22:04

MATLAB PROGRAMMING
 
Well..i am doing a project to study the wind flow and around a AUTOMOBILE ROTATING WHEEL...the catch is that i can do the analysis in fluent.However my professor wants to write a algorithm in MATLAB and run the program to study this flow effect..i have no clue how to do it...if any1 can help me with matlab, that would be really kind...my problem is stated below

Diameter of wheel =400 mm Width of the wheel=200 mm Contact length with road=50 mm Length of wind tunnel= 5.5 mm Height of wind tunnel=2.2 mm Width of wind tunnel=4.8 mm Inlet Air velocity=20 m/s (45mph) Outlet Pressure= 0 atmp Rotational speed of wheel=100 rad/s( 954 rpm) Velocity of the road= 20 m/s (45 mph)

please give ur responses freely...thanks in advance

Kasper April 11, 2008 08:59

Re: MATLAB PROGRAMMING
 
Matlab is not that difficult. It is very strong on vector/matrix notation. I would say that you can learn it very quick. What is it exactly you wan't to do? Which equation do you want to solve and so on??

You must have some assumptions, since it will be pretty difficult to solve in 3d in matlab.

I can help you if you describe your problem.

Best regards Kasper Skriver

Natasha April 11, 2008 10:16

Re: MATLAB PROGRAMMING
 
Hi Kasper,

thanks for the reply ! i appreciate..well my problem consists of drawing a rectangular wind tunnel in matlab. i want to do only in 2d. the wind tunnel will consist of a disc at the bottom center which represents a automobile wheel.then i have to give inlet boundary condition showing air at 11 m/s velocity.outlet pressure will be 0 atmp. i have to show a rotating boundary condition on the wheel ( it represents the rotation of the automobile wheel). I just have to show the program in matlab is stable. i can use any implicit method (Runga-kutta etc ) ...i have done this project in fluent. but i have no idea how to do program in matlab. i think i have to use Navier-Strokes Equation to solve it. also CFL should be less than 1. I would be grateful if u can help. thanks and take care.

Kasper April 14, 2008 09:02

Re: MATLAB PROGRAMMING
 
I don't understand how your proffesor expects you to accomplish this if you don't have any background in Matlab.

Just to understand the problem fully. You want to solve the flow in 2D by use of Matlab instead of Fluent?

First problem is then the mesh and second problem is to create a solver in Matlab that can work on your mesh. Both are quite complicated since it involves incorporating the wheel.

Please tell me what you mean by "i have done this project in fluent". What did you exactly do? Mesh in Gambit? and solution in fluent?

BR Kasper Skriver

Kiran Muley April 14, 2008 09:13

Re: MATLAB PROGRAMMING
 
Hello, Solving Problem in Fluent is totally different than solving it by programming. Steps require to do programing. It is must that u need to solve NS equation.. ( considering u don't need thermal analysis). if u had any CFD course thn u will easily understand that..

1. set u r Model ( N-s equation with assumption)

2. Formulation ( applying discretization method FEM/FVM/FDM)

3. Mess generation as u r problem is 2d u can easily draw profile in matlab and divide it into elements

4. get u r [k][x]=[f] matrix.. ie global stiffness matrix.( apply u r boundary condition according )

5. this matrix is nothing but set of linear equation.. u have ready made function .. eg. solve(a) in matlab get the vlaues of variable..

ones u got variable values thn other stuff is easy ... even u can do animation and postprossing in matlab.

if u dont knw matlab thn start learning it.. its easy and 2ed u need to know how to solve NS by numerical method..

best luck ..

Natasha May 1, 2008 21:29

Re: MATLAB PROGRAMMING
 
hi kiran..plz help me out...i need to draw a rectangle with a circular disc at the bottom of the rectangle in the center.how do i draw it in matlab.please tell me the program urgently.i need it urgently .plz plz help me.thanks

m@rk@s May 4, 2008 08:48

Re: MATLAB PROGRAMMING
 
Dear Natasha, would you elaborate your final output that you want from Matlab?

monmokhmokh March 6, 2011 07:17

HI
 
Hi
I have a problem
I want to Mesh scheme a Rectangular ( 40*20)
that they be smaller and smaller when they close to Borders , in fact in center of rectangular we musat have largest mesh
I want to draw this in tecplot
but I can't do the program in matlab
I am trying to leran it...but ....:(
please help me to write this program
Thnky:)u

morteza08 March 7, 2011 13:57

Quote:

Originally Posted by monmokhmokh (Post 298096)
Hi
I have a problem
I want to Mesh scheme a Rectangular ( 40*20)
that they be smaller and smaller when they close to Borders , in fact in center of rectangular we musat have largest mesh
I want to draw this in tecplot
but I can't do the program in matlab
I am trying to leran it...but ....:(
please help me to write this program
Thnky:)u

Dear friend
First of all. you must learn about generating mesh . I recommend you to the related e-books and pdfs by searching in google
you can use this keyword or something similar to this:
structured mesh generation in a rectangular domain

also you can read this ebook :
computational fluid dynamics by hoffman
------------------
I have a fortran code that generates mesh in a rectangular. the code has the capability for stretching mesh..

let me know if you find this useful

zaynah04 October 5, 2013 13:41

hi..

Ihave my mesh in Gambit, i want to see it on matlab..

How can i do this in matlab? i have tried to import the data and plot it, but its not what i need..

Any advice and help bestowed towards me is most appreciated.

sbaffini October 9, 2013 03:13

http://www.cfd-online.com/Forums/blo...ume-tools.html


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