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

writing a cfd code

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 11, 2005, 18:52
Default writing a cfd code
  #1
kelvin
Guest
 
Posts: n/a
dear all,

i was given a home take exam to write a cfd code based on FDM and FEM for the poisson equation. the due date is just end of this week.

i am told to use any solver (downloading from the net). so can u guys out there help me....what steps i should follow and if i can be done before the due (i don't even know how much it takes.)

i want to use C++. where can i get the solver from? please, any ideas and/or any code (which i can see as example)!

thanks.
  Reply With Quote

Old   October 11, 2005, 19:54
Default Re: writing a cfd code
  #2
zxaar
Guest
 
Posts: n/a
end of this week will be difficult to meet. (sorry i do not have much experience with FEM FDM, so could not suggest anything).
  Reply With Quote

Old   October 11, 2005, 19:55
Default Re: writing a cfd code
  #3
zxaar
Guest
 
Posts: n/a
end of this week will be difficult to meet. (sorry i do not have much experience with FEM FDM, so could not suggest anything). i probably will be able to help with the solver part though.
  Reply With Quote

Old   October 11, 2005, 19:59
Default Re: writing a cfd code
  #4
kelvin
Guest
 
Posts: n/a
thanks, zxaar:

but i have to do it anyway...i dont know how though. i will still appreciate if u can pass me the solver atleast. thank u so much!
  Reply With Quote

Old   October 11, 2005, 20:27
Default Re: writing a cfd code
  #5
Renato
Guest
 
Posts: n/a
Try this one:

http://www.csit.fsu.edu/~burkardt/cp...2d/nast2d.html

This program is written in C++ and is fully described in the following book (including common CFD benchmark problems):

Michael Griebel, Thomas Dornseifer and Tilman Neunhoeffer, "Numerical Simulation in Fluid Dynamics", SIAM, 1998

Cheers

Renato.
  Reply With Quote

Old   October 11, 2005, 21:16
Default Re: writing a cfd code
  #6
Peter
Guest
 
Posts: n/a
So your professor told you to write a code to solve the Poisson equation without any previous instruction on the FEM or FDM method? You have no text book? No class notes? There are about 1000 text books out there which you can borrow to get an idea of how to set up a solution. Stop being lazy.
  Reply With Quote

Old   October 11, 2005, 21:23
Default Re: writing a cfd code
  #7
Andrew Mettler Hayes
Guest
 
Posts: n/a
the first thing you need to do is write the equations down and descretize them. Then, write down the first few steps and see how the matrices are formed. Once you understand that, you wont have much of a problem.
  Reply With Quote

Old   October 12, 2005, 05:09
Default Re: writing a cfd code
  #8
zxaar
Guest
 
Posts: n/a
read about the descretisation, i will try to send you c++ files that you can add in your code and with minimal instructions you will be able to use it as solver. Since today i am very busy , think you will get them tommorrow.
  Reply With Quote

Old   October 12, 2005, 09:31
Default Re: writing a cfd code
  #9
Jonas Holdeman
Guest
 
Posts: n/a
If you get another assignment with a little more time, consider using Matlab. It takes a bit of time to learn the language, but you can write very compact code, and the solvers and graphics are part of the Matlab package.

Matlab is good for experimenting and exploring new ideas where you can keep the problem small. When you get a prototype program worked out, then implement it in C++ for more efficient operation on larger scale problems. But don't underestimate the work involved in integrating solvers and graphics.
  Reply With Quote

Old   October 12, 2005, 10:31
Default Re: writing a cfd code
  #10
kevin
Guest
 
Posts: n/a
thanks, jonas!

exactly, i will try to do the others in matlab. i have been working on matlab last year....and i hope i did not forget it completely.
  Reply With Quote

Old   October 12, 2005, 10:34
Default Re: writing a cfd code
  #11
kevin
Guest
 
Posts: n/a
ok, thanks zxaar!

tomorrow also will be fine. i will try to build the whole picture till then. i really appreciate your cooperation.

please use a.temperature@gmail.com

thanks once again.
  Reply With Quote

Old   October 12, 2005, 10:37
Default Re: writing a cfd code
  #12
kevin
Guest
 
Posts: n/a
thanks andrew,

now my problem is in the formation of the matrices. i have discretised the equation but i couldn't do it to matrices.

with regards
  Reply With Quote

Old   October 12, 2005, 15:38
Default Re: writing a cfd code
  #13
Andrew Hayes
Guest
 
Posts: n/a
you have to march through a few steps in order to see how the matrices are formed.
  Reply With Quote

Old   October 13, 2005, 05:41
Default Re: writing a cfd code
  #14
zxaar
Guest
 
Posts: n/a
i sent the mail.
  Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple CFD code for teaching basic CFD? Christoph Lund Main CFD Forum 13 September 14, 2005 04:36
CFD JOBS and Expected Salary.... Noel Harrison Main CFD Forum 11 November 22, 2000 08:15
user friendly cfd code waqar Main CFD Forum 19 August 18, 2000 16:31
CFD Salary CFD Main CFD Forum 15 September 4, 1999 14:04
Commercial CFD code Hanson G. He Main CFD Forum 1 October 15, 1998 08:49


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