CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Adams-Bashforth implicit scheme for time.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 19, 2013, 06:30
Default Adams-Bashforth implicit scheme for time.
  #1
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
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 ?
Mirage12 is offline   Reply With Quote

Old   July 22, 2013, 04:35
Default
  #2
Member
 
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 7
ARTem is on a distinguished road
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)
);
with "Euler" word used in OF ddtScheme dictionary.
ARTem is offline   Reply With Quote

Old   July 22, 2013, 23:57
Default
  #3
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
I don t know ...
Mirage12 is offline   Reply With Quote

Old   July 23, 2013, 04:42
Default
  #4
Member
 
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 7
ARTem is on a distinguished road
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)
);
ARTem is offline   Reply With Quote

Old   July 23, 2013, 05:11
Default
  #5
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
could you please specify where should i implement the code ?
i am not really an expert...i am just a beginner
Mirage12 is offline   Reply With Quote

Old   July 23, 2013, 05:23
Default
  #6
Member
 
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 7
ARTem is on a distinguished road
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)
        );
...
So, we just rewrite this part of code (it's better to copy all icoFoam folder to icoFoamAB e.g. for keeping original files untouched).
Code:
...
        fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          +1.5*fvm::div(phi, U)
           -0.5*fvc::div(phi, U)
           - fvm::laplacian(nu, U)
        );
...
Here I used AB time advance scheme for convective fluxes and Euler implicit for diffusive fluxes.
ARTem is offline   Reply With Quote

Old   July 23, 2013, 06:03
Default
  #7
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 4
Mirage12 is on a distinguished road
Thx , i wil try it
Mirage12 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 14: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 02:13


All times are GMT -4. The time now is 18:54.