Hi Robert,
That works perfectly, many thanks! For the moment I only need to calculate the vertical heat flow at the upper left and right corners, and since the sides are vertical I am planning to just take the first difference of the temperature at the surface with the node below it. Eventually I think it will be useful to know the heat flow at every point along the surface, and I am not sure how I will do that. Any suggestions will be much appreciated.
Also, I should apologise because I think I put us on the wrong track with d_surface_flux. When I said I need to know the heat flow out the top, I should have said that I want to know the heat flow at every point along the top boundary. I think d_surface_flux is integrating over the surface to give me the total heat flow out the top - isn't it? - which is actually not what I'm interested in. Sorry about that.
Regards,
- Phil
On Monday, April 7, 2014 5:40:23 PM UTC+10, seismo_phil wrote:
Hi again,
Further to my previous post on d_surface_flux, I thought I should be able to evaluate the surface heat flux myself, by solving the problem interactively and calculating the surface gradient myself. I use:
pb, state = solve_pde('flndrs2d.py')
t = state.get_parts()['t']
which returns temperatures. Now all I need are the corresponding coordinates. So I try:
xy = pb.get_mesh_coors()
But of course the coordinates vector is longer than the temperature one, I presume because the ebcs have resulted in removal of the corresponding DOFs. Is there anyway I can either (a) restore the full temperature vector, so I have temperatures at all the nodes, even the ones with ebcs applied, or (b) get the coordinates for only those nodes which do not have ebcs applied, i.e. coordinates that correspond to the temperatures returned by state.get_parts()? I tried pb.remove_bcs(), but was unsure if that affects anything other than the stiffness matrix. Again, any suggestions?
Many thanks,
- Phil