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!