editedit: adding code
edit #2edit #2: adding more code (defining variables and calculating initial temperature profile)
reff = .001; ts = .000250; tito = .000005; tsl = .00023;
bmesh = ToBoundaryMesh[
"Coordinates" -> {{-reff, 0}, {reff, 0}, {reff, ts}, {reff,
ts + tito}, {reff, ts + tito + tsl}, {-reff,
ts + tito + tsl}, {-reff, ts + tito}, {-reff, ts}},
"BoundaryElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4,
5}, {5, 6}, {6, 7}, {7, 8}, {8, 1}, {8, 3}, {7, 4}}]}];
mesh = ToElementMesh[bmesh];
bmesh["Wireframe"]
mesh["Wireframe"]
\[Rho]s = 3980; \[Rho]ito = 7120; \[Rho]sl = 958;
ks = .035; kito = .011; ksl = .00067;
cs = .75; cito = .25; csl = 4.22;
gs = 0; gito = 2800000; gsl = 0;
\[Rho] = If[0 <= z < ts, \[Rho]s,
If[ts <= z < ts + tito, \[Rho]ito, \[Rho]sl]];
k = If[0 <= z < ts, ks, If[ts <= z < ts + tito, kito, ksl]];
c = If[0 <= z < ts, cs, If[ts <= z < ts + tito, cito, csl]];
g = If[0 <= z < ts, gs, If[ts <= z < ts + tito, gito, gsl]];
eqn1[z_] = k*\!\(
\*SubscriptBox[\(\[PartialD]\), \(z, z\)]\(T1[z]\)\) + g;
Tbl = 100;
Tl[z_] = Tbl;
Subscript[\[CapitalGamma]1, D] =
DirichletCondition[T1[z] == Tbl, z == ts + tito + tsl];
Subscript[\[CapitalGamma]1, N] = NeumannValue[0, z == 0];
BCr = NDSolveValue[{eqn1[z] == Subscript[\[CapitalGamma]1, N],
Subscript[\[CapitalGamma]1, D]}, T1, {z, 0, ts + tito + tsl},
MaxStepSize -> 0.0000000001];
Plot[{BCr[z], VerticalSlider}, {z, 0, ts + tito + tsl}]
BCr[0]
BCr[ts]
BCr[ts + tito]
BCr[ts + tito + tsl]
Plot[BCr[z], {z, ts, ts + tito + tsl}]
Plot[BCr[z], {z, 0, ts}]
Plot[BCr[z], {z, ts, ts + tito}]
Plot[BCr[z], {z, ts + tito, ts + tito + tsl}]
Plot[BCr[z], {z, ts - tito, ts + tito}]
Plot[BCr[z], {z, ts - 2*tito, ts + 3*tito}]
Plot[BCr[z], {z, ts + tito, ts + 3*tito}]
Ti[z_] := \[Piecewise] {
{BCr[z], 0 <= z < ts + tito},
{100, True}
};
Plot[Ti[z], {z, 0, ts + tito + tsl}]
bmesh = ToBoundaryMesh[
"Coordinates" -> {{-reff, 0}, {reff, 0}, {reff, ts}, {reff,
ts + tito}, {reff, ts + tito + tsl}, {-reff,
ts + tito + tsl}, {-reff, ts + tito}, {-reff, ts}},
"BoundaryElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4,
5}, {5, 6}, {6, 7}, {7, 8}, {8, 1}, {8, 3}, {7, 4}}]}];
mesh = ToElementMesh[bmesh];
bmesh["Wireframe"]
mesh["Wireframe"]
[Rho]s = 3980; [Rho]ito = 7120; [Rho]sl = 958;
ks = .035; kito = .011; ksl = .00067;
cs = .75; cito = .25; csl = 4.22;
gs = 0; gito = 2800000; gsl = 0;
[Rho] = If[0 <= z < ts, [Rho]s,
If[ts <= z < ts + tito, [Rho]ito, [Rho]sl]];
k = If[0 <= z < ts, ks, If[ts <= z < ts + tito, kito, ksl]];
c = If[0 <= z < ts, cs, If[ts <= z < ts + tito, cito, csl]];
g = If[0 <= z < ts, gs, If[ts <= z < ts + tito, gito, gsl]];
eqn1[z_] = k*!(
*SubscriptBox[([PartialD]), (z, z)](T1[z])) + g;
Tbl = 100;
Tl[z_] = Tbl;
Subscript[[CapitalGamma]1, D] =
DirichletCondition[T1[z] == Tbl, z == ts + tito + tsl];
Subscript[[CapitalGamma]1, N] = NeumannValue[0, z == 0];
BCr = NDSolveValue[{eqn1[z] == Subscript[[CapitalGamma]1, N],
Subscript[[CapitalGamma]1, D]}, T1, {z, 0, ts + tito + tsl},
MaxStepSize -> 0.0000000001];
Plot[{BCr[z], VerticalSlider}, {z, 0, ts + tito + tsl}]
BCr[0]
BCr[ts]
BCr[ts + tito]
BCr[ts + tito + tsl]
Plot[BCr[z], {z, ts, ts + tito + tsl}]
Plot[BCr[z], {z, 0, ts}]
Plot[BCr[z], {z, ts, ts + tito}]
Plot[BCr[z], {z, ts + tito, ts + tito + tsl}]
Plot[BCr[z], {z, ts - tito, ts + tito}]
Plot[BCr[z], {z, ts - 2tito, ts + 3tito}]
Plot[BCr[z], {z, ts + tito, ts + 3*tito}]
Ti[z_] := [Piecewise] {
{BCr[z], 0 <= z < ts + tito},
{100, True}
};
Plot[Ti[z], {z, 0, ts + tito + tsl}]