|
[Sponsors] |
October 29, 2004, 03:45 |
KIva source code
|
#1 |
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
|
|
October 29, 2004, 04:38 |
Re: KIva source code
|
#2 |
Guest
Posts: n/a
|
where can you download it?
|
|
October 29, 2004, 06:09 |
Re: Kiva source code
|
#3 |
Guest
Posts: n/a
|
I have a manual on KIVA. What variables are you interested?
|
|
October 29, 2004, 06:57 |
Re: Kiva source code
|
#4 |
Guest
Posts: n/a
|
All the variables for example!!!
|
|
October 29, 2004, 10:01 |
Re: Kiva source code
|
#5 |
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. |
|
October 29, 2004, 10:55 |
Re: Kiva source code
|
#6 |
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 |
|
October 29, 2004, 13:54 |
Re: Kiva source code
|
#7 |
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. |
|
October 29, 2004, 14:49 |
Re: Kiva source code
|
#8 |
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 ? |
|
October 29, 2004, 17:36 |
Re: Kiva source code
|
#9 |
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. |
|
October 29, 2004, 22:13 |
Re: Kiva source code
|
#10 |
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. |
|
October 30, 2004, 01:53 |
Re: Kiva source code
|
#11 |
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.
|
|
October 30, 2004, 07:03 |
Re: Kiva source code
|
#12 |
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
|
|
October 30, 2004, 09:52 |
Re: Kiva source code
|
#13 |
Guest
Posts: n/a
|
Which "old kiva" exactly? There are many versions.
|
|
October 31, 2004, 05:24 |
Re: Kiva source code
|
#14 |
Guest
Posts: n/a
|
Or may be the structure of any kiva code will be helpful to understand the code. Pratap
|
|
November 2, 2004, 14:24 |
Re: KIva source code
|
#15 |
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. |
|
November 2, 2004, 15:22 |
Re: KIva source code
|
#16 |
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! |
|
November 8, 2004, 21:39 |
KIva source code
|
#17 |
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.
|
|
November 22, 2004, 02:04 |
Re: KIva source code
|
#18 |
Guest
Posts: n/a
|
Hi,
Where can I get KIVA source code from. Is it free or low cost software. Thanks A.S. |
|
December 2, 2004, 16:59 |
Re: Kiva source code
|
#19 |
Guest
Posts: n/a
|
hello there i would like to have the comkiva code
|
|
July 19, 2010, 06:34 |
shahid
|
#20 | |
New Member
Haris
Join Date: Jul 2010
Posts: 8
Rep Power: 15 |
Quote:
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. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |