# Plot of transient heat conduction

**URL:** <https://discourse.julialang.org/t/plot-of-transient-heat-conduction/81860>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [May 29, 2022, 10:40am UTC](https://discourse.julialang.org/t/plot-of-transient-heat-conduction/81860 "2022-05-29T10:40:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [May 29, 2022, 10:40am UTC](https://discourse.julialang.org/t/plot-of-transient-heat-conduction/81860/1 "2022-05-29T10:40:29Z")

</div>

![Screenshot from 2022-05-28 21-30-26](https://global.discourse-cdn.com/julialang/original/3X/e/7/e7bc2c6a7eda94fb00f569877441d436dc75b319.png)

```julia
using Plots
Δt=0.0001;Δz=0.0001; m=100; l=100
t=zeros(l);z=zeros(l);θ=zeros(l,l)
z[1]=0;z[l]=1;θ[1,l]=0;θ[l,1]=1; θ[:,end]=θ[:,end-1]
p=plot();
for i in 2:l-1 ,n in 2:l-1
    z[i]=i*Δz
	f=1/(z[i]-1)
	θ[n,i]=round(θ[n+1,i]*(1+2*Δt/((Δz)^2)-f*m*Δt) + θ[n+1,i-1]*(((Δt*f)/2Δz)-(Δt/(Δz)^2)) -θ[n+1,i-1]*(((Δt*f)/2Δz)+(Δt/(Δz)^2)), digits=4)
	plot(θ[50,:] ,seriestype=:scatter)
	#print(f)
end
current()

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/e/cec3779301acde1eb451a3e5e5cfae687c6b8959.png)

> My plot is not as smooth as it should be. it should look like bell shape. plot is also changing on running code again.

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [May 31, 2022, 2:10am UTC](https://discourse.julialang.org/t/plot-of-transient-heat-conduction/81860/2 "2022-05-31T02:10:38Z")

</div>

Please help me. i am stuck and unable to proceed. 😩 😫 😫 🤯 🤯 😿

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [June 1, 2022, 8:45pm UTC](https://discourse.julialang.org/t/plot-of-transient-heat-conduction/81860/4 "2022-06-01T20:45:00Z")

</div>

Hi Raman, you have marked this post as a visualization issue, but the real problem seems to be how to code the PDE equations as in the course exercise posted. Plotting won’t fix the equations.
