|
[Sponsors] |
December 4, 2017, 10:24 |
Precision problems in Fortran in KIVA4
|
#1 |
New Member
zdz
Join Date: Dec 2017
Posts: 2
Rep Power: 0 |
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? |
|
December 5, 2017, 07:39 |
|
#2 |
Member
Ravindra Shende
Join Date: Feb 2011
Location: Pune, India
Posts: 45
Rep Power: 15 |
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). |
|
Tags |
fortran 90, kiva4 |
|
|
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 |