Skip to content

Commit

Permalink
fix transient
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeGehring committed Oct 18, 2023
1 parent ab6f3e1 commit c3b234e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions docs/julia/heater_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using Femwell.Maxwell.Electrostatic
using Femwell.Thermal

dir = @__DIR__
read(`python $dir/heater_3d_mesh.py`)
#read(`python $dir/heater_3d_mesh.py`)


model = GmshDiscreteModel("mesh.msh")
Expand Down Expand Up @@ -143,7 +143,11 @@ GridapPETSc.with(args = split(options)) do

Ω_w = Triangulation(model, tags = "core")
dΩ_w = Measure(Ω_w, 1)
sums = [(t, ((u)dΩ_w)) for (u, t) in uₕₜ]
lines(sums)
sums = [(t, ((u)dΩ_w) / ((1)dΩ_w)) for (u, t) in uₕₜ]

figure = Figure()
ax = Axis(figure[1, 1], ylabel = "Temperature / K", xlabel = "time / ms")

t, s = getindex.(sums, 1), getindex.(sums, 2)
lines!(ax, t * 1e3, s)
end
4 changes: 2 additions & 2 deletions src/Thermal/Thermal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ function calculate_temperature_transient(
b₀(t, v) = (power_density(t) * v)dΩ
op_C = TransientConstantMatrixFEOperator(m₀, a₀, b₀, U, V)
else
b(v) = (power_density * v)dΩ
op_C = TransientConstantFEOperator(m₀, a₀, b, U, V)
b(v) = (power_density * v)dΩ
op_C = TransientConstantFEOperator(m₀, a₀, b, U, V)
end

θ = 0.5
Expand Down

0 comments on commit c3b234e

Please sign in to comment.