CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

New to CDF programming. Need Guidance.

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By sbaffini
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2017, 11:31
Default New to CFD programming. Need Guidance.
  #1
New Member
 
Abruce
Join Date: Jan 2017
Posts: 3
Rep Power: 9
negative9 is on a distinguished road
I'm taking my first CFD class (Grad) and I've been assigned HW of course. I'm very new at this. I've been assigned to fulfill my HW in MATLAB. My instructor has/ isn't very helpful with this matter. My first question: with the equations in the book(my HW), they list no variables to plug in. Am I just programming the equation and running it to verify it's function, or do I give my own variables to fulfill an answer?

My text book is Computational Fluid Dynamics and Heat transfer, third edition.

Any tips In Matlab to start me off, would be greatly helpful. I have until today to achieve some direction, or I'll be forced to drop. I've been at it for two days with no success of achieving some answers.

Thanks -9

Last edited by negative9; January 23, 2017 at 06:17. Reason: Wrong title
negative9 is offline   Reply With Quote

Old   January 23, 2017, 03:51
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I suggest to drop... it's CFD
sbaffini is offline   Reply With Quote

Old   January 23, 2017, 10:31
Default Don't drop! Never give up!
  #3
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 9
CFD-Lover is on a distinguished road
Dear Abruce,

Usually, even if you were a good programmer, the problem itself could be hard. Therefore, I would suggest to read about Matlab. There are many sources that could guide step by step. You could use Youtube for instance to learn for loops as well as while loops storing ...etc. You can also search on the internet on similar problems. Trust, google will make the tick! Group study with people know programming is also helpful!

There are many sources that could boost your weakness and patience is a virtue!

Best,
CFD-Lover is offline   Reply With Quote

Old   January 28, 2017, 11:33
Default
  #4
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
Just a few suggestions

You have several problems:
- Understanding the physics.
- Learning how to program (you can look for it in the internet and any other book that explain how to program)
- Learning how to program in Matlab (as some others have suggested there are tons of sources in the internet you can look at, for example, tutorials in youtube, etc.).
- try to map the particular set of Navier-Stokes equation in Matlab.

This is a big gap that it is not easy to fill. Do not expect a silver bullet on this.

I am not going to discourage, but prepare for it and be patient.
HectorRedal is offline   Reply With Quote

Old   January 29, 2017, 04:41
Default Thank You Sir
  #5
New Member
 
Abruce
Join Date: Jan 2017
Posts: 3
Rep Power: 9
negative9 is on a distinguished road
I was forced to drop the class due to not being quite ready for it. I did however manage to gain a clear direction in the three trying days to be successful. I'm now focusing on my skills as a programmer in matlab. I conversed with my instructor and it was advised to gain a better knowledge of the tool before attempting the class again. The Navier-Stokes equation can be achieved in matlab? I thought this was an unsolvable equation? I know it's modeled for the viscous flow application. I will research this subject further....


Thanks for the advice.
negative9 is offline   Reply With Quote

Old   January 29, 2017, 07:00
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I just want to add that my comment was not meant to be mean. But, especially at the point where you are, such roughness is better than politeness. As then you either drop for real and never come back, saving time for something you're really into or, by the shock, somehow, you totally change attitude and get into the path.

I've been there, and in some cases there is no other way around.

It's up to you.
sbaffini is offline   Reply With Quote

Old   January 29, 2017, 08:44
Default
  #7
New Member
 
Abruce
Join Date: Jan 2017
Posts: 3
Rep Power: 9
negative9 is on a distinguished road
How long did it take to get a good grasp on the subject matter in order to be proficient in your studies? What were some of your earlier assignments to tackle that made things clear?


Thanks -9
negative9 is offline   Reply With Quote

Old   January 29, 2017, 09:32
Default
  #8
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by negative9 View Post
How long did it take to get a good grasp on the subject matter in order to be proficient in your studies? What were some of your earlier assignments to tackle that made things clear?
Thanks -9
I am too slow so it was almost a year when it started to make some sense. Add another year and i got a little bit of feel of it.
arjun is offline   Reply With Quote

Old   January 29, 2017, 10:31
Default
  #9
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by negative9 View Post
How long did it take to get a good grasp on the subject matter in order to be proficient in your studies? What were some of your earlier assignments to tackle that made things clear?


Thanks -9
I don't know if I can give you the answer you want.

For me, it always sounds strange when some student comes here, without even knowing what to do with the equations or what they mean, and asks help in solving them with some numerical method they have never heard of. In the process that bringed the student to this point there is clearly something wrong.

How it worked for me:

- fluid dynamics and programming course at the first bachelor year
- aerodynamics course (including panel method programming) at the second bachelor year
- compressible aerodynamics, basic numerical methods and 2 turbulence courses at the third bachelor year
- bachelor thesis using a commercial CFD solver and programming its UDF
- advanced courses on aerodynamics (with programming) and numerical solution of PDE at the first master year
- 2 courses on CFD (with programming) and 1 on advanced compressible aerodynamics at the second master year
- master thesis on LES using a commercial CFD solver
- phd courses/tasks with more programming and theory related to CFD
- phd thesis on LES

and this list does not include programming and/or numerical methods as were necessary in, say, courses or tasks not related to fluid dynamics.

As you can notice, I was not suddenly dropped in a CFD course at the first year and required to numerically solve the NS equation with a program written by myself. It was a path. Not all the paths are equal or required to delve as much into numerical methods or fluid dynamics. Still, the cronological order of the events is something you can't really change.

There are some career paths which don't actually expect you to numerically solve anything but just to use commercial codes. But even in those cases, the relative courses still provide a minimum amount of theory related to the methods and, most important, they do not actually ask you to solve anything if that was not part of the program. You simply can't if nobody teached you.
Stevie_1200 likes this.
sbaffini is offline   Reply With Quote

Old   January 29, 2017, 12:43
Default
  #10
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by sbaffini View Post
As you can notice, I was not suddenly dropped in a CFD course at the first year and required to numerically solve the NS equation with a program written by myself. .

This is too much to ask i think from students specially when they don;t have much background.
arjun is offline   Reply With Quote

Old   January 29, 2017, 12:56
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Actually, not only in the forum we see students asking for some work to do in numerical simulation they do not understand but that is what is happening in the university...just use a CFD software like a TV on demand.
And let me stop here my comments...
sbaffini likes this.
FMDenaro is online now   Reply With Quote

Old   January 30, 2017, 03:08
Default
  #12
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by arjun View Post
This is too much to ask i think from students specially when they don;t have much background.
Yes, that's exactly my point. But then, either this is one of those cases or the student is faulty.
sbaffini is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Additional Programming Course November 2016 thg OpenFOAM Announcements from Other Sources 0 October 20, 2016 16:23
How can i make a parallel programming in OpenFOAM? jignesh_thaker2007 OpenFOAM Running, Solving & CFD 3 July 2, 2014 09:37
A book for a beginner wanting to learn programming frank Main CFD Forum 9 May 12, 2014 23:15
Programming in OpenFOAM vinu OpenFOAM 2 July 11, 2009 10:16
new CFD Programming Forum Thinker Main CFD Forum 14 November 19, 2002 16:03


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