Hello
I want to solve the wave equation in the time frequency domain. Domain is a rectangle and the wave is propagating from a sourcepoint (with value equal to 1 and located on the left edge of the domain). Here is the equation I have to solve:
The frequency domain is : [0,10] and the frequency increment is 1. When I run my code I get this error:
Traceback (most recent call last):
File "/home/jafar/m.py", line 48, in
A, b = assemble_system(a, L, bc)
*** Error: Unable to creating dolfin.Form.
*** Reason: Expecting subdomain data for a single domain only..
*** Where: This error was encountered inside form.py.
Here is a part of my code:
# constants
mu=E/(2*(1+Poisson))
lambd=E*Poisson/((1+Poisson)*(1-2*Poisson))
dens=2700
V=VectorFunctionSpace(mesh1, 'CG', 1)
# frequency variables
d_omega = 1; step = 0; omega = 10
# Variational problem
F = mu*inner(grad(u), grad(v))*dx+(lambd+mu)*div(u)*div(v)*dx + dens*d_omega*d_omega*inner(u,v)*dx
a = rhs(F)
L = lhs(F)
#Boundary condition
W_const = Constant((0.0, 0.0))
bc = DirichletBC(V, W_const, "on_boundary")
A, b = assemble_system(a, L, bc)
u=Function(V)
#Solve
while d_omega <= omega:
A, b = assemble_system(a, L, bc)
delta = PointSource(V.sub(0), Point(0., 1.5),1)
delta.apply(b)
solve(A, u.vector(), b)
step += d_omega
plot(u, interactive=False)
This is a frequency-domain problem. I think the error might be related to this part of the variational problem (I am not sure):
dens*d_omega*d_omega*inner(u,v)*dx
Could you please help me fix this error?
Thanks