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

KIva source code

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2004, 03:45
Default KIva source code
  #1
Pratap
Guest
 
Posts: n/a
Hi I have simple question about source code of kiva. Can anyone tell me where all the variables are defined. in kiva. Thanks Pratap
  Reply With Quote

Old   October 29, 2004, 04:38
Default Re: KIva source code
  #2
zhvickie
Guest
 
Posts: n/a
where can you download it?
  Reply With Quote

Old   October 29, 2004, 06:09
Default Re: Kiva source code
  #3
Jim K
Guest
 
Posts: n/a
I have a manual on KIVA. What variables are you interested?
  Reply With Quote

Old   October 29, 2004, 06:57
Default Re: Kiva source code
  #4
Pratap
Guest
 
Posts: n/a
All the variables for example!!!
  Reply With Quote

Old   October 29, 2004, 10:01
Default Re: Kiva source code
  #5
Jim_Park
Guest
 
Posts: n/a
Tony Amsden's standard coding practice was to define variables with comment statements in the main program of each code he wrote.

The documentation usually expanded on those definitions.
  Reply With Quote

Old   October 29, 2004, 10:55
Default Re: Kiva source code
  #6
Pratap
Guest
 
Posts: n/a
I could not find the variable let us say that kiva.f they include the statement "include 'comkiva.i'". Which I have pasted it below. They are not defined in comkiva.i .By definition I mean for using any variable in fortran one should define it as either integer, real or character variable. And one more thing what is this statement *deck comkiva.i. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *deck comkiva c c comkiva.i status as of December 22, 1998 / 1540 hours: c c nv = maximum number of vertices c nsoot must = 1 if soot is included, should = 0 if no soot calc. c lnsp = maximum no. of species, usually = 12, but = 15 with soot c lnrk = maximum no. of kinetic chemical reactions c lnre = maximum no. of equilibrium chemical reactions c lpres = max. no. of inflow or outflow experimental pressures c nregmx = max. no. of regions created by the grid generator c nper= maximum number of vertices on a periodic boundary c lvap = max. no. of entries in liquid vapor pres. tables in fuelib c nbv = maximum number of boundary vertices c niov = max. no. of inflow or outflow or pressure vertices c nface = max. no. of vertices on piston face c npar = maximum no. of particles present at any one time c lvel = max. no. of entries in the injection velocity table c lnoz = max. no. of fuel injection nozzles c linj = max. no. of times fuel is injected in one engine cycle c nmovemx = maximum number of moving surfaces c nliftmx = maximum number of entries for each valve lift position

parameter (nv=250000,nsoot=0,lnsp=72,lnrk=300,lnre=6,lpres=7 25,

1 nregmx=5,nper=15000,lvap=75,nbv=66000,niov=600,

2 nface=5000,npar=10000)

parameter (lvel=450,lnoz=10,linj=10)

parameter (nmovemx=11,nliftmx=720)

parameter (lsoot=nsoot*(nv-1)+1)

c WARNING: As with all complex CFD codes today, a 60-64 bit word c length is required for KIVA-3. Otherwise, round-off c errors will quickly reduce the results to nonsense. c This implies the use of double precision for all the c real numbers on machines with a 30-36 bit word length. c

common /kiva1/ aaa1(1),x(nv),y(nv),z(nv),u(nv),v(nv),w(nv),

1 ro(nv),vol(nv),p(nv),amu(nv),f(nv),fv(nv),temp(nv) ,sie(nv),

2 bcl(nv),bcf(nv),bcb(nv),alx(nv),aly(nv),alz(nv),af x(nv),

3 afy(nv),afz(nv),abx(nv),aby(nv),abz(nv),tke(nv),pi t(nv),pit1(nv), %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 Thanks pratap
  Reply With Quote

Old   October 29, 2004, 13:54
Default Re: Kiva source code
  #7
Dino
Guest
 
Posts: n/a
There are a lot of versions of KIVA. It looks like you may have one of the old versions from Los Alamos. KIVA was developed on Cray computers with 64-bit words. Any variable unless otherwise typed would be real*8 or integer as determined by the Fortran 77 naming convention. The code was written 20 years ago, and at that time they didn't bother to explicitly type everything. Sometimes not anything. There will be very few if any character variables. In that old-style Fortran, the few character strings that may have been used were often done with integer variables.

Another thing to note is that the old versions of that code define all arrays at compile time, there was no dynamic memory management.

Yes, I know, it's crummy programming practice by today's standards, but it was fairly typical of that era.

Hope that helps answer your questions.
  Reply With Quote

Old   October 29, 2004, 14:49
Default Re: Kiva source code
  #8
curious
Guest
 
Posts: n/a
Dino writes :
:> Another thing to note is that the old versions of that code define all arrays at compile time, there was no dynamic memory management.

Is there a way to declare variables at run time in f77 ?
  Reply With Quote

Old   October 29, 2004, 17:36
Default Re: Kiva source code
  #9
Jim_Park
Guest
 
Posts: n/a
Can't remember for sure, but I think that, in the Fortran (77 with Cray extensions)on the Crays of the 70's and 80's, the default floating point word was 64 bits.

For a code the size of Kiva, the comdeck (a block of Fortran statements 'included' near the front of each routine that contained common or dimension statements for variables) was very large. Haven't seen this code for 20 years, so please excuse the fuzzy statements.

This is the section I mentioned in my post above. It relates the input variables to the model equations - which would be in the report you don't have.

deck comkiva c

c comkiva.i status as of December 22, 1998 / 1540 hours: c

c nv = maximum number of vertices

c nsoot must = 1 if soot is included, should = 0 if no soot calc.

c lnsp = maximum no. of species, usually = 12, but = 15 with soot

c lnrk = maximum no. of kinetic chemical reactions

c lnre = maximum no. of equilibrium chemical reactions

c lpres = max. no. of inflow or outflow experimental pressures

c nregmx = max. no. of regions created by the grid generator

c nper= maximum number of vertices on a periodic boundary

c lvap = max. no. of entries in liquid vapor pres. tables in fuelib

c nbv = maximum number of boundary vertices c niov = max. no. of inflow or outflow or pressure vertices c nface = max. no. of vertices on piston face

c npar = maximum no. of particles present at any one time

c lvel = max. no. of entries in the injection velocity table

c lnoz = max. no. of fuel injection nozzles

c linj = max. no. of times fuel is injected in one engine cycle

c nmovemx = maximum number of moving surfaces

c nliftmx = maximum number of entries for each valve lift position

As the other poster suggested, one of the modern versions of Kiva would likely use F90 or F95 and modern coding practice. But that's my guess.

Take a look at http://www.lanl.gov/orgs/t/t3/codes/kiva.shtml

It appears that some KIVA manuals can be viewed on line.
  Reply With Quote

Old   October 29, 2004, 22:13
Default Re: Kiva source code
  #10
Jim_Park
Guest
 
Posts: n/a
Take a closer look at

http://www.lanl.gov/orgs/t/t3/docs/

I was able to download two KIVA reports from the above URL. There are links to 4 KIVA reports - I tried just the two.

Good luck.
  Reply With Quote

Old   October 30, 2004, 01:53
Default Re: Kiva source code
  #11
Sasidhar
Guest
 
Posts: n/a
Can anyone tell me what are the different turbulence models used in Kiva. for sure there are RNG model, K-epsilon model and SGS model. Are there any other models too? And which one gives the best results.
  Reply With Quote

Old   October 30, 2004, 07:03
Default Re: Kiva source code
  #12
Pratap
Guest
 
Posts: n/a
I would like to know the code strcute of old kiva. I think now its kind of mess but if we somebody has good code structure and give me the links : I will appreciate his help. Pratap
  Reply With Quote

Old   October 30, 2004, 09:52
Default Re: Kiva source code
  #13
Jim K
Guest
 
Posts: n/a
Which "old kiva" exactly? There are many versions.
  Reply With Quote

Old   October 31, 2004, 05:24
Default Re: Kiva source code
  #14
Pratap
Guest
 
Posts: n/a
Or may be the structure of any kiva code will be helpful to understand the code. Pratap
  Reply With Quote

Old   November 2, 2004, 14:24
Default Re: KIva source code
  #15
Allan Walsh
Guest
 
Posts: n/a
In the generic version of KIVA-3 I have, dated Oct. 12, 1993, most of the variables are declared in the common file COMKIVA.I .

We obtained this code from a government lab for a nominal handling fee. It came with separate source code for pre and post processors, which each have variables in their own include file. The code was issued with various manuals.

About 10 years, I fooled with a version to model steady-state combustion, using a PC with a Pentium 90 processor. As the memory was limited (maybe 32 Meg of RAM), I declared variables as single precision.

Isothermal flows were okay, but I didn't have much luck with combusting flow. This could have been more due to my lack of understanding of the code rather than the precision of the variables. And, if you remember, Intel's first Pentium chip couldn't always add correctly - which they neglected to tell people about. Eventually, we drifted off to another commercial code.

If you have an interest in KIVA, you should get an official version. If you are just looking to experiment with a code, and you aren't familar with CFD or Fortran, I would recommend something "SIMPLE"r.
  Reply With Quote

Old   November 2, 2004, 15:22
Default Re: KIva source code
  #16
Jim_Park
Guest
 
Posts: n/a
"If you are just looking to experiment with a code, and you aren't familar with CFD or Fortran, I would recommend something "SIMPLE"r."

In my opinion, this is excellent advice!

But, if your professor/instructor/teacher gives you the assignment. GOOD LUCK!
  Reply With Quote

Old   November 8, 2004, 21:39
Default KIva source code
  #17
Sasidhar
Guest
 
Posts: n/a
In the k3post file I see that fiels can be generated with extensions *.dpv, *.vel. I am not sure which one to be used for post processing. Can anyone help me. And velout subroutine is defined in such a way that *.vel files generated should contain u, v, w, fv, aux1. But the actual file generated has 6 columns. I don't understant what other column is for.
  Reply With Quote

Old   November 22, 2004, 02:04
Default Re: KIva source code
  #18
A.S.
Guest
 
Posts: n/a
Hi,

Where can I get KIVA source code from. Is it free or low cost software.

Thanks

A.S.
  Reply With Quote

Old   December 2, 2004, 16:59
Default Re: Kiva source code
  #19
adel
Guest
 
Posts: n/a
hello there i would like to have the comkiva code
  Reply With Quote

Old   July 19, 2010, 06:34
Default shahid
  #20
New Member
 
Haris
Join Date: Jul 2010
Posts: 8
Rep Power: 15
riseguess is on a distinguished road
Quote:
Originally Posted by adel
;31802
hello there i would like to have the comkiva code
Hi
I am a new user with Kiva 3VR2. i have a few very basic questions..
(1)..can i run this code on my PC (windows XP with Fortan 95) or i have ot get Linux installed. if it runs on linux only then what version of Linux??

(2)..i have run it on my pc, there was a message that a file ''Qstart'' is missing. there is no qstart file with in the code (i have browsed briefly)..

Can any one help me out???

Shahid

Last edited by riseguess; July 19, 2010 at 06:51.
riseguess is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
User-Defined Scalar (UDS) Source code lig FLUENT 6 October 15, 2014 13:12
SOLA Source code available AminFeizi Main CFD Forum 10 January 14, 2014 15:08
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 06:40
heat equation solution source code john Main CFD Forum 1 May 28, 2004 00:41
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 16:56


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