|
[Sponsors] |
2D backward staggered SIMPLE MATLAB turbulent |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 25, 2012, 16:49 |
2D backward staggered SIMPLE MATLAB turbulent
|
#1 |
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14 |
Hello everyone!
My name is Michael Moor, I'm doing my MEng in Aeronautical engineerring, and my thesis is to develop my own CFD code in MATLAB, including turbulence (2D only, i'll only be doing the prandtl mixing length and k-epsilon models). I have started to solve a simple convection-diffusion flow between two stationary plates, and tried to incorporate inflow-outflow boundary conditions, with a hybrid differencing scheme. I'd like to think that I am 85% finished... firstly i want to solve for laminar flow, and then include turbulence models once the basic model is working... so far I have: - Created a backward staggered grid. I have included he un-used nodes i1 and j1, just to make it more clear, and to keep matrix dimensions the same. The way that I have manipulated and defined the matrices also allows for the same indexing as used by Versteeg, hopefully making it easier to read! - employed a hybrid differencing scheme - used predominantly matrix manipulation (on advice) to construct all of the coefficients and equations... a few "for loops" to keep the order of the u, v, p' and scalar cells the same - included the often neglected source term which comes from the derivation of the NS equations (is it overly important? it may be causing my divergence... - solved for u*, v* and p', although the coefficient matrices for v* and p' are not diagonally dominant, the v* gauss seidel still converges, but the p' does not, i.e. the pressure correction is not converging... I am wondering if that is because I have made a mistake with the boundary conditions (which I am also slightly perplexed about, a common theme I have seen in these posts!) or is it simply because of the initial poor guess? - used the Gauss seidel method for solving the momentum and pressure correction equations ( I have followed as closely as I can to Versteeg and Malalasakera). -"solved" for the new pressure and new velocites using the converged u* and v* values, as well as the unconverged p' values - I am about to attempt to get the whole process to iterate... BUT, before I try and start iterating the process, I am new to this forum and am not sure where to go or how to allow people to see my code and help me, I am not a particularly strong programmer, it has been a long hard slog, but everything is fairly explicit and I have annotated the code pretty well, I think that it would help beginners, (if it is correct, plus, I am basically a beginner myself!!), and similarly help me by allowing people to forward their suggestions, or more importantly to point out mistakes that I have made. I would greatly appreciate your help in 1. looking at my code yourself and offering suggestions/correcting mistakes 2. helping me to get more help and understanding (not necessarily from you as I am sure that you are very busy)/ spread my work to help others with similar problems and to get them to help me! I hope that you are still an active member and can help me out, i'd really appreciate it!! Best Regards, Michael Moor Last edited by michaelmoor.aero; May 25, 2012 at 16:51. Reason: include convection-diffusion and hybrid differencing scheme |
|
May 31, 2012, 18:32 |
SIMPLE Algorithm
|
#2 |
New Member
Join Date: May 2012
Location: USA
Posts: 14
Rep Power: 14 |
Good to know there are other people out there interested in the same type of engineering problems as myself. I'm a mech. engineering grad student with emphasis in fluid dynamics/heat transfer.
I've been looking on-line for sample codes in attempts to guide me in creating my own finite volume CFD code in MATLAB but there hasn't been much help. My programming background is weak so it's difficult for me to jump right in and develop my own code. I've read up on several books to familiarize myself with the physics behind the solutions but I've had difficulty in finding good code that I can learn from. If I come across anything or develop any code that might help you I'll be sure to let you know in case it would help you. May I see your sample code? I might be able to offer up a few tips from what I do know so far. Thanks! |
|
June 7, 2012, 12:49 |
|
#3 |
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14 |
no problem, i got your email and have replied to it, a work in progress, but the basics are there
|
|
September 19, 2012, 13:34 |
|
#4 |
Senior Member
Join Date: Dec 2011
Location: Madrid, Spain
Posts: 134
Rep Power: 16 |
Hi Michael, sorry for the late reply but your thread came up after a forum search. It turns out I'm also trying to develop my own 2D incompressible CFD code in MATLAB following Versteeg & Malalasekera. So far I'm only able to solve the convection-diffusion equation for a general variable phi (assuming a velocity field), but I'm struggling to code the fluid flow solver part.
Hopefully we can share some knowledge/experiences/problems and solutions. About your convergence problem: did you try to under-relax the solution of the p' equation? I think a value of omega~0.2 (relaxation coefficient) is recommended in Versteeg & Malalasekera. Cheers, Michujo. |
|
September 21, 2012, 05:33 |
|
#5 | |
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14 |
Quote:
I have succesfully completed the solver, using both Simple and Simplec. If you provided me with an address, I would be more than happy to share it with you, and to help you through it! It was constructed in such a way as to be educational, so I hope that it will be of help to you! Best Regards, Michael Moor |
||
January 27, 2013, 10:37 |
Simple
|
#6 | |
New Member
|
Quote:
I would appreciate a reply .. Thanks |
||
January 27, 2013, 11:21 |
|
#7 |
Super Moderator
|
A good way to publicly share matlab code is on matlab central
http://www.mathworks.in/matlabcentral/ |
|
January 27, 2013, 11:25 |
.
|
#8 |
New Member
|
I posted here because the friends in here are talking about the subject that Im having problems in .. I would like to share codes via email and not to publicly share them .. Thanks paraveen for ur reply !
|
|
January 29, 2013, 12:41 |
|
#9 |
Senior Member
|
where is my little gifts? I think you should show the basis respect to me.
|
|
January 29, 2013, 21:10 |
|
#10 |
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14 |
Hello everyone, my apologies for the delay!
I am more than happy to help you, just send me an email and I can forward it on! I was/am hoping to make my own small website to post it, but I must first put it on the MATLAB site as previously suggested! As ztdep has correctly stated, all of my work would not have come about without his invaluable help, thanks again! |
|
January 29, 2013, 21:15 |
|
#11 | |
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14 |
Quote:
|
||
February 10, 2013, 11:02 |
!
|
#12 |
New Member
|
Nobody helped me !
|
|
February 11, 2013, 06:02 |
|
#13 |
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14 |
||
February 12, 2013, 08:01 |
Thanks MichaelMore
|
#14 |
New Member
|
Oh Im so Sorry I didn't think your post was directed to me .. I would be honored to send you me email : huss.ma3@gmail.com
Sorry once again for any mis-communication. |
|
February 15, 2013, 17:02 |
|
#15 | |
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14 |
Quote:
|
||
February 15, 2013, 17:45 |
|
#16 |
Member
G. S.
Join Date: Nov 2010
Posts: 54
Rep Power: 16 |
hello people,
Perhaps we should do something like a blog just for us, Michael and Ding both know me I'm in the same situation like many of you and them, developing incompressible 2d code. In my case I'm using the cvfem approach with collocated variables and still stucked in inflow and outflow problems, also dedicating some time to improve my code making it faster using less for loops... It would be great if there is a way to share more directly experiences and advices with you guys... Let me know your proposals about a way to keep constantly in toouch Best regards Hi michael and ding, long time we dont chat... |
|
April 15, 2013, 08:13 |
need fvm code for SIMPLE
|
#17 |
New Member
hellboy
Join Date: Apr 2013
Posts: 1
Rep Power: 0 |
||
May 1, 2013, 15:51 |
Blog proposal
|
#18 |
New Member
Join Date: May 2012
Location: USA
Posts: 14
Rep Power: 14 |
I would be interested in keeping in touch with all fellow members who are interested in similar topics. I seem to make a little progress in my code but then I bang my head against the keyboard for a few weeks until it's resolved.
If we had a place to go to ask questions I believe it would make our research struggles much less painful. Let me know what you guys decide to do and I'd happily participate. |
|
February 1, 2016, 11:47 |
Matlab code for steady incompressible laminar flow
|
#19 |
New Member
Debayan
Join Date: Jan 2016
Posts: 1
Rep Power: 0 |
Hi Michael,
I have made matlab codes for simple convection diffusion problems with a known velocity field as given in Versteeg book. But finding difficulty to solve the momentum equation fpr a laminar in compressible steady flow. I would be very grateful if you could send me your code. My email id is dasguptadebayan@gmail.com Regards Debayan |
|
October 5, 2021, 18:35 |
Code sharing
|
#20 |
New Member
Yann Scott
Join Date: Oct 2019
Posts: 5
Rep Power: 7 |
Hi Michael,
I am solving a turbulent 1D equation using three different turbulence model: Prandtl mixing length, k-epsilon and K-omega. However, I'm finding difficulty to solve explicitly the equations. I would be very grateful if you could send me your code. My email id is yannbirnie@gmail.com Regards Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turbulent flow over a backward facing step | Jenner | Main CFD Forum | 1 | December 2, 2006 12:21 |
Turbulent flow over backward step | Jenner | Main CFD Forum | 2 | November 20, 2006 06:22 |
A simple question | Q | Main CFD Forum | 3 | November 16, 2005 04:37 |
About low Re number turbulent flows | gorka | Main CFD Forum | 13 | April 2, 2003 06:19 |
turbulent flow over a backward facing step | Kirill | Main CFD Forum | 4 | November 5, 2002 10:04 |