Skip to content
This repository was archived by the owner on Jul 25, 2023. It is now read-only.

Commit f230be4

Browse files
committed
BUG: d should have dx2 term
1 parent 008531e commit f230be4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

day_6/2023/conduction_v3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
for ut in range(0,24,1):
4848

4949
# UT-dependent heating function:
50-
heat = 5.0 * np.sin(ut * np.pi / 24.0)
50+
heat = 50.0 * np.sin(ut * np.pi / 24.0)
5151
# at night, there is still chemistry, which adds heat:
52-
if (heat < 1.0):
53-
heat = 1.0
52+
if (heat < 25.0):
53+
heat = 25.0
5454

5555
# add sources:
5656
l = ((x > 1.0) & (x < 7.5))
57-
d[l] = -heat * (10.0 - x[l])/10.0
57+
d[l] = -heat * (10.0 - x[l])/10.0 * (dx ** 2)
5858

5959
# solve for Temperature:
6060
t = solve_tridiagonal(a, b, c, d)

0 commit comments

Comments
 (0)