|
[Sponsors] |
|
July 19, 2013, 06:30 |
Adams-Bashforth implicit scheme for time.
|
#1 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
Hello
I would like to use a second order accurate Adams-Bashforth implicit scheme for time. I searched in the Internet, how to implement this scheme in OpenFOAM but i did not find any Information about it... Can we use this kind of scheme in OpenFOAM ? Is there any option to use other scheme, which works in the same way ? |
|
July 22, 2013, 04:35 |
|
#2 |
Member
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 16 |
Hello, Mirage12.
For example, I want to solve ∂y/∂t + ∂(yU_i)/∂x_i = 0. To use Adams-Bashforth, I should do next y^(n+1) = y^(n) - dt*(3/2*( ∂(y^(n+1)U_i)/∂x_i) - 0.5*( ∂(y^(n)U_i)/∂x_i)). That seems right, yes? So, implementation would be Code:
phi = U & mesh.Sf(); ... yEqn ( fvm::ddt(y) + 1.5*fvm::div(phi, y) - 0.5*fvc::div(phi, y) ); |
|
July 22, 2013, 23:57 |
|
#3 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
I don t know ...
|
|
July 23, 2013, 04:42 |
|
#4 |
Member
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 16 |
Of course, you can study how CrankNicholson scheme is implemented in OF and create AB from it, but this is the fastest way.
By the way, Crank-Nicholson scheme is easy to implement too Code:
yEqn ( fvm::ddt(y) + 0.5*fvm::div(phi, y) + 0.5*fvc::div(phi, y) ); |
|
July 23, 2013, 05:11 |
|
#5 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
could you please specify where should i implement the code ?
i am not really an expert...i am just a beginner |
|
July 23, 2013, 05:23 |
|
#6 |
Member
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 16 |
Okay, e.g., let's take icoFoam and use AB for momentum time discretisation.
icoFoam.C looks like: Code:
... fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) ); ... Code:
... fvVectorMatrix UEqn ( fvm::ddt(U) +1.5*fvm::div(phi, U) -0.5*fvc::div(phi, U) - fvm::laplacian(nu, U) ); ... |
|
July 23, 2013, 06:03 |
|
#7 |
Member
Amin
Join Date: May 2013
Posts: 76
Rep Power: 13 |
Thx , i wil try it
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
stability of alternate direction implicit scheme | thegodfather | Main CFD Forum | 0 | September 21, 2012 05:41 |
2D Implicit HLLC scheme | harish_0689@ | Main CFD Forum | 2 | January 21, 2012 13:22 |
Is it feasible to apply implicit scheme in LES | EagleGao | Main CFD Forum | 2 | October 24, 2011 14:04 |
time_step, implicit scheme, number of iterations | Isa | Main CFD Forum | 3 | May 11, 2006 12:27 |
Komogrov time scale and implicit scheme for LES | Li Yang | Main CFD Forum | 1 | January 17, 2004 01:13 |