Recycling solutions of multidimensional NDSolve












4















Dear wolfram community,



I hope my problem is clear and easy to solve.



I have already solved the following heat equation over a domain:



pde=1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] -D[T[t, r, z], {t}]


Δz = 50*10^(-4);(*[m]*)
R = 5*10^(-2);(*[m]*)
τ = 3.5*10^(-2)(*[s]*)
Tw = 200;(*[K]*)
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}]

bc = {
DirichletCondition[T[t, r, z] == Tw,
z == -2*Δz],
DirichletCondition[T[t, r, z] == Tw, r == R]
};
(*Note that the unspecified boundaries are set to Neuman zero by default*)

ic = {T[0, r, z] == 300 (*[K]*)};


sol = NDSolve[{pde == 0, bc, T, {t, 0, τ},{r, z} ∈ Ω]


I optained an Interpolationfunction. Now I want to use this function as an initial value (T[0,r,z]) to solve a new heat equation over an enlarged domain (domnew). The new domain is essentially the old domain but enlarged by an amount of z:



 omeganew = ImplicitRegion[0 <= r <= R && -4*Δz <= z <= 0, {r, z}];


For the new solution I want the Temperature distribution from the previous solution to be valid at the lower part of omeganew and a different function fc[r,z] (lets assume for the purpose of simplicity that fc[r,z]= constant) to be valid within the region that is newly added. So I need a shifted version of the previous solution with respect to the z-coordinate.



In a nutshel, I would like to extract the information (Temperaturevalues at an abitrary time t) obtained by NDsolve (e.g. sol) to construct a Unitstep function (is there a better alternative?) that I would then use as the initial condition for the new domain (omeganew).



Can anyone please help me?










share|improve this question









New contributor




Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • What are the values of tau, R, deltaz, etc? Without them it's not possible to simulate. Please provide them.

    – user21
    7 hours ago











  • [CapitalDelta]z = 50*10^(-4);([m]) ;[Tau] = 3.5*10^(-2); R = 5*10^(-2); ([m])

    – Gustavo Meyagan
    7 hours ago













  • Please add them to your post.

    – user21
    7 hours ago











  • ok I have added the additional information. Thanks in advance!

    – Gustavo Meyagan
    6 hours ago
















4















Dear wolfram community,



I hope my problem is clear and easy to solve.



I have already solved the following heat equation over a domain:



pde=1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] -D[T[t, r, z], {t}]


Δz = 50*10^(-4);(*[m]*)
R = 5*10^(-2);(*[m]*)
τ = 3.5*10^(-2)(*[s]*)
Tw = 200;(*[K]*)
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}]

bc = {
DirichletCondition[T[t, r, z] == Tw,
z == -2*Δz],
DirichletCondition[T[t, r, z] == Tw, r == R]
};
(*Note that the unspecified boundaries are set to Neuman zero by default*)

ic = {T[0, r, z] == 300 (*[K]*)};


sol = NDSolve[{pde == 0, bc, T, {t, 0, τ},{r, z} ∈ Ω]


I optained an Interpolationfunction. Now I want to use this function as an initial value (T[0,r,z]) to solve a new heat equation over an enlarged domain (domnew). The new domain is essentially the old domain but enlarged by an amount of z:



 omeganew = ImplicitRegion[0 <= r <= R && -4*Δz <= z <= 0, {r, z}];


For the new solution I want the Temperature distribution from the previous solution to be valid at the lower part of omeganew and a different function fc[r,z] (lets assume for the purpose of simplicity that fc[r,z]= constant) to be valid within the region that is newly added. So I need a shifted version of the previous solution with respect to the z-coordinate.



In a nutshel, I would like to extract the information (Temperaturevalues at an abitrary time t) obtained by NDsolve (e.g. sol) to construct a Unitstep function (is there a better alternative?) that I would then use as the initial condition for the new domain (omeganew).



Can anyone please help me?










share|improve this question









New contributor




Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • What are the values of tau, R, deltaz, etc? Without them it's not possible to simulate. Please provide them.

    – user21
    7 hours ago











  • [CapitalDelta]z = 50*10^(-4);([m]) ;[Tau] = 3.5*10^(-2); R = 5*10^(-2); ([m])

    – Gustavo Meyagan
    7 hours ago













  • Please add them to your post.

    – user21
    7 hours ago











  • ok I have added the additional information. Thanks in advance!

    – Gustavo Meyagan
    6 hours ago














4












4








4








Dear wolfram community,



I hope my problem is clear and easy to solve.



I have already solved the following heat equation over a domain:



pde=1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] -D[T[t, r, z], {t}]


Δz = 50*10^(-4);(*[m]*)
R = 5*10^(-2);(*[m]*)
τ = 3.5*10^(-2)(*[s]*)
Tw = 200;(*[K]*)
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}]

bc = {
DirichletCondition[T[t, r, z] == Tw,
z == -2*Δz],
DirichletCondition[T[t, r, z] == Tw, r == R]
};
(*Note that the unspecified boundaries are set to Neuman zero by default*)

ic = {T[0, r, z] == 300 (*[K]*)};


sol = NDSolve[{pde == 0, bc, T, {t, 0, τ},{r, z} ∈ Ω]


I optained an Interpolationfunction. Now I want to use this function as an initial value (T[0,r,z]) to solve a new heat equation over an enlarged domain (domnew). The new domain is essentially the old domain but enlarged by an amount of z:



 omeganew = ImplicitRegion[0 <= r <= R && -4*Δz <= z <= 0, {r, z}];


For the new solution I want the Temperature distribution from the previous solution to be valid at the lower part of omeganew and a different function fc[r,z] (lets assume for the purpose of simplicity that fc[r,z]= constant) to be valid within the region that is newly added. So I need a shifted version of the previous solution with respect to the z-coordinate.



In a nutshel, I would like to extract the information (Temperaturevalues at an abitrary time t) obtained by NDsolve (e.g. sol) to construct a Unitstep function (is there a better alternative?) that I would then use as the initial condition for the new domain (omeganew).



Can anyone please help me?










share|improve this question









New contributor




Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












Dear wolfram community,



I hope my problem is clear and easy to solve.



I have already solved the following heat equation over a domain:



pde=1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] -D[T[t, r, z], {t}]


Δz = 50*10^(-4);(*[m]*)
R = 5*10^(-2);(*[m]*)
τ = 3.5*10^(-2)(*[s]*)
Tw = 200;(*[K]*)
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}]

bc = {
DirichletCondition[T[t, r, z] == Tw,
z == -2*Δz],
DirichletCondition[T[t, r, z] == Tw, r == R]
};
(*Note that the unspecified boundaries are set to Neuman zero by default*)

ic = {T[0, r, z] == 300 (*[K]*)};


sol = NDSolve[{pde == 0, bc, T, {t, 0, τ},{r, z} ∈ Ω]


I optained an Interpolationfunction. Now I want to use this function as an initial value (T[0,r,z]) to solve a new heat equation over an enlarged domain (domnew). The new domain is essentially the old domain but enlarged by an amount of z:



 omeganew = ImplicitRegion[0 <= r <= R && -4*Δz <= z <= 0, {r, z}];


For the new solution I want the Temperature distribution from the previous solution to be valid at the lower part of omeganew and a different function fc[r,z] (lets assume for the purpose of simplicity that fc[r,z]= constant) to be valid within the region that is newly added. So I need a shifted version of the previous solution with respect to the z-coordinate.



In a nutshel, I would like to extract the information (Temperaturevalues at an abitrary time t) obtained by NDsolve (e.g. sol) to construct a Unitstep function (is there a better alternative?) that I would then use as the initial condition for the new domain (omeganew).



Can anyone please help me?







differential-equations numerics interpolation recursion finite-element-method






share|improve this question









New contributor




Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 6 hours ago







Gustavo Meyagan













New contributor




Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 7 hours ago









Gustavo MeyaganGustavo Meyagan

212




212




New contributor




Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Gustavo Meyagan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • What are the values of tau, R, deltaz, etc? Without them it's not possible to simulate. Please provide them.

    – user21
    7 hours ago











  • [CapitalDelta]z = 50*10^(-4);([m]) ;[Tau] = 3.5*10^(-2); R = 5*10^(-2); ([m])

    – Gustavo Meyagan
    7 hours ago













  • Please add them to your post.

    – user21
    7 hours ago











  • ok I have added the additional information. Thanks in advance!

    – Gustavo Meyagan
    6 hours ago



















  • What are the values of tau, R, deltaz, etc? Without them it's not possible to simulate. Please provide them.

    – user21
    7 hours ago











  • [CapitalDelta]z = 50*10^(-4);([m]) ;[Tau] = 3.5*10^(-2); R = 5*10^(-2); ([m])

    – Gustavo Meyagan
    7 hours ago













  • Please add them to your post.

    – user21
    7 hours ago











  • ok I have added the additional information. Thanks in advance!

    – Gustavo Meyagan
    6 hours ago

















What are the values of tau, R, deltaz, etc? Without them it's not possible to simulate. Please provide them.

– user21
7 hours ago





What are the values of tau, R, deltaz, etc? Without them it's not possible to simulate. Please provide them.

– user21
7 hours ago













[CapitalDelta]z = 50*10^(-4);([m]) ;[Tau] = 3.5*10^(-2); R = 5*10^(-2); ([m])

– Gustavo Meyagan
7 hours ago







[CapitalDelta]z = 50*10^(-4);([m]) ;[Tau] = 3.5*10^(-2); R = 5*10^(-2); ([m])

– Gustavo Meyagan
7 hours ago















Please add them to your post.

– user21
7 hours ago





Please add them to your post.

– user21
7 hours ago













ok I have added the additional information. Thanks in advance!

– Gustavo Meyagan
6 hours ago





ok I have added the additional information. Thanks in advance!

– Gustavo Meyagan
6 hours ago










1 Answer
1






active

oldest

votes


















4














Here is a way to do it. Let' set up the model:



Δz = 50*10^(-4);(*[m]*)R = 5*10^(-2);(*[m]*)τ = 
3.5*10^(-2);(*[s]*)
pde = 1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] - D[T[t, r, z], {t}];
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}];
bc = {DirichletCondition[T[t, r, z] == Tw, z == -2*Δz], DirichletCondition[T[t, r, z] == Tw, r == R]};


If you now call NDSolveValue you will get a solution (looks like it's zero but that is a different issue)



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, T, {t, 0, τ}, {r, z} ∈ Ω];


If you evaluate the inteprolating function out side of the region you will get a warning and an Indetermiante as an answer.



sol[0, -1, 3]


enter image description here



Indeterminate


To change that you can use:



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, 
T,
{t, 0, τ},
{r, z} ∈ Ω,
{"ExtrapolationHandler" -> {5 &, "WarningMessage" -> False}}
];


Now you will get the extrapolation value specified (5) and no warning:



sol[0, -1, 3]
5


With this you can then call NDSolveValue on a different domain with a different initial value like so:



sol2 = NDSolveValue[{pde == 0, bc, T[0, r, z] == sol[τ, r, z]}, 
T,
{t, 0, τ},
{r, z} ∈ ImplicitRegion[ 0 <= r <= R && -10*Δz <= z <= 0, {r, z}]
];





share|improve this answer


























  • OHH I also forgot to provide the values for Tw and ic (The "wall temperature" and the initial temperature distribution respectively . They are now included in the post!

    – Gustavo Meyagan
    6 hours ago













  • I want sol[tau, r, z] to be the intial value for the domain1: 0 <= r <= R && -4*Δz <= z <= -Δz (e.g.sol[tau, 0, 0]=T[0,0,-Δz ],sol[tau, 0, -0.5*Δz ]=T[0,0,-0.5*Δz -Δz ] ,and so forth) I want to essentially shift the function downwards. And the initial values of the domain2 0 <= r <= R && -Δz <= z <= 0 to be specified by a completely different function ( lets say a constant) Of course sol2 is to be solved for the union of domain1 and domain2

    – Gustavo Meyagan
    5 hours ago













  • @GustavoMeyagan, you need to specify everything in the question. Try to do this in a clean, clear way such that people can follow your line of thought.

    – user21
    3 hours ago











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Gustavo Meyagan is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189460%2frecycling-solutions-of-multidimensional-ndsolve%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














Here is a way to do it. Let' set up the model:



Δz = 50*10^(-4);(*[m]*)R = 5*10^(-2);(*[m]*)τ = 
3.5*10^(-2);(*[s]*)
pde = 1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] - D[T[t, r, z], {t}];
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}];
bc = {DirichletCondition[T[t, r, z] == Tw, z == -2*Δz], DirichletCondition[T[t, r, z] == Tw, r == R]};


If you now call NDSolveValue you will get a solution (looks like it's zero but that is a different issue)



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, T, {t, 0, τ}, {r, z} ∈ Ω];


If you evaluate the inteprolating function out side of the region you will get a warning and an Indetermiante as an answer.



sol[0, -1, 3]


enter image description here



Indeterminate


To change that you can use:



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, 
T,
{t, 0, τ},
{r, z} ∈ Ω,
{"ExtrapolationHandler" -> {5 &, "WarningMessage" -> False}}
];


Now you will get the extrapolation value specified (5) and no warning:



sol[0, -1, 3]
5


With this you can then call NDSolveValue on a different domain with a different initial value like so:



sol2 = NDSolveValue[{pde == 0, bc, T[0, r, z] == sol[τ, r, z]}, 
T,
{t, 0, τ},
{r, z} ∈ ImplicitRegion[ 0 <= r <= R && -10*Δz <= z <= 0, {r, z}]
];





share|improve this answer


























  • OHH I also forgot to provide the values for Tw and ic (The "wall temperature" and the initial temperature distribution respectively . They are now included in the post!

    – Gustavo Meyagan
    6 hours ago













  • I want sol[tau, r, z] to be the intial value for the domain1: 0 <= r <= R && -4*Δz <= z <= -Δz (e.g.sol[tau, 0, 0]=T[0,0,-Δz ],sol[tau, 0, -0.5*Δz ]=T[0,0,-0.5*Δz -Δz ] ,and so forth) I want to essentially shift the function downwards. And the initial values of the domain2 0 <= r <= R && -Δz <= z <= 0 to be specified by a completely different function ( lets say a constant) Of course sol2 is to be solved for the union of domain1 and domain2

    – Gustavo Meyagan
    5 hours ago













  • @GustavoMeyagan, you need to specify everything in the question. Try to do this in a clean, clear way such that people can follow your line of thought.

    – user21
    3 hours ago
















4














Here is a way to do it. Let' set up the model:



Δz = 50*10^(-4);(*[m]*)R = 5*10^(-2);(*[m]*)τ = 
3.5*10^(-2);(*[s]*)
pde = 1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] - D[T[t, r, z], {t}];
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}];
bc = {DirichletCondition[T[t, r, z] == Tw, z == -2*Δz], DirichletCondition[T[t, r, z] == Tw, r == R]};


If you now call NDSolveValue you will get a solution (looks like it's zero but that is a different issue)



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, T, {t, 0, τ}, {r, z} ∈ Ω];


If you evaluate the inteprolating function out side of the region you will get a warning and an Indetermiante as an answer.



sol[0, -1, 3]


enter image description here



Indeterminate


To change that you can use:



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, 
T,
{t, 0, τ},
{r, z} ∈ Ω,
{"ExtrapolationHandler" -> {5 &, "WarningMessage" -> False}}
];


Now you will get the extrapolation value specified (5) and no warning:



sol[0, -1, 3]
5


With this you can then call NDSolveValue on a different domain with a different initial value like so:



sol2 = NDSolveValue[{pde == 0, bc, T[0, r, z] == sol[τ, r, z]}, 
T,
{t, 0, τ},
{r, z} ∈ ImplicitRegion[ 0 <= r <= R && -10*Δz <= z <= 0, {r, z}]
];





share|improve this answer


























  • OHH I also forgot to provide the values for Tw and ic (The "wall temperature" and the initial temperature distribution respectively . They are now included in the post!

    – Gustavo Meyagan
    6 hours ago













  • I want sol[tau, r, z] to be the intial value for the domain1: 0 <= r <= R && -4*Δz <= z <= -Δz (e.g.sol[tau, 0, 0]=T[0,0,-Δz ],sol[tau, 0, -0.5*Δz ]=T[0,0,-0.5*Δz -Δz ] ,and so forth) I want to essentially shift the function downwards. And the initial values of the domain2 0 <= r <= R && -Δz <= z <= 0 to be specified by a completely different function ( lets say a constant) Of course sol2 is to be solved for the union of domain1 and domain2

    – Gustavo Meyagan
    5 hours ago













  • @GustavoMeyagan, you need to specify everything in the question. Try to do this in a clean, clear way such that people can follow your line of thought.

    – user21
    3 hours ago














4












4








4







Here is a way to do it. Let' set up the model:



Δz = 50*10^(-4);(*[m]*)R = 5*10^(-2);(*[m]*)τ = 
3.5*10^(-2);(*[s]*)
pde = 1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] - D[T[t, r, z], {t}];
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}];
bc = {DirichletCondition[T[t, r, z] == Tw, z == -2*Δz], DirichletCondition[T[t, r, z] == Tw, r == R]};


If you now call NDSolveValue you will get a solution (looks like it's zero but that is a different issue)



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, T, {t, 0, τ}, {r, z} ∈ Ω];


If you evaluate the inteprolating function out side of the region you will get a warning and an Indetermiante as an answer.



sol[0, -1, 3]


enter image description here



Indeterminate


To change that you can use:



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, 
T,
{t, 0, τ},
{r, z} ∈ Ω,
{"ExtrapolationHandler" -> {5 &, "WarningMessage" -> False}}
];


Now you will get the extrapolation value specified (5) and no warning:



sol[0, -1, 3]
5


With this you can then call NDSolveValue on a different domain with a different initial value like so:



sol2 = NDSolveValue[{pde == 0, bc, T[0, r, z] == sol[τ, r, z]}, 
T,
{t, 0, τ},
{r, z} ∈ ImplicitRegion[ 0 <= r <= R && -10*Δz <= z <= 0, {r, z}]
];





share|improve this answer















Here is a way to do it. Let' set up the model:



Δz = 50*10^(-4);(*[m]*)R = 5*10^(-2);(*[m]*)τ = 
3.5*10^(-2);(*[s]*)
pde = 1/r D[r*D[T[t, r, z], {r, 1}], {r, 1}] + D[D[T[t, r, z], {z, 1}], {z, 1}] - D[T[t, r, z], {t}];
Ω = ImplicitRegion[0 <= r <= R && -2*Δz <= z <= 0, {r, z}];
bc = {DirichletCondition[T[t, r, z] == Tw, z == -2*Δz], DirichletCondition[T[t, r, z] == Tw, r == R]};


If you now call NDSolveValue you will get a solution (looks like it's zero but that is a different issue)



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, T, {t, 0, τ}, {r, z} ∈ Ω];


If you evaluate the inteprolating function out side of the region you will get a warning and an Indetermiante as an answer.



sol[0, -1, 3]


enter image description here



Indeterminate


To change that you can use:



sol = NDSolveValue[{pde == 0, bc, T[0, r, z] == 0}, 
T,
{t, 0, τ},
{r, z} ∈ Ω,
{"ExtrapolationHandler" -> {5 &, "WarningMessage" -> False}}
];


Now you will get the extrapolation value specified (5) and no warning:



sol[0, -1, 3]
5


With this you can then call NDSolveValue on a different domain with a different initial value like so:



sol2 = NDSolveValue[{pde == 0, bc, T[0, r, z] == sol[τ, r, z]}, 
T,
{t, 0, τ},
{r, z} ∈ ImplicitRegion[ 0 <= r <= R && -10*Δz <= z <= 0, {r, z}]
];






share|improve this answer














share|improve this answer



share|improve this answer








edited 52 mins ago

























answered 6 hours ago









user21user21

19.5k44882




19.5k44882













  • OHH I also forgot to provide the values for Tw and ic (The "wall temperature" and the initial temperature distribution respectively . They are now included in the post!

    – Gustavo Meyagan
    6 hours ago













  • I want sol[tau, r, z] to be the intial value for the domain1: 0 <= r <= R && -4*Δz <= z <= -Δz (e.g.sol[tau, 0, 0]=T[0,0,-Δz ],sol[tau, 0, -0.5*Δz ]=T[0,0,-0.5*Δz -Δz ] ,and so forth) I want to essentially shift the function downwards. And the initial values of the domain2 0 <= r <= R && -Δz <= z <= 0 to be specified by a completely different function ( lets say a constant) Of course sol2 is to be solved for the union of domain1 and domain2

    – Gustavo Meyagan
    5 hours ago













  • @GustavoMeyagan, you need to specify everything in the question. Try to do this in a clean, clear way such that people can follow your line of thought.

    – user21
    3 hours ago



















  • OHH I also forgot to provide the values for Tw and ic (The "wall temperature" and the initial temperature distribution respectively . They are now included in the post!

    – Gustavo Meyagan
    6 hours ago













  • I want sol[tau, r, z] to be the intial value for the domain1: 0 <= r <= R && -4*Δz <= z <= -Δz (e.g.sol[tau, 0, 0]=T[0,0,-Δz ],sol[tau, 0, -0.5*Δz ]=T[0,0,-0.5*Δz -Δz ] ,and so forth) I want to essentially shift the function downwards. And the initial values of the domain2 0 <= r <= R && -Δz <= z <= 0 to be specified by a completely different function ( lets say a constant) Of course sol2 is to be solved for the union of domain1 and domain2

    – Gustavo Meyagan
    5 hours ago













  • @GustavoMeyagan, you need to specify everything in the question. Try to do this in a clean, clear way such that people can follow your line of thought.

    – user21
    3 hours ago

















OHH I also forgot to provide the values for Tw and ic (The "wall temperature" and the initial temperature distribution respectively . They are now included in the post!

– Gustavo Meyagan
6 hours ago







OHH I also forgot to provide the values for Tw and ic (The "wall temperature" and the initial temperature distribution respectively . They are now included in the post!

– Gustavo Meyagan
6 hours ago















I want sol[tau, r, z] to be the intial value for the domain1: 0 <= r <= R && -4*Δz <= z <= -Δz (e.g.sol[tau, 0, 0]=T[0,0,-Δz ],sol[tau, 0, -0.5*Δz ]=T[0,0,-0.5*Δz -Δz ] ,and so forth) I want to essentially shift the function downwards. And the initial values of the domain2 0 <= r <= R && -Δz <= z <= 0 to be specified by a completely different function ( lets say a constant) Of course sol2 is to be solved for the union of domain1 and domain2

– Gustavo Meyagan
5 hours ago







I want sol[tau, r, z] to be the intial value for the domain1: 0 <= r <= R && -4*Δz <= z <= -Δz (e.g.sol[tau, 0, 0]=T[0,0,-Δz ],sol[tau, 0, -0.5*Δz ]=T[0,0,-0.5*Δz -Δz ] ,and so forth) I want to essentially shift the function downwards. And the initial values of the domain2 0 <= r <= R && -Δz <= z <= 0 to be specified by a completely different function ( lets say a constant) Of course sol2 is to be solved for the union of domain1 and domain2

– Gustavo Meyagan
5 hours ago















@GustavoMeyagan, you need to specify everything in the question. Try to do this in a clean, clear way such that people can follow your line of thought.

– user21
3 hours ago





@GustavoMeyagan, you need to specify everything in the question. Try to do this in a clean, clear way such that people can follow your line of thought.

– user21
3 hours ago










Gustavo Meyagan is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Gustavo Meyagan is a new contributor. Be nice, and check out our Code of Conduct.













Gustavo Meyagan is a new contributor. Be nice, and check out our Code of Conduct.












Gustavo Meyagan is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Mathematica Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189460%2frecycling-solutions-of-multidimensional-ndsolve%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Magento 2 controller redirect on button click in phtml file

Polycentropodidae