Hi Robert,
Yes, I generated the domain using gmsh. I have tried uniform cell size and the numbers are different but still off. I checked the surface areas of the inner and outer spheres, they come out ~3% below the theoretical sphere surface area but i'm assuming this is due to the mesh approximation. As far as I can tell the meshes and regions are okay.
Please let me know if you have any ideas.. I attached the .geo file that I used to generate the meshes, in case it is useful.
Thanks,
Geoff
On Thursday, July 31, 2014 7:19:20 PM UTC-4, Geoff Wright wrote:
Hi Robert,
I'm new to sfepy and having a good experience so far. But I've been having some issues understanding the d_surface_flux function.. a couple of questions that might help:
- In the poisson_neumann example, if I add a post_process function which evaluates various surface fluxes the results are not what I would expect. Here is my post_process function:
def post_process(out, pb, state, extend=False): from sfepy.base.base import Struct
flx = pb.evaluate('d_surface_flux.2.Gamma(coef.sigma, t)',
mode='el_avg') print "Flux, entire surface:", np.sum(flx), flx.max(), flx.min()
snkf = pb.evaluate('d_surface_flux.2.Gamma_Left(coef.sigma, t)',
mode='eval') print "Sink flux: ", snkf
srcf = pb.evaluate('d_surface_flux.2.Gamma_Right(coef.sigma, t)',
mode='eval') print "Source flux: ", srcf
blkf = pb.evaluate('d_surface_flux.2.Gamma_N(coef.sigma, t)',
mode='eval') print "Block flux: ", blkf
return out
I would expect that "Flux, entire surface" would be approximately zero, and the sink flux and source flux should be approximately equal but opposite sign, and block flux to be zero. Since Gamma_N is supposed to have a zero neumann condition on it my understanding is that flux would only be present over Gamma_Left and Gamma_Right and that they would be equal but opposite sign. What am I missing here?
- If I compute surface_flux using mode='el_avg' and then sum the results, why is that number not equal to surface_flux computed with mode='eval'? Whats the difference?
Thanks for your help,
Geoff