CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   colver code in c or c++ (https://www.cfd-online.com/Forums/main/13529-colver-code-c-c.html)

phd_student May 27, 2007 20:54

colver code in c or c++
 
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??

another student May 28, 2007 05:18

Re: solver code in c or c++
 
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.

Gert-Jan May 28, 2007 16:06

Re: solver code in c or c++
 
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

Eswar May 29, 2007 07:38

Re: colver code in c or c++
 
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...

another student May 29, 2007 07:44

Re: colver code in c or c++
 
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

jojo May 29, 2007 12:43

Re: colver code in c or c++
 
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?

another student May 29, 2007 18:48

Re: colver code in c or c++
 
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.

Gonski May 29, 2007 21:50

Re: colver code in c or c++
 
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.

Arjun May 29, 2007 22:13

iNavier - Description
 
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.


jojo May 30, 2007 09:41

Re: iNavier - Description
 
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?


Jens May 30, 2007 14:59

Re: iNavier - Description
 
Hi,

Is it possible solve for thermal flows as well ?

I can not seen that from the description.

Regards

Jens

cfd_user May 31, 2007 13:23

Re: iNavier - Description
 
The source code iNavier is not available. I found only a windows executable..

phd_student May 31, 2007 20:51

Re: iNavier - Description
 
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.


phd_student May 31, 2007 20:52

Re: colver code in c or c++
 
Sorry for taking over your name, just liked it.

Jens June 4, 2007 09:11

Re: iNavier - Description
 
Hi,

Your code looks interesting.

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

Regards

Jens


Arjun June 4, 2007 18:33

Re: iNavier - Description
 
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.


wxinfxiangdb June 11, 2009 23:35

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!

arjun June 13, 2009 08:09

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.

wxinfxiangdb June 13, 2009 23:34

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

bernarde December 8, 2009 09:32

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


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