|
[Sponsors] |
March 19, 2009, 09:23 |
setDeltaT
|
#1 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Im running 1.5.x.git version.
dont know if this counts as a bug, but it produces a sigFpe error. I'm running engineCompRatio and when I reach TDC it crashes. I traced the crash to the setDeltaT-line, when t1=0 Code:
while(mag(ca-ca1) > eps) { ca = runTime.theta(); scalar t1 = runTime.userTimeToTime(ca1-ca); runTime.setDeltaT(t1); runTime++; Info << "CA = " << runTime.theta() << endl; mesh.move(); } But should there be some sort of warning/fix in setDeltaT when one tries to set the timestep to 0. Code:
while(mag(ca-ca1) > eps) { ca = runTime.theta(); if (mag(ca-ca1) > eps) { scalar t1 = runTime.userTimeToTime(ca1-ca); runTime.setDeltaT(t1); runTime++; Info << "CA = " << runTime.theta() << endl; mesh.move(); } } Last edited by niklas; March 19, 2009 at 10:34. |
|
March 22, 2009, 18:46 |
|
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Is it possible for the first loop:
if (mag(ca - ca0) > eps) { while(mag(ca - ca0) > eps) { ca = runTime.theta(); scalar t0 = runTime.userTimeToTime(ca0 - ca); runTime.setDeltaT(t0); runTime++; Info << "CA = " << ca << endl; mesh.move(); } } to suffer from the same problem? Also wouldn't it be better to reorganize the loops so that the test is only required once? H |
|
March 23, 2009, 05:46 |
|
#3 | ||
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Sorry for the bad naming of the topic, I tried to edit it afterwards, but that wasnt possible...
Quote:
criteria at the entry of the while statement is always false. Quote:
just replace the ca-caX from the while (..) check and use runTime.theta()-caX, then the if's can be removed. N |
|||
March 23, 2009, 11:35 |
|
#4 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Thanks for the fix, I have pushed it into 1.5.x.
H |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam vs CFX5 mass balance in OpenFoam | tangd | OpenFOAM Running, Solving & CFD | 33 | May 23, 2010 17:36 |
[blockMesh] CheckMesh error using a tutorial from OpenFOAM 114 with openFOAM 13 | martapajon | OpenFOAM Meshing & Mesh Conversion | 7 | January 21, 2008 13:52 |
OpenFOAM users in Munich OpenFOAM benutzer in M%c3%bcnchen | jaswi | OpenFOAM | 0 | August 3, 2007 14:11 |
[OpenFOAM.com] OpenFOAM | SteliosNTUA | OpenFOAM Installation | 4 | March 8, 2007 04:15 |
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix | mbeaudoin | OpenFOAM Installation | 2 | April 28, 2006 09:54 |