# Adams-Bashforth implicit scheme for time.

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 19, 2013, 06:30 Adams-Bashforth implicit scheme for time. #1 Member   Amin Join Date: May 2013 Posts: 76 Rep Power: 6 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: 9 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.

 July 22, 2013, 23:57 #3 Member   Amin Join Date: May 2013 Posts: 76 Rep Power: 6 I don t know ...

 July 23, 2013, 04:42 #4 Member   Artem Shaklein Join Date: Feb 2010 Location: Russia, Izhevsk Posts: 43 Rep Power: 9 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: 6 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: 9 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.

 July 23, 2013, 06:03 #7 Member   Amin Join Date: May 2013 Posts: 76 Rep Power: 6 Thx , i wil try it

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post thegodfather Main CFD Forum 0 September 21, 2012 05:41 harish_0689@ Main CFD Forum 2 January 21, 2012 14:22 EagleGao Main CFD Forum 2 October 24, 2011 14:04 Isa Main CFD Forum 3 May 11, 2006 12:27 Li Yang Main CFD Forum 1 January 17, 2004 02:13

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

 Contact Us - CFD Online - Privacy Statement - Top