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

Precision problems in Fortran in KIVA4

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2017, 10:24
Default Precision problems in Fortran in KIVA4
  #1
New Member
 
zdz
Join Date: Dec 2017
Posts: 2
Rep Power: 0
zdz0309 is on a distinguished road
I use CHEMKIN DVODE to integrate the chemistry in KIVA, where the species concentrations are used as the inputs into DVODE. These species concentrations (Vay) are calculated by
Vay(: ) = spd(i4c, : )*rmw(: )
And this way to integrate the chemistry works fine. When I manipulate this to (this manipulation is due to an algorithm)
Vay(: ) = spd(i4c, : )*rmw(: )*vol(i4c)
Vay(: ) = Vay(: )/vol(i4c)

And the in-cylinder pressures and temperatures show huge error compared with the results before the manipulation.
I doubt that the small values of vol(i4c) is the source of the error.

I used gfortran compiler. Can anyone tell me how to avoid this kind of error in Fortran?
zdz0309 is offline   Reply With Quote

Old   December 5, 2017, 07:39
Default
  #2
Member
 
Ravindra Shende
Join Date: Feb 2011
Location: Pune, India
Posts: 45
Rep Power: 15
Ravindra Shende is on a distinguished road
You are right. small values of 'vol' could be the source of the errors.
Using the governing equations in non-dimensionalised form could help. Or you can use quad precision (available with intel fortran compiler, not sure about gfortran).
Ravindra Shende is offline   Reply With Quote

Reply

Tags
fortran 90, kiva4


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
Single precision better than double precision? 140raiders CFX 1 July 30, 2015 03:32
User Fortran Problems Silmaril CFX 6 June 26, 2012 10:35
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
Fortran 90 faster than C/C++ B. R. Guirguis Main CFD Forum 48 March 6, 2006 14:49
'C' or FORTRAN or 'C++' Yogesh Talekar Main CFD Forum 20 October 21, 1999 05:00


All times are GMT -4. The time now is 00:49.