1
$\begingroup$

So I had an old post a couple of days ago about a similar problem with Dirichlet boundary conditions for the inner and outer boundary. The link to the original post:

2D heat conduction/advection through an annulus with Dirichlet Conditions

enter image description here

Now I'm wondering about replacing the inner boundary with a time dependent one. Just to reiterate the setup: I want to simulate heat conduction (and advection) through an annulus and its surrounding material in 2D, as illustrated in this mesh. There is an overarching heat conduction equation that dictates heat conduction/advection in both materials:

$\[Sigma][x, y]*D[T[t, x, y], t] + ux[x, y]*D[T[t, x, y], x] -   \[Alpha][x, y]*Laplacian[T[t, x, y], {x, y}] - q[x, y]/Subscript[(Subscript[\[Rho]c, p]), f]$

In the gray region I set the advection term to 0. In the yellow region there is both conduction and advection. At the outer edge of the yellow region, I want the temperature to be at a constant 12 degrees. Originally, I set the inner boundary of the gray region to be at 45 degrees. Here is the original solution posted by Alex Trounev.

    tm = 5;
    \[CapitalOmega]1 = 
    ImplicitRegion[(x - 2.5)^2 + (y - 2.5)^2 >= 0.09 && (0 <= x <= 5) 
    && (0 <= y <= 5), {x, y}];
    \[Sigma] [x_, y_] := 
    Piecewise[ {{1, .09 <= ((x - 2.5)^2) + ((y - 2.5)^2 ) <= 0.25}, 
    {5.95396, ((x - 2.5)^2) + ((y - 2.5)^2 ) >  0.25}}]
    u [x_, y_] := 0;
    \[Alpha] [x_, y_] := 
    Piecewise[ {{2.82965, .09 <= ((x - 2.5)^2) + ((y - 2.5)^2 ) <= 
    0.25}, {5.02649, ((x - 2.5)^2) + ((y - 2.5)^2 ) >  0.25}}] 
    q [x_, y_] := Piecewise[{{0, .09 < ((x - 2.5)^2) + ((y - 2.5)^2 ) 
    < 0.25}, {1, ((x - 2.5)^2) + ((y - 2.5)^2 ) >  0.25}}]
    eq = \[Sigma] [x, y]* D[T[t, x, y] , t] - \[Alpha][x, y]*
    Laplacian[T[t, x, y], {x, y}] - q[x, y] == 0;
    Subscript[\[CapitalGamma], D] = {DirichletCondition[T[t, x, y] == 
    45,((x - 2.5)^2 + (y - 2.5)^2 ) == 0.09], 
    DirichletCondition[T[t, x, y] == 12, x == 0 || x == 5 || y == 0 
    || y == 5]};
    Temp = NDSolveValue[{eq, Subscript[\[CapitalGamma], D], T[0, x, 
    y] == 12}, T, {t, 0, tm}, {x, y} \[Element] \[CapitalOmega]1, 
    Method -> {"FiniteElement", "InterpolationOrder" -> {T -> 2}, 
    "MeshOptions" -> {"MaxCellMeasure" -> 0.001}}];
    Table[ContourPlot[Temp[t, x, y], {x, y} \[Element] \ . 
    [CapitalOmega]1, 
    Contours -> 20, ColorFunction -> "TemperatureMap", 
    PlotLegends -> Automatic, PlotRange -> All, 
    PlotLabel -> Row[{"t=", t}]], {t, .1*tm, tm, .3*tm}]

enter image description here

Now my question is, what if I want to set the inner boundary at a constant temperature of 12 initially, and make the temperature on the boundary change with the following equation:

D[T[t, x, y], t] + A - B(T[t, 2.81, 2.5 ] - T[t, 2.8, 2.5])==0

where A and B are constants. This equation essentially specifies the temperature on the inner boundary of the gray region, but the boundary's temperature is dependent on the solution T[t, x, y] at two points {2.81, 2.5} and {2.8, 2.5} as well as time. Note that I choose these two somewhat arbitrary points to denote the temperature difference between the temperature at the inner boundary and in the gray region immediately next to the boundary. This expression can probably be replaced by some more sophisticated expression if viable.

Do I have to solve this equation simultaneously with the previous overarching heat conduction/advection equation? If so how can I accomplish this in Mathematica?

Update:

A better way of expressing the equation that specifies the temperature on the inner boundary is probably:

D[F[t, x, y], t] + A - B(T[t, x, y ] - F[t, x, y])==0

where T[t, x, y] is defined on the gray and yellow region, excluding the inner boundary,

and F[t, x, y] is the temperature defined on the inner boundary. a.k.a ((x - 2.5)^2 + (y - 2.5)^2 ) == 0.09

has parameters:

fluidTempOp = D[F[t, x, y], t] + Subscript[u, z]*zTempGrad-  (2*Subscript[\[Alpha],p] (T[t, x, y ]- F[t, x, y]))/(Subscript[r, i]* Subscript[(Subscript[\[Rho]c, p]), fl])

where

    Subscript[u, z] = 0.65;
    Subscript[r, i] = 5*10^(-2);
    Subscript[(Subscript[\[Rho]c, p]), fl] =4.12262*10^6;
    zTempGrad = 0.1;
    Subscript[\[Alpha], p ] =2.82965*10^-7;
$\endgroup$
5
  • $\begingroup$ OK, but eq D[T[t, x, y], t] + A - B(T[t, 2.81, 2.5 ] - T[t, 2.8, 2.5])==0 is not a boundary condition, it is just an additional equation. The points $(x,y)$ in the boundary condition must belong to the boundary. $\endgroup$ Commented Jul 31, 2018 at 5:59
  • $\begingroup$ Thanks for the input. Do you think there is a way of setting the temperature value at ((x - 2.5)^2 + (y - 2.5)^2 ) == 0.09 at a constant (e.g. 12) initially, and make the boundary temperature change according to the this equation D[T[t, x, y], t] + A - B(T[t, 2.81, 2.5 ] - T[t, 2.8, 2.5])==0? $\endgroup$
    – user59435
    Commented Jul 31, 2018 at 14:43
  • $\begingroup$ It depends on what kind of problem you want to solve. Do you have the task of controlling the temperature at the border according to the sensors? $\endgroup$ Commented Jul 31, 2018 at 14:51
  • $\begingroup$ I'm actually trying to simulate the heat diffusion in and out of a ground source heat pump in 2D. In this case, the gray region represents the pipe, the yellow region represents the surrounding soil, the region inside ((x - 2.5)^2 + (y - 2.5)^2 ) == 0.09 is the "working fluid" of the system, the temperature of which initially agrees with the soil and the pipe (when the system is idle), but would change once the system is running. I can update the post to give more detailed parameters. $\endgroup$
    – user59435
    Commented Jul 31, 2018 at 14:59
  • $\begingroup$ If the problem has a cylindrical symmetry, then it is better to make a 1D model with a suitable model of turbulent heat transfer in the working fluid. $\endgroup$ Commented Aug 1, 2018 at 8:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.