# Crank Nicholson scheme for Laplacian failed

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

 June 29, 2010, 11:22 Crank Nicholson scheme for Laplacian failed #1 Senior Member   Cyprien Join Date: Feb 2010 Location: Stanford University Posts: 251 Rep Power: 10 Hi! I modify the laplacian discretization scheme into the scalarTransportFoam solver as suggested in the programmer's guide P-43 to implement the crank Nicholson scheme : Code: solve ( fvm::ddt(rho,T) + fvm::div(phi,T) - 0.5*(fvm::laplacian(rho*DT,T)+fvc::laplacian(rho*DT,T)) == ff ); where ff is my source term. The compilation is OK. However during runs, my results are wrong. For instance, if I integrate T over the entire domain, the returning result is half the expected one. It looks as if the fvc::laplacian(rho*DT,T) term is not account for. In my fvSchemes I specify : Code: laplacianSchemes { default none; laplacian ((rho*DT),T) Gauss linear corrected; } Do you know how I can solve my problem ? Regards, Cyp

 July 16, 2010, 11:12 #2 New Member   Michael B Martell Jr Join Date: Feb 2010 Location: Amherst, MA Posts: 18 Rep Power: 8 Try moving Code: 0.5*(fvm::laplacian(rho*DT,T)+fvc::laplacian(rho*DT,T)) to the right hand side of == (and changing the sign, of course).

 July 19, 2010, 07:36 #3 Senior Member   Cyprien Join Date: Feb 2010 Location: Stanford University Posts: 251 Rep Power: 10 I tried your modification but I still have my problem... How is your fvSchemes file ??

 July 19, 2010, 07:58 #4 New Member   Michael B Martell Jr Join Date: Feb 2010 Location: Amherst, MA Posts: 18 Rep Power: 8 The relevant part of my fvSchemes dictionary: Code: laplacianSchemes { default Gauss linear corrected; } although what you have should work fine. Also, what does your ddtSchemes sub-dictionary look like? I'm fairly certain you need to have Code: ddtSchemes { default CrankNicholson 1; } in order for this to work properly, although I'm not sure. If this also doesn't work, perhaps try the exact equation shown in the Programmer's Guide? Mike

 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 Jarrod Sinclair (Sinclair) OpenFOAM Running, Solving & CFD 133 May 6, 2015 06:21 And OpenFOAM 0 November 19, 2009 08:11 CFDUSER CFX 2 December 9, 2006 07:31 cfduser CFX 0 April 29, 2006 10:58 noName Main CFD Forum 3 September 15, 2004 09:10

All times are GMT -4. The time now is 22:33.