|
[Sponsors] |
August 20, 2015, 11:48 |
|
#21 |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Code:
--> FOAM FATAL IO ERROR: keyword div(U) is undefined in dictionary "/media/syavash/science/PHD_Thesis/New/system/fvSchemes.divSchemes" file: /media/syavash/science/PHD_Thesis/New/system/fvSchemes.divSchemes from line 30 to line 36. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 437. FOAM exiting I think div(U) is missing from fvSchemes. I have added it like: Code:
div(U) Gauss linear; Code:
--> FOAM FATAL ERROR: incompatible dimensions for operation [p[0 0 -2 0 0 0 0] ] == [div(U)[0 0 -1 0 0 0 0] ] From function checkMethod(const fvMatrix<Type>&, const GeometricField<Type, fvPatchField, volMesh>&) in file /home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvMatrix.C at line 1356. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::DimensionedField<double, Foam::volMesh> const&, char const*) at ??:? #3 at ??:? #4 at ??:? #5 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #6 at ??:? Aborted (core dumped) Syavash |
|
August 20, 2015, 14:04 |
|
#22 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
But I think a clarification on fvSchemes helps me a lot! Another point is that I can only see pressure residuals on the screen. How should I include velocity residuals either?! Syavash Edit: Can you post an example of fvSchemes & fvSolution files?! |
||
August 21, 2015, 12:09 |
|
#23 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
Any comments?! |
||
February 25, 2016, 06:12 |
|
#24 |
New Member
Frédéric Aulery
Join Date: Nov 2015
Posts: 1
Rep Power: 0 |
Dear All,
Il read this topic and succefully do the implementation of rk4 time scheme. Is someone have some return to do about it ? I have the same error than you, but i dislike the new pressure dimension, may we have not well do some operation. I try the simulation of blasius boundary flow, and the time step down to 1.e-150 any idea. Thank you for answers. |
|
December 3, 2016, 23:32 |
|
#25 | |
New Member
Frank Ann
Join Date: Dec 2016
Posts: 6
Rep Power: 10 |
Quote:
Dear Ville, I have read your paper and your code. you have done a wonderful work in this and help me a lot. but i still have some questions, i cannot figure it out. 1>as we know, the rk4 is a fully explicit method, in openfoam, the explicit equation should use the fvc::ddt. but you use the fvm::ddt in code, such as solve(fvm::ddt(rho) + rhokcycle0 * RK4values[cycle]); (solve rho) why? and what's the meaning? 2> can we implement the time schemes directly in folder? in this way, maybe we can use the RK4 in all of the solvers thank you !!! Best, Frank |
||
April 15, 2017, 12:24 |
The code lacks a deltaT parameter in the pressure step in "PressureCorrection.H"
|
#26 | |
New Member
Yu Cheng
Join Date: Aug 2014
Posts: 15
Rep Power: 12 |
Quote:
Obviously, it is a problem of time dimension, the reason is a lack of deltaT parameter on the construction of pressure correction, plz refer to Projection method, see the "Chorin's projection method" part. To help the one who is interested, I paste the corresponding code down here Code:
// PressureCorrection.H #include "continuityErrs.H" U.correctBoundaryConditions(); solve(pEqn == fvc::div(U)/runTime.deltaT()); U = U - fvc::grad(p)*runTime.deltaT(); U.correctBoundaryConditions(); |
||
March 18, 2018, 05:23 |
|
#27 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
Kind Regards, Syavash |
||
March 18, 2018, 21:58 |
Test case
|
#28 |
New Member
Yu Cheng
Join Date: Aug 2014
Posts: 15
Rep Power: 12 |
Thank you for sharing the code, Syavash. Could you kindly attach a minimum test case for the code, for example maybe a small case changing the OpenFOAM cavity. I believe this will help the other foamers.
Best regards, Yu CHENG |
|
March 22, 2018, 15:21 |
|
#29 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
Very good idea. I have modified the solver to be able to take a constant source term into account. I have also provided a lid-driven cavity example with the new RK4Foam solver. I hope the other foamers would find it useful and hopefully do some experiments and comparisons. Kind Regards, Syavash |
||
March 22, 2018, 22:23 |
Good work
|
#30 |
New Member
Yu Cheng
Join Date: Aug 2014
Posts: 15
Rep Power: 12 |
Hey Syavash,
You've done a great work! I have compiled the code and run the cavity case, the preliminary results seem to be reasonable. I believe this work will definitely help other foamers. Thank you! Best wishes! Yu. |
|
October 22, 2018, 09:01 |
|
#31 | |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
Quote:
I have implemented this solver and I'm comparing it to pimpleFoam. It's compiling fine and also seems to be solving. However, I have two questions: (1) What is the justification for multiplying or dividing by runTime.deltaT()? I can see that we need this for dimensional purposes, but how will this change the solver? Will this term factorise out? (2) How will residuals be affected? I seem to have very high initial pressure residuals in the rk4projection method (compared to my pimpleFoam case). I'm using the same fvSolution specs for both cases, so I didn't expect this. Thanks, RH. |
||
April 3, 2019, 15:56 |
|
#32 |
New Member
agSilverMAN
Join Date: Aug 2018
Posts: 6
Rep Power: 8 |
Hey Syavash,
Thank you for the solver and the test case. I was able to compile the solver and run the test case with out a glitch. I tried comparing the solver running time between the RK4Foam and pisoFoam and found out that while the results are almost identical, the RK4Foam took more than 5 times the solver time of the pisoFOAM. The case I run was the cavity case with RE = 2500 and implementing RAS modeling. I was under the impression that RK4Foam results in saving of solver running time. Is that wrong or is there something I am doing wrong? Thanks |
|
April 4, 2019, 04:01 |
|
#33 | |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
Quote:
|
||
April 4, 2019, 06:30 |
|
#34 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
The runtime depends on the number of processes as well. I have compared both pisoFoam and RK4 in LES simulations with cell number in order of 1e+8 and over 100 processes. I found them quite equally fast. However, it should be noted that in RK4 solver, the pressure equation (elliptic) is solved 4 times while in pisoFoam it is solved only 2 times in default! This is the main reason why RK4 could be slower than pisoFoam in some cases. In the end, I stick with pisoFoam as I found it more robust and more accurate in some canonical flow simulations! Best Regards, Syavash |
||
April 4, 2019, 06:36 |
|
#35 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
The deltaT term is multiplied by because simply it is there in the original N-S equations! Have a look at some numerical textbook on Runge-Kutta algorithm. Best Regards, Syavash |
||
April 4, 2019, 06:37 |
|
#36 | |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
Quote:
|
||
April 4, 2019, 06:42 |
|
#37 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
Best Regards, Syavash |
||
April 4, 2019, 06:50 |
|
#38 |
New Member
anonymous
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
The one positive I had was stability. I tested it on the Taylor-Green 3D vortex flow, and at certain points in the simulation, piso/pimple were crashing. RK4 was running fine however. RH.
|
|
April 7, 2019, 16:34 |
|
#39 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 |
It is very important if you need at least (and at most) 2nd order accuracy in time for the non-linear term....
|
|
May 21, 2019, 11:45 |
|
#40 | |
New Member
Hongsheng
Join Date: Dec 2017
Posts: 2
Rep Power: 0 |
Quote:
Is it possible to modified the 'RK4' be an convenient 'option' in fvschemes file for ddtSchemes such as 'Euler' or 'backward'? then used for most compressible or incompressible solvers? Last edited by Hen Cruise; May 21, 2019 at 23:38. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Runge Kutta 4th Order Source Code | sugu | Main CFD Forum | 4 | October 26, 2012 04:15 |
Runge-Kutta 4rd Order method help for 6DoF in CFD | siw | Main CFD Forum | 0 | August 29, 2008 07:08 |
runge kutta | Shuo | Main CFD Forum | 0 | January 7, 2008 20:29 |
4th and 5th Order TVD Runge-Kutta Methods | saygin | Main CFD Forum | 2 | January 30, 2006 12:45 |
Runge Kutta vs adams bashforth time marching | vasanth | Main CFD Forum | 5 | January 1, 2006 01:17 |