Group Abstract Group Abstract

Message Boards Message Boards

1
|
8.8K Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Solving of a heat equation, still running after 5 hour

Posted 6 years ago

Hi, I started this program who resolve a heat equation, after 5 hours of compilation, I stopped it. I don't understand why it takes all this time? Normally the calculations are not complicated at this point, please help me find a solution to this problem:

T = 2 \[Pi];
l = \[Pi];
a = 1/100;
w1 = Sin;
y0 = Identity;
(*Définit la fonction indicatrice*)
indicator[x_] := Piecewise[{{1, 0 < x < \[Pi]/2}}, 0];
S[t_, f_, x_] :=  Sum[ Exp[- t  n^2] Integrate[f[s] Sin[s n], {s, 0, \[Pi]}]  Sin[x n], {n, 5}];
v1[x_] := w1[x] - S[T, y0, x];
L[t_, x_] := S[T - t, v1, x];
Q[x_] := indicator[x] Integrate[L[s, x]^2, {s, T - l, T}];
g1[x_] := a v1[x] + Q[x];
g2[t_, x_] := indicator[x] v1[x] L[t, x];
(*control*)
u[t_, x_] := g2[t, x]/g1[x];
****************************************************************************
homogen = 
D[f[x, t], t] - D[f[x, t], {x, 2}] -  indicator[x] u[x, t] == 0;
(*données initiales propres *)
ic = {f[x, T - l] == y0[x]};
(* Condition aux bord de Dirichlet*)
bc = {f[0, t] == 0, f[\[Pi], t] == 0};
(*résolution analytique de l'équation *)
sol1 = DSolveValue[{homogen, ic, bc},  f[x, t], {x, 0, \[Pi]}, {t, 0, T}]
POSTED BY: Lina Lili
5 Replies
Posted 6 years ago

Hi, I have solved the heat equation in Mathematica in my college course. Please see the attachments.

POSTED BY: Updating Name

Hi, I am also interested in this post, but and am just refreshing my memories of the heat equation. As John pointed out, you are asking for help, but your post is has very little annotation. Could you please go back to the original post and fill in the details (a picture would be nice) in the way that John analyzed and your subsequent comment so that we have a clearer understanding of what you are trying to do instead of trying to figure it out ourselves for you. Thanks.

POSTED BY: Jack I Houng
Anonymous User
Anonymous User
Posted 6 years ago
POSTED BY: Anonymous User
POSTED BY: Lina Lili

Solving of a heat equation, still running after 5 hours.

POSTED BY: Lina Lili
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard