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

colver code in c or c++

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2007, 21:54
Default colver code in c or c++
  #1
phd_student
Guest
 
Posts: n/a
I am looking for a navier stokes code to base my phd work on, or to understand. Is there any code that I could refer. I have seen OpenFOAM, it is too complicate for me to understand. Is there anything easier than OpenFOam and easy to work with??
  Reply With Quote

Old   May 28, 2007, 06:18
Default Re: solver code in c or c++
  #2
another student
Guest
 
Posts: n/a
I had similar problem. Some how I settled with iNavier. I downloaded it last week and trying to understand it. It seems its pretty good code to add on to it. I liked it. And yes you are correct openFOAM is difficult to understand but is far superior to iNavier or other similar codes.
  Reply With Quote

Old   May 28, 2007, 17:06
Default Re: solver code in c or c++
  #3
Gert-Jan
Guest
 
Posts: n/a
There is also such a thing like Dolfyn. It's an Open source CFD code. You can find it at www.dolfyn.net

Gert-Jan

www.bunova.nl
  Reply With Quote

Old   May 29, 2007, 08:38
Default Re: colver code in c or c++
  #4
Eswar
Guest
 
Posts: n/a
Hello sir, Can you suggest me the any NS solver code where it can be dowloadable in the web. I am searching for this code, i am unable to get this code. Kindly send me some link. Regards Eswar...
  Reply With Quote

Old   May 29, 2007, 08:44
Default Re: colver code in c or c++
  #5
another student
Guest
 
Posts: n/a
inavier.sourceforge.net

and about dolfyn

www.dolfyn.net

you can see that there is a list of codes available on cfd-online , you can refer it
  Reply With Quote

Old   May 29, 2007, 13:43
Default Re: colver code in c or c++
  #6
jojo
Guest
 
Posts: n/a
Your comments on INAVIER are quite interesting. I understood that INAVIER has a SIMPLE solver. Is the mesh unstructured? Is it parallel? Which type of mesh format is accepted?

Thanks in advance. I have found the tarball of INAVIER but no documentation. Are you aware of any paper?
  Reply With Quote

Old   May 29, 2007, 19:48
Default Re: colver code in c or c++
  #7
another student
Guest
 
Posts: n/a
I think inavier is not parallel. And I really do not care. For my research work I needed a basic solver on which I could add my models. I found that inavier is basic solver, and I could add my code to it. I had perics codes but they are mainly 2d. Then I spent time with openFOAM, but it is too complicated for understanding. I think you should email to inaviers auther for documentation.
  Reply With Quote

Old   May 29, 2007, 22:50
Default Re: colver code in c or c++
  #8
Gonski
Guest
 
Posts: n/a
Inavier is unstructured grid solver by using mesh provided by gambit. it key ideas such as algebraic multigrid, turbulent mode(k-w,DES,LES)are similar to starccM++ and Fluent. The code seems very insteresting. According to my experience of communication with its developer. The undergoing developments toward some complicated cases are very attractive.
  Reply With Quote

Old   May 29, 2007, 23:13
Default iNavier - Description
  #9
Arjun
Guest
 
Posts: n/a
I feel I need to explain little bit about this code.

Origin: I wished to learn CFD by doing it. That is to see how the codes like Fluent etc are working. So I searched the net and found peric's codes. they were good basis for learning. Perics codes are very good for beginners. I felt the only thing Peric did not provide was a working 3 D , unstructured grid based navier stokes solver. So I thought of filling that part. By actually writing a unstructured grid based navier stokes code. So the target audience is really students who wants to learn and add their code to it. One should understand that comparing iNavier with well grown codes like OpenFOAM is futile, because OpenFOAM etc are been there for years and are developed by many people, where as iNavier is written by me only, and that too in my free time (after office what I could manage). The present code is result of last one year or so effort. Since I am the only one writing it, the documentations and tutorials etc are not there. I have started to work on this part, may be one more month and there will be lots of help regarding how to add code and work with iNavier.

Whats is iNavier? iNavier is unstructured grid based pressure based segregated solver. That provide basic Navier-Stokes solver with few useful turbulence model:[*]Spalart-Almaras and Spalart-Almaras based DES (implementation is similar to Fluent)[*]SSTKW and SSKW-based DES (implementation similar to CFX).[*]Along with this Smagorinsky based and RNG LES (as explained by Fluent's manuals).

Input and output The current input format is Fluent6.2 version format. Which is soon going to change to more easy format. And I wish to add support for input from some free mesh generators. The new format (Fluent format should also be available) should support polyhedral meshes. Output: it writes in Fieldview format, Tecplot format, and Ensight ASCII format (readable by paraview). The input and output should improve.

Development: I wish to add many things to it. So the code in future might become little complicated. For this reason the basic code, which we have currently, will be always available for students, where as the more mature code will keep on developing as newer versions. These are the areas I am working on right now: (other than writing docs for iNavier).[*] Add support for multiphase flows with VOF.[*] Addition of new turbulence model (K-LES)[*] support for mesh movement and unmatched interfaces, multiblocks etc.
[*]4. Parallelization is not my priority at the moments but at least with OpenMP based parallization could be added to it. I will see if time and situation permits. (could not see it happening in near future).

Bugs and Testing etc: Well I try to read and plan a lot before addign anything to it. And for testing the code, whether things are correct or not, I run the same calculations with Fluent and StarCCM+. If I get similar results with them I conclude the implimentation was correct since these codes are well tested.

If someone wants to use the code, he is welcome. I will be happy. I tried my best to make something useful, now how much useful this is its another thing.

  Reply With Quote

Old   May 30, 2007, 10:41
Default Re: iNavier - Description
  #10
jojo
Guest
 
Posts: n/a
Thanks a lot Arjun for this comprehensive answer.

I want to refer to this code. How do you want it to be cited? Have you published a thesis I can cite?

  Reply With Quote

Old   May 30, 2007, 15:59
Default Re: iNavier - Description
  #11
Jens
Guest
 
Posts: n/a
Hi,

Is it possible solve for thermal flows as well ?

I can not seen that from the description.

Regards

Jens
  Reply With Quote

Old   May 31, 2007, 14:23
Default Re: iNavier - Description
  #12
cfd_user
Guest
 
Posts: n/a
The source code iNavier is not available. I found only a windows executable..
  Reply With Quote

Old   May 31, 2007, 21:51
Default Re: iNavier - Description
  #13
phd_student
Guest
 
Posts: n/a
At the moment no. The reason for that is the equation for enegry, I could not understand it fully. But when I am working on VOF, I am assuming that the fluid can have thermal properties (specially viscosity density can change), so my studies about VOF are VOF plus thermal. I am trying to understand and wish to add it as soon as possible.

  Reply With Quote

Old   May 31, 2007, 21:52
Default Re: colver code in c or c++
  #14
phd_student
Guest
 
Posts: n/a
Sorry for taking over your name, just liked it.
  Reply With Quote

Old   June 4, 2007, 10:11
Default Re: iNavier - Description
  #15
Jens
Guest
 
Posts: n/a
Hi,

Your code looks interesting.

Could you give a coarse timeframe for the VOF and energy models ?

Regards

Jens

  Reply With Quote

Old   June 4, 2007, 19:33
Default Re: iNavier - Description
  #16
Arjun
Guest
 
Posts: n/a
At least a month I guess (doing all testing etc etc), this weekend, I shall be addign the basic transport equations of VOF. And shall add the equation for energy (at least doing some simple heat transfer). I guess might be faster then you expect.

  Reply With Quote

Old   June 12, 2009, 00:35
Default
  #17
New Member
 
Dengbin
Join Date: Mar 2009
Posts: 3
Rep Power: 17
wxinfxiangdb is on a distinguished road
Quote:
Originally Posted by phd_student
;49926
At the moment no. The reason for that is the equation for enegry, I could not understand it fully. But when I am working on VOF, I am assuming that the fluid can have thermal properties (specially viscosity density can change), so my studies about VOF are VOF plus thermal. I am trying to understand and wish to add it as soon as possible.
Hi,did you finish the code(about VOF) added in iNavier?Can you share with us?
Best wishes!
wxinfxiangdb is offline   Reply With Quote

Old   June 13, 2009, 09:09
Default
  #18
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
First of all let me appologize for not replying. You did send me some messages but last few months time is one thing that i did not have.

I am writing here because i do get some emails now and then so i thought i will update.

1. About VOF: To impliment VOF, i spend few days and rewrote whole inavier. Spent time making sure its accuracy and did benchmarks.
But VOF part unfortunately i could not get it to work. My solution was not stable and i could not figure out the reason. I spent few days.

Since i rewrote code i made sure that this time if someone wants to add his models into it, it would be matter of just few lines in input plus he might have to write a small function to add his models source terms thats all. All the other things solver take care.
For example (this is from one of the input files i am currently using):

Quote:
General Models : 2

##############################################
Model : "TemperatureEquation"

nvars
type time-tr name init-value

Transport var : 3

1 1 "temperature" 300
0 0 "k-fluid" 0.32
0 1 "cp-fluid" 1430

Boundary Conditions : 3

"temperature" "inlet" 300 1
"temperature" "wall1" 300 1
"temperature" "wall2" 300 1



variable solid-id type value

Solid Conditions : 0


Export Results : 2
"temperature"

"eff-visc"


##############################################


##############################################
Model : "vof-model"

nvars
type time-tr name init-value

Transport var : 1

1 1 "vof-marker" 0

Boundary Conditions : 2

"vof-marker" "inlet" 1 1
"liquid-fraction" "inlet" 1 1

variable solid-id type value

Solid Conditions : 0


Export Results : 2
"vof-marker"

"liquid-fraction"

##############################################
anyway, after i failed with VOF part i realised that all these stuff like vof, unstructured grids etc are either available as commercial code or could be done with open source codes like openFOAM.

plus i have full time job and it is really not possible for me to spend time testing and developing codes. I had been doing it for learning cfd and i did learn. I wanted to keep a code for unstructured grid that people could learn from. I think inavier is pretty easy to learn from because for each thing just open manager file and read the part where source terms are added. :
People ask how to write spalart-almaras model, we open the file and see how things are calculated and match them with theory.

Anyway since i realised its no use doing what others have already done and kept in market. I decided to do what we do not have in market.

So first i wrote particle method modules. moving particle implicit method. I now have all the frame work for working with general geometries and using particles. And its efficient. Its not stable as i wished to if someone has knowledge about it, i could share my work and make a general solver that could be used as you would use Fluent or cfx. My method are very efficient and faster. (faster than anything that i know of).

Other than this, i now have a fully working and validated against analytical solutions an immersed boundary code. This code can handle LES type flows and it is fully implicit.
The same code could be used in place of Polyflow for power law fluids (polymers) with partial slip boundary conditions. (a large part of industry needs this).
And this immersed boundry code allows motion of solids in domain as immersed boundary codes do.

i wish to share this immersed boundary code as open source, but main problem is that my company does not want me to make it public. Because it does some of the problems we failed with polyflow for last 2 years. And no commercial code at the moment could do it.
So in coming months if things change i hope we will have an open source immersed boundary code that allow motion of solids.
(its working beautifully i recently calculated a 50 million cell case with excellent results).

So again sorry guys if i do not reply emails. I keep busy and many times i do not even see my emails.
arjun is offline   Reply With Quote

Old   June 14, 2009, 00:34
Default
  #19
New Member
 
Dengbin
Join Date: Mar 2009
Posts: 3
Rep Power: 17
wxinfxiangdb is on a distinguished road
Hi Arjun
Thank for your reply! I'm sorry to trouble you again.In order to adding Vof model in it ,I have readed a larger number of papers,but there are also many question!Which of numerical forms to employ(Use gama or CICSAM)?How to use them based on arbitrarily unstructured meshes?
If possible ,can you send me the code you rewrited Inavier with VOF?I think I can learn much more about it(especially the thought about VOF)!I'm very interesting in Inavier,I hope you can help me!Thank you very much!

Best wishes!

Dengbin
wxinfxiangdb is offline   Reply With Quote

Old   December 8, 2009, 10:32
Default
  #20
Member
 
Bernard Esterhuyse
Join Date: Mar 2009
Location: Pretoria, South Africa
Posts: 50
Rep Power: 17
bernarde is on a distinguished road
Hi all

Could anybody refer me to a free mesh generator than can generate meshes in Fluent format (.msh) for me to use with iNavier?

How do you guys generate meshes for use with iNavier?

Best regards

Bernard
bernarde 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
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
How to make code run in parallel? cwang5 OpenFOAM Programming & Development 1 May 30, 2011 05:47
Open Source Vs Commercial Software MechE OpenFOAM 28 May 16, 2011 12:02
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 11:11
public CFD Code development Heinz Wilkening Main CFD Forum 38 March 5, 1999 12:44


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