Temperaturfeld simulieren

Shizmo

Aktives Mitglied
Hallo, ich steh hier vor einer für mich unverständlichen Aufgabe und hoffe mir kann das evtl jemand besser erklären.

Simulieren Sie die Wärmeleitungsgleichung.
Es geht vorerst mal nur um Teil1.

Ich hab die Angabe mal als PDF angehangen.

Das Problem ist die Formel (das Schema):
h[x,y,t+1] = h[x,z,t] - alpha*(4h[x,y,t]-h[x-1,y,t]-h[x+1,y,t]-h[x,y-1,t]-h[x,y+1,t]
Ich brauche ein Feld (also ein 2dim-Array[][], die Spalten sind die x-Werte und die Zeilen die y-Werte), z.B. 5x5.
So jetzt ist z.B. mein x-Wert 5 und mein y-Wert auch 5. Was macht die Formel jetzt mit den Werten, also mit Alpha wird multipliziert, aber was bedeutet h[x,y,t], wie setz ich das um? Was ist die Idee dahinter?

Vielleicht hat von euch einer eine Idee :)
 

Anhänge

  • 1.pdf
    614,9 KB · Aufrufe: 16

klauskarambulut

Bekanntes Mitglied
t steht für time, das ist englisch und bedeutet Zeit.
x und y steht für Koordinaten.

Die Formel sollte man noch Umformen aus t+1 wird t und t wird t-1
h[x,y,t] = h[x,z,t-1] - alpha*(4h[x,y,t-1]-h[x-1,y,t-1]-h[x+1,y,t-1]-h[x,y-1,t-1]-h[x,y+1,t-1]

Jetzt berechnet man in einer Schleife die bei eins beginnt und anzahl Steps durch läuft die jeweilige

Gegeben ist eine anfängliches Temperaturfeld.
double[][] heat;

Das entspricht dem Zeitpunkt 0 (t-1).

Um jetzt das Feld zum Zeitpunkt 1 (t) zu bestimmen, nimmt man das vorige Temperaturfeld und berechnet das ganze für jeden einzelnen Punkt.

h[x][y] = heat[x][y] - alpha*(4heat[x][y]-heat[x-1][y]-heat[x+1][y]-heat[x][y-1]-heat[x][y+1]

h ist jetzt das Temperaturfeld zum Zeitpunkt 1.

Um jetzt den Zeitpunkt 2 zu bekommen nimmt man h für 1 und berechnet anhand der Formel das neue Temperaturfeld.
 

cantbetouched

Neues Mitglied
Hallo,

also ich hab die gleiche Aufgabe und kenn mich noch nicht so richtig aus.
Ich denke dass ich beim Programmieren selbst nicht so Probleme haben werde, allerdings
versteh ich den Rechenweg noch nicht ganz.

Also wenn mir die pdf Datei von meinem Kollegen nehmen ist dort ein Beispiel gegeben
mit :
t=1; alpha=0.1; Array bzw Temperaturfeld = 5x5;
und das Ergebnis ist dann :

0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 10.0 0.0
0.0 0.0 10.0 60.0 0.0
0.0 0.0 0.0 10.0 0.0
0.0 0.0 0.0 0.0 0.0

wie kommt man auf dieses Ergebnis ?

Schon klar es ist oben eh die Formel gegeben aber welche Zahlen werden bei diesem Beispiel in die Formel eingesetzt ?!? Ich komme beim durchrechnen immer aufs Falsche Ergebnis.

Ich rechne wie folgt:

Die Formel von "klauskarambulut":
h[x][y] = heat[x][y] - alpha*(4heat[x][y]-heat[x-1][y]-heat[x+1][y]-heat[x][y-1]-heat[x][y+1]
h[x][y]= 60 - 0.1*(240-0-60-0-0)
h[x][y]= 42;

h(x y) wäre demnach 42 .. was natürlich falsch ist. Hab es auch schon anders probiert komme allerdings nicht aufs richtige Ergebnis.
Könnte mir bitte wer helfen und mir evtl nur den Rechenweg für das oben genannte Beispiel aufschreiben.
Komm nicht drauf.
 

klauskarambulut

Bekanntes Mitglied
Das Feld (3:2) ist Anfangs 100, alle anderen 0

Für t=1 und alpha 0,1

berechnet man das Feld 3:2 so:

h[3][2] = 100 - 0,1(400 - 0 - 0 - 0 - 0)

Feld 2:2 so:
h[2][2] = 0 - 0,1( 0 - 0 - 100 - 0 - 0) Somit 10

Die weiteren relevanten sind
h[3][1] = 0 - 0,1( 0 - 0 - 0 - 0 - 100)
und
h[3][3] = 0 - 0,1( 0 - 0 - 0 - 100 - 0)

Ansonsten kommt überall 0 raus. Ränder und Ecken übernehmen den Wert und bleiben bei 0.

Tja und Bei t = 2 sieht es für 3:2 so aus

h[3][2] = 60 - 0,1(240 - 10 - 0 - 10 - 10) und somit 39

Tja und das macht man dann fünf mal und kommt zuletzt zu der Matrix aus dem PDF.


Ansonsten vielleicht doch was anderes studieren? Etwas ohne Zahlen. Sportwissenschaften?
 

klauskarambulut

Bekanntes Mitglied
Der Rechenweg, aber ausführlicher wirds nicht

Temparaturfeld zum Zeitpunkt t = 0 gegeben als,
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0100,0 0,0
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0 0,0 0,0

Berechnung für alpha=0,1 und t=1 und insulated=false
und das gegebene Temparaturfeld:
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0100,0 0,0
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0 0,0 0,0


Führe Step 1 aus

Berechne h[0,0], da es sich um ein Randfeld handelt folgt h[0][0]=0.0
Berechne h[0,1], da es sich um ein Randfeld handelt folgt h[0][1]=0.0
Berechne h[0,2], da es sich um ein Randfeld handelt folgt h[0][2]=0.0
Berechne h[0,3], da es sich um ein Randfeld handelt folgt h[0][3]=0.0
Berechne h[0,4], da es sich um ein Randfeld handelt folgt h[0][4]=0.0
Berechne h[1,0], da es sich um ein Randfeld handelt folgt h[1][0]=0.0
Berechne h[1,1] = heat[1][1] - alpha * (4 * heat[1][1] - heat[0][1] - heat[2][1] - heat[1][0] - heat[1][2])
also h[1][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,2] = heat[1][2] - alpha * (4 * heat[1][2] - heat[0][2] - heat[2][2] - heat[1][1] - heat[1][3])
also h[1][2] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,3] = heat[1][3] - alpha * (4 * heat[1][3] - heat[0][3] - heat[2][3] - heat[1][2] - heat[1][4])
also h[1][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,4], da es sich um ein Randfeld handelt folgt h[1][4]=0.0
Berechne h[2,0], da es sich um ein Randfeld handelt folgt h[2][0]=0.0
Berechne h[2,1] = heat[2][1] - alpha * (4 * heat[2][1] - heat[1][1] - heat[3][1] - heat[2][0] - heat[2][2])
also h[2][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[2,2] = heat[2][2] - alpha * (4 * heat[2][2] - heat[1][2] - heat[3][2] - heat[2][1] - heat[2][3])
also h[2][2] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 100,0 - 0,0 - 0,0) ergibt 10,0
Berechne h[2,3] = heat[2][3] - alpha * (4 * heat[2][3] - heat[1][3] - heat[3][3] - heat[2][2] - heat[2][4])
also h[2][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[2,4], da es sich um ein Randfeld handelt folgt h[2][4]=0.0
Berechne h[3,0], da es sich um ein Randfeld handelt folgt h[3][0]=0.0
Berechne h[3,1] = heat[3][1] - alpha * (4 * heat[3][1] - heat[2][1] - heat[4][1] - heat[3][0] - heat[3][2])
also h[3][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 100,0) ergibt 10,0
Berechne h[3,2] = heat[3][2] - alpha * (4 * heat[3][2] - heat[2][2] - heat[4][2] - heat[3][1] - heat[3][3])
also h[3][2] = 100,0 - 0,1 * (4 * 100,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 60,0
Berechne h[3,3] = heat[3][3] - alpha * (4 * heat[3][3] - heat[2][3] - heat[4][3] - heat[3][2] - heat[3][4])
also h[3][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 100,0 - 0,0) ergibt 10,0
Berechne h[3,4], da es sich um ein Randfeld handelt folgt h[3][4]=0.0
Berechne h[4,0], da es sich um ein Randfeld handelt folgt h[4][0]=0.0
Berechne h[4,1], da es sich um ein Randfeld handelt folgt h[4][1]=0.0
Berechne h[4,2], da es sich um ein Randfeld handelt folgt h[4][2]=0.0
Berechne h[4,3], da es sich um ein Randfeld handelt folgt h[4][3]=0.0
Berechne h[4,4], da es sich um ein Randfeld handelt folgt h[4][4]=0.0

Das Ergebnis lautet:
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0 10,0 0,0
0,0 0,0 10,0 60,0 0,0
0,0 0,0 0,0 10,0 0,0
0,0 0,0 0,0 0,0 0,0

Berechnung für alpha=0,1 und t=5 und insulated=false
und das gegebene Temparaturfeld:
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0100,0 0,0
0,0 0,0 0,0 0,0 0,0
0,0 0,0 0,0 0,0 0,0


Führe Step 1 aus

Berechne h[0,0], da es sich um ein Randfeld handelt folgt h[0][0]=0.0
Berechne h[0,1], da es sich um ein Randfeld handelt folgt h[0][1]=0.0
Berechne h[0,2], da es sich um ein Randfeld handelt folgt h[0][2]=0.0
Berechne h[0,3], da es sich um ein Randfeld handelt folgt h[0][3]=0.0
Berechne h[0,4], da es sich um ein Randfeld handelt folgt h[0][4]=0.0
Berechne h[1,0], da es sich um ein Randfeld handelt folgt h[1][0]=0.0
Berechne h[1,1] = heat[1][1] - alpha * (4 * heat[1][1] - heat[0][1] - heat[2][1] - heat[1][0] - heat[1][2])
also h[1][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,2] = heat[1][2] - alpha * (4 * heat[1][2] - heat[0][2] - heat[2][2] - heat[1][1] - heat[1][3])
also h[1][2] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,3] = heat[1][3] - alpha * (4 * heat[1][3] - heat[0][3] - heat[2][3] - heat[1][2] - heat[1][4])
also h[1][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,4], da es sich um ein Randfeld handelt folgt h[1][4]=0.0
Berechne h[2,0], da es sich um ein Randfeld handelt folgt h[2][0]=0.0
Berechne h[2,1] = heat[2][1] - alpha * (4 * heat[2][1] - heat[1][1] - heat[3][1] - heat[2][0] - heat[2][2])
also h[2][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[2,2] = heat[2][2] - alpha * (4 * heat[2][2] - heat[1][2] - heat[3][2] - heat[2][1] - heat[2][3])
also h[2][2] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 100,0 - 0,0 - 0,0) ergibt 10,0
Berechne h[2,3] = heat[2][3] - alpha * (4 * heat[2][3] - heat[1][3] - heat[3][3] - heat[2][2] - heat[2][4])
also h[2][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[2,4], da es sich um ein Randfeld handelt folgt h[2][4]=0.0
Berechne h[3,0], da es sich um ein Randfeld handelt folgt h[3][0]=0.0
Berechne h[3,1] = heat[3][1] - alpha * (4 * heat[3][1] - heat[2][1] - heat[4][1] - heat[3][0] - heat[3][2])
also h[3][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 100,0) ergibt 10,0
Berechne h[3,2] = heat[3][2] - alpha * (4 * heat[3][2] - heat[2][2] - heat[4][2] - heat[3][1] - heat[3][3])
also h[3][2] = 100,0 - 0,1 * (4 * 100,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 60,0
Berechne h[3,3] = heat[3][3] - alpha * (4 * heat[3][3] - heat[2][3] - heat[4][3] - heat[3][2] - heat[3][4])
also h[3][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 100,0 - 0,0) ergibt 10,0
Berechne h[3,4], da es sich um ein Randfeld handelt folgt h[3][4]=0.0
Berechne h[4,0], da es sich um ein Randfeld handelt folgt h[4][0]=0.0
Berechne h[4,1], da es sich um ein Randfeld handelt folgt h[4][1]=0.0
Berechne h[4,2], da es sich um ein Randfeld handelt folgt h[4][2]=0.0
Berechne h[4,3], da es sich um ein Randfeld handelt folgt h[4][3]=0.0
Berechne h[4,4], da es sich um ein Randfeld handelt folgt h[4][4]=0.0

Führe Step 2 aus

Berechne h[0,0], da es sich um ein Randfeld handelt folgt h[0][0]=0.0
Berechne h[0,1], da es sich um ein Randfeld handelt folgt h[0][1]=0.0
Berechne h[0,2], da es sich um ein Randfeld handelt folgt h[0][2]=0.0
Berechne h[0,3], da es sich um ein Randfeld handelt folgt h[0][3]=0.0
Berechne h[0,4], da es sich um ein Randfeld handelt folgt h[0][4]=0.0
Berechne h[1,0], da es sich um ein Randfeld handelt folgt h[1][0]=0.0
Berechne h[1,1] = heat[1][1] - alpha * (4 * heat[1][1] - heat[0][1] - heat[2][1] - heat[1][0] - heat[1][2])
also h[1][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,2] = heat[1][2] - alpha * (4 * heat[1][2] - heat[0][2] - heat[2][2] - heat[1][1] - heat[1][3])
also h[1][2] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 10,0 - 0,0 - 0,0) ergibt 1,0
Berechne h[1,3] = heat[1][3] - alpha * (4 * heat[1][3] - heat[0][3] - heat[2][3] - heat[1][2] - heat[1][4])
also h[1][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 0,0 - 0,0 - 0,0) ergibt 0,0
Berechne h[1,4], da es sich um ein Randfeld handelt folgt h[1][4]=0.0
Berechne h[2,0], da es sich um ein Randfeld handelt folgt h[2][0]=0.0
Berechne h[2,1] = heat[2][1] - alpha * (4 * heat[2][1] - heat[1][1] - heat[3][1] - heat[2][0] - heat[2][2])
also h[2][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 10,0 - 0,0 - 10,0) ergibt 2,0
Berechne h[2,2] = heat[2][2] - alpha * (4 * heat[2][2] - heat[1][2] - heat[3][2] - heat[2][1] - heat[2][3])
also h[2][2] = 10,0 - 0,1 * (4 * 10,0 - 0,0 - 60,0 - 0,0 - 0,0) ergibt 12,0
Berechne h[2,3] = heat[2][3] - alpha * (4 * heat[2][3] - heat[1][3] - heat[3][3] - heat[2][2] - heat[2][4])
also h[2][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 10,0 - 10,0 - 0,0) ergibt 2,0
Berechne h[2,4], da es sich um ein Randfeld handelt folgt h[2][4]=0.0
Berechne h[3,0], da es sich um ein Randfeld handelt folgt h[3][0]=0.0
Berechne h[3,1] = heat[3][1] - alpha * (4 * heat[3][1] - heat[2][1] - heat[4][1] - heat[3][0] - heat[3][2])
also h[3][1] = 10,0 - 0,1 * (4 * 10,0 - 0,0 - 0,0 - 0,0 - 60,0) ergibt 12,0
Berechne h[3,2] = heat[3][2] - alpha * (4 * heat[3][2] - heat[2][2] - heat[4][2] - heat[3][1] - heat[3][3])
also h[3][2] = 60,0 - 0,1 * (4 * 60,0 - 10,0 - 0,0 - 10,0 - 10,0) ergibt 39,0
Berechne h[3,3] = heat[3][3] - alpha * (4 * heat[3][3] - heat[2][3] - heat[4][3] - heat[3][2] - heat[3][4])
also h[3][3] = 10,0 - 0,1 * (4 * 10,0 - 0,0 - 0,0 - 60,0 - 0,0) ergibt 12,0
Berechne h[3,4], da es sich um ein Randfeld handelt folgt h[3][4]=0.0
Berechne h[4,0], da es sich um ein Randfeld handelt folgt h[4][0]=0.0
Berechne h[4,1], da es sich um ein Randfeld handelt folgt h[4][1]=0.0
Berechne h[4,2], da es sich um ein Randfeld handelt folgt h[4][2]=0.0
Berechne h[4,3], da es sich um ein Randfeld handelt folgt h[4][3]=0.0
Berechne h[4,4], da es sich um ein Randfeld handelt folgt h[4][4]=0.0

Führe Step 3 aus

Berechne h[0,0], da es sich um ein Randfeld handelt folgt h[0][0]=0.0
Berechne h[0,1], da es sich um ein Randfeld handelt folgt h[0][1]=0.0
Berechne h[0,2], da es sich um ein Randfeld handelt folgt h[0][2]=0.0
Berechne h[0,3], da es sich um ein Randfeld handelt folgt h[0][3]=0.0
Berechne h[0,4], da es sich um ein Randfeld handelt folgt h[0][4]=0.0
Berechne h[1,0], da es sich um ein Randfeld handelt folgt h[1][0]=0.0
Berechne h[1,1] = heat[1][1] - alpha * (4 * heat[1][1] - heat[0][1] - heat[2][1] - heat[1][0] - heat[1][2])
also h[1][1] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 2,0 - 0,0 - 1,0) ergibt 0,3
Berechne h[1,2] = heat[1][2] - alpha * (4 * heat[1][2] - heat[0][2] - heat[2][2] - heat[1][1] - heat[1][3])
also h[1][2] = 1,0 - 0,1 * (4 * 1,0 - 0,0 - 12,0 - 0,0 - 0,0) ergibt 1,8
Berechne h[1,3] = heat[1][3] - alpha * (4 * heat[1][3] - heat[0][3] - heat[2][3] - heat[1][2] - heat[1][4])
also h[1][3] = 0,0 - 0,1 * (4 * 0,0 - 0,0 - 2,0 - 1,0 - 0,0) ergibt 0,3
Berechne h[1,4], da es sich um ein Randfeld handelt folgt h[1][4]=0.0
Berechne h[2,0], da es sich um ein Randfeld handelt folgt h[2][0]=0.0
Berechne h[2,1] = heat[2][1] - alpha * (4 * heat[2][1] - heat[1][1] - heat[3][1] - heat[2][0] - heat[2][2])
also h[2][1] = 2,0 - 0,1 * (4 * 2,0 - 0,0 - 12,0 - 0,0 - 12,0) ergibt 3,6
Berechne h[2,2] = heat[2][2] - alpha * (4 * heat[2][2] - heat[1][2] - heat[3][2] - heat[2][1] - heat[2][3])
also h[2][2] = 12,0 - 0,1 * (4 * 12,0 - 1,0 - 39,0 - 2,0 - 2,0) ergibt 11,6
Berechne h[2,3] = heat[2][3] - alpha * (4 * heat[2][3] - heat[1][3] - heat[3][3] - heat[2][2] - heat[2][4])
also h[2][3] = 2,0 - 0,1 * (4 * 2,0 - 0,0 - 12,0 - 12,0 - 0,0) ergibt 3,6
Berechne h[2,4], da es sich um ein Randfeld handelt folgt h[2][4]=0.0
Berechne h[3,0], da es sich um ein Randfeld handelt folgt h[3][0]=0.0
Berechne h[3,1] = heat[3][1] - alpha * (4 * heat[3][1] - heat[2][1] - heat[4][1] - heat[3][0] - heat[3][2])
also h[3][1] = 12,0 - 0,1 * (4 * 12,0 - 2,0 - 0,0 - 0,0 - 39,0) ergibt 11,3
Berechne h[3,2] = heat[3][2] - alpha * (4 * heat[3][2] - heat[2][2] - heat[4][2] - heat[3][1] - heat[3][3])
also h[3][2] = 39,0 - 0,1 * (4 * 39,0 - 12,0 - 0,0 - 12,0 - 12,0) ergibt 27,0
Berechne h[3,3] = heat[3][3] - alpha * (4 * heat[3][3] - heat[2][3] - heat[4][3] - heat[3][2] - heat[3][4])
also h[3][3] = 12,0 - 0,1 * (4 * 12,0 - 2,0 - 0,0 - 39,0 - 0,0) ergibt 11,3
Berechne h[3,4], da es sich um ein Randfeld handelt folgt h[3][4]=0.0
Berechne h[4,0], da es sich um ein Randfeld handelt folgt h[4][0]=0.0
Berechne h[4,1], da es sich um ein Randfeld handelt folgt h[4][1]=0.0
Berechne h[4,2], da es sich um ein Randfeld handelt folgt h[4][2]=0.0
Berechne h[4,3], da es sich um ein Randfeld handelt folgt h[4][3]=0.0
Berechne h[4,4], da es sich um ein Randfeld handelt folgt h[4][4]=0.0

Führe Step 4 aus

Berechne h[0,0], da es sich um ein Randfeld handelt folgt h[0][0]=0.0
Berechne h[0,1], da es sich um ein Randfeld handelt folgt h[0][1]=0.0
Berechne h[0,2], da es sich um ein Randfeld handelt folgt h[0][2]=0.0
Berechne h[0,3], da es sich um ein Randfeld handelt folgt h[0][3]=0.0
Berechne h[0,4], da es sich um ein Randfeld handelt folgt h[0][4]=0.0
Berechne h[1,0], da es sich um ein Randfeld handelt folgt h[1][0]=0.0
Berechne h[1,1] = heat[1][1] - alpha * (4 * heat[1][1] - heat[0][1] - heat[2][1] - heat[1][0] - heat[1][2])
also h[1][1] = 0,3 - 0,1 * (4 * 0,3 - 0,0 - 3,6 - 0,0 - 1,8) ergibt 0,7
Berechne h[1,2] = heat[1][2] - alpha * (4 * heat[1][2] - heat[0][2] - heat[2][2] - heat[1][1] - heat[1][3])
also h[1][2] = 1,8 - 0,1 * (4 * 1,8 - 0,0 - 11,6 - 0,3 - 0,3) ergibt 2,3
Berechne h[1,3] = heat[1][3] - alpha * (4 * heat[1][3] - heat[0][3] - heat[2][3] - heat[1][2] - heat[1][4])
also h[1][3] = 0,3 - 0,1 * (4 * 0,3 - 0,0 - 3,6 - 1,8 - 0,0) ergibt 0,7
Berechne h[1,4], da es sich um ein Randfeld handelt folgt h[1][4]=0.0
Berechne h[2,0], da es sich um ein Randfeld handelt folgt h[2][0]=0.0
Berechne h[2,1] = heat[2][1] - alpha * (4 * heat[2][1] - heat[1][1] - heat[3][1] - heat[2][0] - heat[2][2])
also h[2][1] = 3,6 - 0,1 * (4 * 3,6 - 0,3 - 11,3 - 0,0 - 11,6) ergibt 4,5
Berechne h[2,2] = heat[2][2] - alpha * (4 * heat[2][2] - heat[1][2] - heat[3][2] - heat[2][1] - heat[2][3])
also h[2][2] = 11,6 - 0,1 * (4 * 11,6 - 1,8 - 27,0 - 3,6 - 3,6) ergibt 10,6
Berechne h[2,3] = heat[2][3] - alpha * (4 * heat[2][3] - heat[1][3] - heat[3][3] - heat[2][2] - heat[2][4])
also h[2][3] = 3,6 - 0,1 * (4 * 3,6 - 0,3 - 11,3 - 11,6 - 0,0) ergibt 4,5
Berechne h[2,4], da es sich um ein Randfeld handelt folgt h[2][4]=0.0
Berechne h[3,0], da es sich um ein Randfeld handelt folgt h[3][0]=0.0
Berechne h[3,1] = heat[3][1] - alpha * (4 * heat[3][1] - heat[2][1] - heat[4][1] - heat[3][0] - heat[3][2])
also h[3][1] = 11,3 - 0,1 * (4 * 11,3 - 3,6 - 0,0 - 0,0 - 27,0) ergibt 9,8
Berechne h[3,2] = heat[3][2] - alpha * (4 * heat[3][2] - heat[2][2] - heat[4][2] - heat[3][1] - heat[3][3])
also h[3][2] = 27,0 - 0,1 * (4 * 27,0 - 11,6 - 0,0 - 11,3 - 11,3) ergibt 19,6
Berechne h[3,3] = heat[3][3] - alpha * (4 * heat[3][3] - heat[2][3] - heat[4][3] - heat[3][2] - heat[3][4])
also h[3][3] = 11,3 - 0,1 * (4 * 11,3 - 3,6 - 0,0 - 27,0 - 0,0) ergibt 9,8
Berechne h[3,4], da es sich um ein Randfeld handelt folgt h[3][4]=0.0
Berechne h[4,0], da es sich um ein Randfeld handelt folgt h[4][0]=0.0
Berechne h[4,1], da es sich um ein Randfeld handelt folgt h[4][1]=0.0
Berechne h[4,2], da es sich um ein Randfeld handelt folgt h[4][2]=0.0
Berechne h[4,3], da es sich um ein Randfeld handelt folgt h[4][3]=0.0
Berechne h[4,4], da es sich um ein Randfeld handelt folgt h[4][4]=0.0

Führe Step 5 aus

Berechne h[0,0], da es sich um ein Randfeld handelt folgt h[0][0]=0.0
Berechne h[0,1], da es sich um ein Randfeld handelt folgt h[0][1]=0.0
Berechne h[0,2], da es sich um ein Randfeld handelt folgt h[0][2]=0.0
Berechne h[0,3], da es sich um ein Randfeld handelt folgt h[0][3]=0.0
Berechne h[0,4], da es sich um ein Randfeld handelt folgt h[0][4]=0.0
Berechne h[1,0], da es sich um ein Randfeld handelt folgt h[1][0]=0.0
Berechne h[1,1] = heat[1][1] - alpha * (4 * heat[1][1] - heat[0][1] - heat[2][1] - heat[1][0] - heat[1][2])
also h[1][1] = 0,7 - 0,1 * (4 * 0,7 - 0,0 - 4,5 - 0,0 - 2,3) ergibt 1,1
Berechne h[1,2] = heat[1][2] - alpha * (4 * heat[1][2] - heat[0][2] - heat[2][2] - heat[1][1] - heat[1][3])
also h[1][2] = 2,3 - 0,1 * (4 * 2,3 - 0,0 - 10,6 - 0,7 - 0,7) ergibt 2,6
Berechne h[1,3] = heat[1][3] - alpha * (4 * heat[1][3] - heat[0][3] - heat[2][3] - heat[1][2] - heat[1][4])
also h[1][3] = 0,7 - 0,1 * (4 * 0,7 - 0,0 - 4,5 - 2,3 - 0,0) ergibt 1,1
Berechne h[1,4], da es sich um ein Randfeld handelt folgt h[1][4]=0.0
Berechne h[2,0], da es sich um ein Randfeld handelt folgt h[2][0]=0.0
Berechne h[2,1] = heat[2][1] - alpha * (4 * heat[2][1] - heat[1][1] - heat[3][1] - heat[2][0] - heat[2][2])
also h[2][1] = 4,5 - 0,1 * (4 * 4,5 - 0,7 - 9,8 - 0,0 - 10,6) ergibt 4,8
Berechne h[2,2] = heat[2][2] - alpha * (4 * heat[2][2] - heat[1][2] - heat[3][2] - heat[2][1] - heat[2][3])
also h[2][2] = 10,6 - 0,1 * (4 * 10,6 - 2,3 - 19,6 - 4,5 - 4,5) ergibt 9,4
Berechne h[2,3] = heat[2][3] - alpha * (4 * heat[2][3] - heat[1][3] - heat[3][3] - heat[2][2] - heat[2][4])
also h[2][3] = 4,5 - 0,1 * (4 * 4,5 - 0,7 - 9,8 - 10,6 - 0,0) ergibt 4,8
Berechne h[2,4], da es sich um ein Randfeld handelt folgt h[2][4]=0.0
Berechne h[3,0], da es sich um ein Randfeld handelt folgt h[3][0]=0.0
Berechne h[3,1] = heat[3][1] - alpha * (4 * heat[3][1] - heat[2][1] - heat[4][1] - heat[3][0] - heat[3][2])
also h[3][1] = 9,8 - 0,1 * (4 * 9,8 - 4,5 - 0,0 - 0,0 - 19,6) ergibt 8,3
Berechne h[3,2] = heat[3][2] - alpha * (4 * heat[3][2] - heat[2][2] - heat[4][2] - heat[3][1] - heat[3][3])
also h[3][2] = 19,6 - 0,1 * (4 * 19,6 - 10,6 - 0,0 - 9,8 - 9,8) ergibt 14,8
Berechne h[3,3] = heat[3][3] - alpha * (4 * heat[3][3] - heat[2][3] - heat[4][3] - heat[3][2] - heat[3][4])
also h[3][3] = 9,8 - 0,1 * (4 * 9,8 - 4,5 - 0,0 - 19,6 - 0,0) ergibt 8,3
Berechne h[3,4], da es sich um ein Randfeld handelt folgt h[3][4]=0.0
Berechne h[4,0], da es sich um ein Randfeld handelt folgt h[4][0]=0.0
Berechne h[4,1], da es sich um ein Randfeld handelt folgt h[4][1]=0.0
Berechne h[4,2], da es sich um ein Randfeld handelt folgt h[4][2]=0.0
Berechne h[4,3], da es sich um ein Randfeld handelt folgt h[4][3]=0.0
Berechne h[4,4], da es sich um ein Randfeld handelt folgt h[4][4]=0.0

Das Ergebnis lautet:
0,0 0,0 0,0 0,0 0,0
0,0 1,1 4,8 8,3 0,0
0,0 2,6 9,4 14,8 0,0
0,0 1,1 4,8 8,3 0,0
0,0 0,0 0,0 0,0 0,0

Genau wie in der Aufgabenstellung
 

Neue Themen


Oben