View Issue Details

IDProjectCategoryView StatusLast Update
0001197OpenFOAMBugpublic2014-02-27 16:22
Reporteruser870Assigned Touser2 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Platformintel 64OSMintOS Version15
Summary0001197: Computation of fvc::grad(scalar) seems to be wrong at the intefaces between processors.
DescriptionAttached you will find two pictures: one is the result of the serial computation and it is the correct solution, the other one shows the computation on 2 cpu.
I initialize a scalarField G such that it represents a distant function from a circonference of radius 1 mm. The mesh size is also 1 mm.
The shown vectors are computed as -grad(G)/mag(grad(G)) using practically the code of XiFoam solver.
In the correct solution the direction of the vector is practically radial with respect to the centre of the initial circle, while in the parallel case, at the interface which split the domain in two parts, the solution is clearly wrong.
I tested the initialization procedure in parallel and the resulting initial field is set up correctly, so the problem must be the computation of -fcv::grad(G). I try different schemes for the gradient just to check and the problem was the same.

Attached you will find also a simplified version of the solver I used and the test case of the pictures.
TagsNo tags attached.

Activities

user870

2014-02-27 14:09

 

solverAndPictures.tar (511,949 bytes)

user2

2014-02-27 14:49

  ~0002910

The G-eqn failed to converge using the PBiCG solver in parallel - changing to the smoothSolver led to the parallel case producing the correct result.

// solver PBiCG;
// preconditioner DILU;
        solver smoothSolver;
        smoother symGaussSeidel;

user870

2014-02-27 15:44

  ~0002911

Thank you for the fast response,
You are right, now the computation is correct also in parallel.
It is strange that the computation of the normal direction remains as it appears in the picture after the first time step (before the gEqn is solved for the first time), after that, when the gEqn is solved with the proposed solver, the direction of the vectors becomes correct.
With the serial computation the direction is always correct, I was misled by this result.

user870

2014-02-27 15:59

  ~0002912

Anyway I will perform more tests, thank you again.

Issue History

Date Modified Username Field Change
2014-02-27 14:09 user870 New Issue
2014-02-27 14:09 user870 File Added: solverAndPictures.tar
2014-02-27 14:49 user2 Note Added: 0002910
2014-02-27 15:44 user870 Note Added: 0002911
2014-02-27 15:59 user870 Note Added: 0002912
2014-02-27 16:22 user2 Status new => resolved
2014-02-27 16:22 user2 Resolution open => no change required
2014-02-27 16:22 user2 Assigned To => user2