Hi Robert,

I'm getting pretty good results now, even on my final model which is a bit more complex than what I've been showing you.  In addition to the points your mentioned, which were very helpful, I also found that running the 'optimize 3D' option in gmsh does give a significant improvement in reducing the magnitude of this error.  My hypothesis is that before running the mesh optimizer there may be a lot of very small cells which might have wild gradients.  The 3D optimizer I assume does some sort of regularization, removing the small cells.  After combining all these effects the loss in flux at the sink is approx 1%, which is acceptable for my purposes.

Overall factors which helped:
- increasing mesh density around the areas of interest
- choosing the right solver
- using gmsh 3D optimizer to eliminate small cells
- fixing various bugs which Robert found (thanks!)


G



On Thursday, August 7, 2014 8:00:58 AM UTC-4, Robert Cimrman wrote:
On 08/07/2014 01:59 PM, Robert Cimrman wrote:
> On 08/07/2014 01:48 AM, Geoff Wright wrote:
>> Hi Robert,
>>
>> Thanks for the response -- and good catch!  The first order results are a
>> lot better now with the bugfix in the material.  But still losing about 20%
>> of flux using first order.  I tried running it with approx_order=2, and
>> using the petsc solver, but it always converges to this trivial/invalid
>> solution:
>>
>> Source flux:  4.69775273941
>> Sink flux:  -5.7976979887e-25
>> Block flux:  8.34388481281e-06
>> Entire surf:  4.6977610833
>> Sum of partial fluxes == total: 4.6977610833 == 4.6977610833
>
> I could get the petsc solvers converge either. But I had some success with

...could not...