|
[Sponsors] |
June 3, 2010, 19:21 |
leastSquares gradient on tet meshes
|
#1 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
I've been trying out a few gradient schemes recently on tet-meshes, of which I find the leastSquares scheme to be most accurate. However, I find that the results are quite awkward at boundaries. My test case is quite simple (tet-mesh in a box - see attached), and the driver code is given:
Code:
#include "fvCFD.H" int main(int argc, char** argv) { # include "setRootCase.H" # include "createTime.H" # include "createMesh.H" volScalarField alpha ( IOobject ( "alpha", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), (mesh.C() & vector(2,3,1)) ); // Set values for the field volVectorField gradAlpha = fvc::grad(alpha); Info << "Writing out the gradient" << endl; gradAlpha.write(); return 0; } Attachments: http://www.ecs.umass.edu/~smenon/tarballs/testGrad.gz http://www.ecs.umass.edu/~smenon/tarballs/boxTestCase.gz Thanks in advance. |
|
June 4, 2010, 18:23 |
|
#2 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Well, turns out that this was a false alarm. Bug-fix in revision 1716 of OF-1.5-dev.
Apologies. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Technical] Why are hex meshes better than tet? | bigphil | OpenFOAM Meshing & Mesh Conversion | 10 | July 18, 2016 13:20 |
Getting prism to inflate into mixed tet-hex meshes | Joe | CFX | 16 | October 10, 2011 08:06 |
[ICEM] how can i create a consistent transitions between tet and hex? specifically my model? | snailstb | ANSYS Meshing & Geometry | 3 | March 15, 2010 21:26 |
Diffusion in tet meshes | Johnson | Main CFD Forum | 1 | October 13, 2003 03:59 |
FV discretisation on tet meshes | peter grafenberger | Main CFD Forum | 7 | October 29, 1999 07:32 |