Hi there,
I would like to understand if my math notation is correct for the problem I am tring to solve:
I have a steady heat source q (W/2 π) at the origin and a circular no-flow boundary at distance R from the origin. The material in the domain has a thermal conductivity K (W/mK) and a volumetric heat capacity C (J/m3/K). I want to model the temperature varying over time within the domain.When I took integration by parts of poissons equation, I set the boundary integral to zero, because of the no flow condition at R.
Therefore, I presume i’m looking to find the solution u®, in the variational formulation:
Does this make sense? I’m not sure I have set boundary conditions correctly. I want neumman boundaries but I don’t think I’m actually dictating anything here. When I try to solve for initial conditions I make the following formulation:
Any insight you could provide would be very helpful. So far in my code I have, just for a single time step:
from dolfin import *
T = 300 # final time
num_steps = 60 # number of time steps
dt = T / num_steps
K = 2 #w/mk
C = 2.5 # J/m3/k
Q =1.27/6.28
flow per metre is
mesh = IntervalMesh(10,0,0.2)
V = FunctionSpace(mesh, ‘P’, 1)
u = TrialFunction(V)
v = TestFunction(V)
r = Expression(‘x[0]’, degree=1)
u_n = Expression(‘0’, degree=1)
a = Cinner(u,v)rdx- dtK*(inner(grad(u),grad(v)))rdx
L = dtConstant(0)vrdx + inner(u_n,v)rdx
A, b = assemble_system(a, L)
delta = PointSource(V, Point(0.), Q)
delta.apply(b)
u = Function(V)
solve(A, u.vector(), b)
the values of u are much higher than I was expecting - any help would be appreciated.
Many thanks
C