Implementing TVD-RK3 method in rhoCentralFoam
1 Attachment(s)
Hello,
I am trying to modify rhoCentralFoam to implement TVD-RK3 time stepping by solving the governing equations thrice with appropriate variables. I have named my solver "rhoCentralFoam1". The solver got compiled without any errors but I am getting the following error when using the solver for a shockTube case. Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? I have attached the solver source file and new header files that I have used in my solver. runLog.txt is the log generated when shockTube case is run. Can anyone please help me in this regard? I am new to this forum so sorry if my post doesn't give enough information. I am using OpenFOAM 4.1 Thanks, Vachan |
Figured out. (1/3) and (2/3) were taken as zeros by openfoam. Made them (1.0/3.0) and (2.0/3.0).
|
Quote:
Actually sometimes I face some problem regarding to precisions as well. It would be interesting if you could share the final version of this solver. Thanks, Reza |
Hi Reza,
Thanks for the reply. Sorry, I didn't check it using the debug version but making that one change alone made the code run fine. The code I had posted earlier on this thread is an older version and I have made more modifications to it. Presently, I use 0.33333334 and 0.66666667 instead of 1.0/3.0 and 2.0/3.0 to reduce run time. The code works fine even with these. Thanks, Vachan |
Shouldn't we all have TVD-RK3 for rhoCentralFoam?
To my knowledge TVD-RK3 (Shu, Osher, 1988 https://ntrs.nasa.gov/archive/nasa/c...9880014833.pdf) is an excellent explicit time integration choice; better than Euler explicit for aeroacoustics by a fair margin. I've implemented it a few times in simple little NS and MHD codes and never recall it being more than a dozen lines of code. I am wondering if someone more experienced in OpenFOAM and rhoCentralFoam in particular knows why higher-order RK schemes aren't offered in the main branch of OpenFOAM -- I have just download version 7 and just see the following in the ddtSchemes source folder:
backwardDdtScheme CoEulerDdtScheme ddtScheme localEulerDdtScheme steadyStateDdtScheme boundedDdtScheme CrankNicolsonDdtScheme EulerDdtScheme SLTSDdtScheme I am not meaning to complain. If it is for lack of man-power, I should be happy to help, and it seems like the individual who founded this thread (and perhaps many others) have already made their own explicit RK time integrators. |
Hi Jeff,
Quote:
|
All times are GMT -4. The time now is 01:46. |