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

CFD toolkit or from scratch?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Fenris9469

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2012, 04:53
Default CFD toolkit or from scratch?
  #1
New Member
 
Join Date: Jun 2012
Posts: 5
Rep Power: 13
serviet is on a distinguished road
Hello everyone,

i have to start writting a new cfd code and i really wonder what is the drawback of CFD toolkits (openfoam or freefem) again rewritting everything for a really specific use case?
As i can tell, by beginning from scratch, you're able to choose between all numerical schemes and technical stuff (parallel, kinds of meshes...) you want depending on your needs between precision and performance. But regarding the poor programming skills of physicists in front of the custom solution designed by the opensource community...
Someone can make a good case for it?

Thx for your answers.
serviet is offline   Reply With Quote

Old   June 7, 2012, 12:01
Default
  #2
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
It all depends on what you are trying to to. If you are interested in solving a flow problem for an established code exists, then go ahead and use that. Writing a CFD code that runs in parallel efficiently and solves complicated physics is very time consuming.

However, if there's no code out there that does what you need or if you are interested in actual code development, then, by all means, go and write your own code.... you will learn a lot and have fun doing it, but it will take some of your time.
cfdnewbie is offline   Reply With Quote

Old   June 7, 2012, 13:27
Default
  #3
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 498
Rep Power: 20
JBeilke is on a distinguished road
It depends on what you want to do with the code later.

Search the web for "gpl commercial use".
JBeilke is offline   Reply With Quote

Old   June 12, 2012, 14:39
Default
  #4
New Member
 
Andreas P
Join Date: Sep 2010
Posts: 26
Rep Power: 15
andreasp is on a distinguished road
I would always recommend to go at least with an existing framework, if you really want to produce a code usable on realistic applications.

Even if there is no software out there which can solve your specific problem out of the box, I believe it is much more efficient to extend some given "back bone" code rather than starting your own project from scratch. Just think of such basic challenges like mesh handling, memory management, etc. before you can actually start programming your *equations* -- the heart of your code. There are many open source frameworks available which readily provide this infrastructure (e.g. DUNE, OF). It might be cumbersome to understand their structure/philosophy, but I think in the end it pays off.

However, I also agree with the previous answers: If you want to gain knowledge in mathematics, numerical methods and/or basic FV/FEM code development (preferably with only a 1D or 2D code), then go for it!
andreasp is offline   Reply With Quote

Old   June 12, 2012, 20:56
Default
  #5
New Member
 
Seth Thompson
Join Date: Jun 2012
Posts: 4
Rep Power: 13
Fenris9469 is on a distinguished road
I have been writing my own FEM code for several years. I have to say while there will be many stumbling blocks you will learn a lot from the experience. that being said it is by no means a quick process (Assuming you are trying to go for a general purpose do lots of neat stuff bells and whistles) even with good programming skills. I would counsel you to ask what your goals are for the code? if you are looking for the knowledge of how it works and are one of those people who needs to reinvent the wheel before you accept something else, I say go for it. I would start simple work in 1-D and then 2-D then 3-D. Bear in mind each method has pros and cons and once you commit and are deep into one method you probably won't want to turn back and are stuck with the required work around of that method (of which there are many for all methods).

Hope this Helps,

Seth
krisshoe likes this.
Fenris9469 is offline   Reply With Quote

Old   June 13, 2012, 06:48
Default
  #6
New Member
 
Join Date: Jun 2012
Posts: 5
Rep Power: 13
serviet is on a distinguished road
Thank you all,

I've already wrote several codes (FEM,FV, spectral and in fortran,c++...) so i begin to be familiar with the different numerical schemes The problem is indeed more about software engeneering : as andreasp and fenris said, I don't need to reinvent the wheel especially for technical improvments like multigrid mesh handling or parralel computing. OS solution exists and are maintained by community. I don't know DUNE or OF, but as far as i saw openFOAM let you choose between a lot of solution for numerical schemes, boundary conditions or linear solver. However, I don't really know about the future of my code and so, maybe will it be sold one day
No joke, what's the best OS framework on your mind to deal with CFD?
serviet is offline   Reply With Quote

Old   June 13, 2012, 08:12
Default
  #7
New Member
 
Seth Thompson
Join Date: Jun 2012
Posts: 4
Rep Power: 13
Fenris9469 is on a distinguished road
That depends on the goal of the code. If you want it to be general purpose and you want to sell it. Then it needs to be stable on all platforms. Not to mention as easy to use as possible.
Fenris9469 is offline   Reply With Quote

Old   June 13, 2012, 09:03
Default
  #8
Member
 
SergeAS's Avatar
 
Serge A. Suchkov
Join Date: Oct 2011
Location: Moscow, Russia
Posts: 74
Blog Entries: 5
Rep Power: 14
SergeAS is on a distinguished road
Send a message via Skype™ to SergeAS
I think when you write your own CFD/FEM code, the most valuable is not the code itself but the experience that you get. It costs more than any code.
__________________
OpenHyperFLOW2D Project
SergeAS is offline   Reply With Quote

Old   June 13, 2012, 17:30
Default
  #9
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
Quote:
Originally Posted by Fenris9469 View Post
That depends on the goal of the code. If you want it to be general purpose and you want to sell it. Then it needs to be stable on all platforms. Not to mention as easy to use as possible.
as well as very stable in terms of sensitivity to input parameters by the user.... you don't want your hotline to be flooded by complaints that the code blows up all the time... but you pay for stability the price of accuracy...
cfdnewbie is offline   Reply With Quote

Old   June 13, 2012, 20:16
Default
  #10
New Member
 
Join Date: Jun 2012
Posts: 5
Rep Power: 13
serviet is on a distinguished road
don't worry, sadly I really don't think it has any chance to be sold... This is just for analyse purposes, so I wonder if it could be of great utility to let us easily switch between different numerical solutions with the help of kind-of factory-classes by exemple...
If I don't really need to gain more knowledge, but if I prefer an easily maintable code, which use well structured and optimized code for simple operations (3D derivatives) or whatever...? Which are the other good points beginning from scratch??
Thanks again !
serviet 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
STAR-Works : Mainstream CAD with CFD CD adapco Group Marketing Siemens 0 February 13, 2002 12:23
Where do we go from here? CFD in 2001 John C. Chien Main CFD Forum 36 January 24, 2001 21:10
ASME CFD Symposium, Atlanta, July 2001 Chris R. Kleijn Main CFD Forum 0 August 21, 2000 04:49
Since Last June John C. Chien Main CFD Forum 3 July 12, 1999 09:38
Which is better to develop in-house CFD code or to buy a available CFD package. Tareq Al-shaalan Main CFD Forum 10 June 12, 1999 23:27


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