On Jan 23, 2013, at 8:39 PM, John Assael wrote:

> I think it its not a problem of properties as the same values are used in 
> COMSOL and they result different values.
> Moreover, I tried small changes like 5-10% and there was no big difference...

If you drop tc0 by a factor of 2, you get pretty close to your COMSOL solution. 
I'm not saying that's what happened, just that this problem is pretty sensitive 
to the thermal diffusivity.

> could it be FiPy's Solver?

It could be, but I think it's unlikely. FiPy is subjected to thousands of 
tests, many of them much more rigorous than this fairly simple heat transport 
problem. I suspect that there is some unintended difference in the declaration 
of the COMSOL problem and the declaration of the FiPy problem.

One issue is that your solutions are not converged. Changing the timestep 
changes the answer. If changing the timestep or the grid resolution changes the 
answer, then your timestep or grid spacing are too large. Your coefficients are 
all linear, so sweeping does not help, but dropping the timestep does. You 
might not need that much, but dropping timeStep by a factor of ten seems to 
give fairly converged results.

Another thing that occurred to me is that you have declared the coefficient of 
the DiffusionTerm at cell centers, but FiPy needs it at faces. FiPy 
interpolates from cells to faces automatically, but the particular 
interpolation chosen can make a difference. When I started experimenting with 
different interpolations, I found that this simple rearrangement of your 
equation:

 heatEq = (TransientTerm(coeff=denCell*cpCell) == DiffusionTerm(coeff=tcCell) + 
QCell)

is enough (combined with timeStep = 2e-4) to give pretty good agreement with 
your Experimental and COMSOL results:

0.002 0.530949358814
0.004 0.798725006713
0.006 0.981455545597
0.008 1.11988469053
0.01 1.23100247808
0.012 1.32361096122
0.014 1.4028708204
0.016 1.47206568877
0.018 1.53341163428
0.02 1.58847282845

This comes back to my original point about the sensitivity of this problem to 
the thermal diffusivity. By changing the interpolation of the DiffusionTerm, 
you change the thermal diffusivity at the wire/fluid boundary and so have a 
strong effect on the evolution of the problem.
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to