Skip to main content
added 476 characters in body
Source Link
Alex Trounev
  • 48.8k
  • 3
  • 51
  • 115

Let us compare two models

eq1 = D[T[t, x, y] , 
     t] - (\[Alpha][x, y]*Laplacian[T[t, x, y], {x, y}] - 
       q[x, y])/\[Sigma][x, y] == 0;
eq2 = \[Sigma][x, y]*D[T[t, x, y] , t] - \[Alpha][x, y]*
     Laplacian[T[t, x, y], {x, y}] - q[x, y] == 0;

The first model I published and deleted, so as not to cause controversy. Interestingly, the two models give different results. fig3

Let us compare two models

eq1 = D[T[t, x, y] , 
     t] - (\[Alpha][x, y]*Laplacian[T[t, x, y], {x, y}] - 
       q[x, y])/\[Sigma][x, y] == 0;
eq2 = \[Sigma][x, y]*D[T[t, x, y] , t] - \[Alpha][x, y]*
     Laplacian[T[t, x, y], {x, y}] - q[x, y] == 0;

The first model I published and deleted, so as not to cause controversy. Interestingly, the two models give different results. fig3

added 94 characters in body
Source Link
Alex Trounev
  • 48.8k
  • 3
  • 51
  • 115

In this problem, two discontinuous functions are not needed, only one is sufficient $\alpha/\sigma$. The scale multiplier $10^{-7}$ should be included in the definition of time.I checked the statement that two models in which 2 or 1 discontinuous functions are used give different results. Therefore, I leave the version of the problem statement proposed by the author of the topic. Then the task is solved using the code

 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/5.95396, ((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]/\[Sigma][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}]

fig1fig2

In this problem, two discontinuous functions are not needed, only one is sufficient $\alpha/\sigma$. The scale multiplier $10^{-7}$ should be included in the definition of time, Then the task is solved using the code

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/5.95396, ((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 = D[T[t, x, y] , t] - \[Alpha][x, y]*
     Laplacian[T[t, x, y], {x, y}] - q[x, y]/\[Sigma][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}]

fig1

The scale multiplier $10^{-7}$ should be included in the definition of time.I checked the statement that two models in which 2 or 1 discontinuous functions are used give different results. Therefore, I leave the version of the problem statement proposed by the author of the topic. Then the task is solved using the code

 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}]

fig2

Source Link
Alex Trounev
  • 48.8k
  • 3
  • 51
  • 115

In this problem, two discontinuous functions are not needed, only one is sufficient $\alpha/\sigma$. The scale multiplier $10^{-7}$ should be included in the definition of time, Then the task is solved using the code

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/5.95396, ((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 = D[T[t, x, y] , t] - \[Alpha][x, y]*
     Laplacian[T[t, x, y], {x, y}] - q[x, y]/\[Sigma][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}]

fig1