0

I want to simulate heat transfer from a hot fluid flowing through a pipe into a surrounding solid. The temperature of the fluid entering the pipe is varying.

The best thing I've thought of so far, is using variable which stores its previous value (old) and manually shifting values along the pipe plus assigning current inlet fluid temperature to the volume in the beginning of the pipe to simulate flow while using short enough time intervals to avoid discontinuities.

While this might work, there are noticeable drawbacks since mesh elements have different volume, so assigning other value means the stored energy is changed which is not good for a simulation and since the flow is always in the same direction, this error might accumulate.

I'm wondering if there is a better way of simulating this. Any suggestions?

Thank you!

fAX
  • 1,451
  • 1
  • 10
  • 11

1 Answers1

1

If I understand the physics you're trying to include in your simulation, you want steady flow in the pipe with a variable inlet temperature and then heat diffusion in the entire domain, pipe and surrounding fluid, correct?

If so, I would model convection-diffusion over the entire domain, with a convection coefficient corresponding to the fluid velocity in the pipe and zero elsewhere. I'd set a Variable constraint on the pipe inlet, outflow constraint on the pipe outlet, and (default) no flux or Dirichlet everywhere else.

jeguyer
  • 2,379
  • 1
  • 11
  • 15
  • I understand your answer, and really like the approach, but it now rises a lot of specific questions. Would you be so kind to point the direction? 1. How can I set convection coefficient to be a vector in FiPy? 2. Which kind of source do you recommend to use ExplicitSource? ImplicitSource? Something else? I'm reading the manual to find the answers, and there are little 3D related examples to learn from there. Thank you! – fAX Mar 15 '17 at 18:36
  • 1
    1) We don't have many examples of non-uniform convection velocity fields. See: [examples.flow.stokesCavity](http://www.ctcms.nist.gov/fipy/examples/flow/generated/examples.flow.stokesCavity.html), or `examples.reactiveWetting.liquidVapor2D.py` (no html). Basically, `FaceVariable(..., rank=1)`. 2) Any time the source is proportional to the field, you should use an `ImplictSourceTerm`. The answer isn't different for 3D. – jeguyer Mar 16 '17 at 17:10