On May 16, 2013, at 6:39 AM, Frederic Durodie <frederic.duro...@googlemail.com> 
wrote:

> So I'm a bit puzzled as to why for X from -L/2 to 0 the temperature is
> 0. : it should increase linearly to 2.5 deg C.

I suspect the problem is that divergence of the flux at the cell just left of 
the thermal contact is satisfactorily zero, because we are not treating the 
thermal contact as a flux condition but as a source. The flux condition could 
be achieved with a ConvectionTerm, but I don't see any way to compose that that 
retains the jump. A ConvectionTerm applies to the value *at* the face, and you 
have two values at the face, one on either side.

I'll have to think about this.

> For your (and other users convenience) I tried to translate your
> solution to a 2D formulation. I could not do this in a straight forward
> manner as some FiPy methods did not appear to function in the same way
> for the 2D problem :
> 
> 1) I could not make the thermal conductance, K, a Face variable because
> if so I could not assign a value for K in a "Physical Surface" of the
> mesh for regions 1 and 2
> 
> 2) but as a consequence of making K a cell variable I could not zero-it
> on the "thermal contact" boundary (Physical Line).

You can resolve this issue by assigning K in two steps:

Kcell = fp.CellVariable(name='Conductance', mesh = mesh, value = 0.)
Kcell.setValue(K1, where = mesh.physicalCells['Region 1'])
Kcell.setValue(K2, where = mesh.physicalCells['Region 2'])

K = fp.FaceVariable(name='Conductance', mesh = mesh, 
                    value=Kcell.faceValue)
K.setValue(0., where=mesh.physicalFaces['thermal contact'])

This restores the equivalent of my 1D solution, with a 1 K jump at the 
interface and zero temperature in Region 1. The solution is also not sensitive 
to sweeping any longer.


_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to