|June 26, 2014, 11:29||
Patricio Javier Valades Pelayo
Join Date: Jun 2013
Posts: 5Rep Power: 4
Hello!, I hope someone can orient me a bit...
My problem is very simple I'm sure, its mainly due to my inexperience, that being said, the problem is:
A diluted solute is being transported by a gas flowing through a pipe with mass transfer through the pipe outer boundary, where there is a polymer coating that CAN interact (adsorb/desorb) the solute.
The problem is posed in 1) unsteady state, 2) the carried gas is assumed to be one directional plug flow (no radial gradients) with a 3) dispersion coefficient (to account for axial dispersion).
My mesh/grid is aligned WITH the flow, so I implemented for the convective term a 1st order upwind scheme and for the axial dispersion a 1st order central difference scheme. Supposedly, there should not be any false diffusion as flow and mesh are aligned (very easy problem, 1 dimension in space and time).
However, when I tested the code in the following way: 1) "injecting" a pulse of solute, while 2) turning off mass transfer at the interface (setting mass transfer coefficient equal to zero) , 3) turning off axial dispersion (setting the Dispersion coefficient equal to zero) and 4) letting convection ON, I noticed THAT DIFFUSION STILL takes place (numerical diffusion), as the pulse becomes broader.
MY QUESTIONS WOULD BE:
1)What is this thing?, false diffusion?, or just unavoidable round-up errors? some problem the program/languaje used? (btw I programed this in Matlab).
2) How can I minimize it besides increasing mesh size?, going for a 2nd order upwind?, third order?.
3) What would be the most efficient solution ?(computational intensive vs accuracy)
4) if Matlab sucks at this, what programming language would be FASTER while remaining compact (easy to learn) and practical (graphs allowed, plotting tools added maybe)?
thanks for your help,
a Novice Chemical Engineer
|June 26, 2014, 14:45||
Join Date: Mar 2010
Posts: 551Rep Power: 11
As Filippo already pointed out, a first order upwind is very diffusive. Unless you are perfectly resolved, you will see some numerical dissipation. You can easily check if that's the source of your problem by decreasing the mesh size - if your error changes with Delta h, then the convective term discretization is the problem.
What scheme are you using? FD? FV?
In any case, switching from O1 to O2 should bring a great boost in accuracy!
|July 20, 2014, 13:16||
Join Date: Aug 2011
Posts: 251Rep Power: 6
Round off error is something different but it is also a real problem.To minimize it you should activate the double precision in your programming language.
3) using higher order schemes needs more development efforts. using finer grids needs more computational efforts. You can reach the same accuracy with a first order scheme compared to a 4th order one .However you will need much more grid nodes,so more computational time and more time before to get the results.
4) I would say fortran compilers are the most optimized and then give fastest codes
|false diffusion, language, upwind|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Moving mesh||Niklas Wikstrom (Wikstrom)||OpenFOAM Running, Solving & CFD||122||June 15, 2014 06:20|
|False diffusion||Ehab||Main CFD Forum||4||August 7, 2013 22:23|
|False diffusion + FORTRAN code||mamly||Main CFD Forum||0||July 18, 2012 02:42|
|False Diffusion||jj||Main CFD Forum||2||September 29, 2006 00:44|
|CFX4.3 -build analysis form||Chie Min||CFX||5||July 12, 2001 23:19|