ArityMismatch | Acoustic-Elastic interaction problem

Hi Luc

"dS" … over the interior boundaries and "ds" for the exterior ones. …dS(1) for Γs and ds(0) for ∂B

yes from my (limited) experience that always works as expected

I think you have a mistake in the way you define Γ_s , don’t you mean this?

class ObstacleEdge(SubDomain):
    def inside(self, x, on_boundary):
        return between(x[1], (-0.75, 0.75)) and between(x[0], (0.5-eps, 0.5+eps)) or between(x[1], (-0.75, 0.75)) and between(x[0], (0.6-eps, 0.6+eps))     or between(x[1], (-0.75-eps, -0.75+eps)) and between(x[0], (0.5-eps, 0.6+eps)) or between(x[1], (0.75-eps, 0.75+eps)) and between(x[0], (0.5-eps, 0.6+eps))
obstacleEdge = ObstacleEdge()
interface = MeshFunction("size_t", mesh, mesh.topology().dim()-1, 0)
interface.set_all(0)
obstacleEdge.mark(interface, 1)

dS = Measure('dS', domain=mesh, subdomain_data=interface)

For info I got your code to run in “normal” fenics by using the above change to the boundary and a.ident_zeros() and adding some (‘+’) and (‘-’) in the parts of the linear form which involved dS.

This is how I use a.ident_zeros(), I have successfully used this before on a similar FSI problem but I would wait for other advice before jumping into this approach - I am just a beginner.

            A=assemble(a, keep_diagonal=True)
            b=assemble(L)
            for bc in bcs: bc.apply(A, b)
            A.ident_zeros()
            s = Function(W)
            solve(A, s.vector(), b)

Is this this the sort of distribution you expect from the code? I don’t understand how you have coupled the two domains in your weak form so I don’t know what to expect. - If you have time it would help me if you could explain how your weak form works at the interface.

test1

regards

Thomas

2 Likes