This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to solve two coupled equations on the same mesh?

+1 vote

Hello, I am trying to solve a poro-elasticity problem. The equations are the following

$$\int_{\Omega} \nabla \cdot \dot{\mathbf{u}} \ \tilde{p} = \int_{\Omega} \alpha \nabla p \cdot \nabla \tilde{p}$$

$$\int_{\Omega} \mathbf{T} \cdot sym(\mathbf{\tilde{u}}) - p \ \nabla \cdot \mathbf{\tilde{u}}$$

where

$$\mathbf{T} = 2\mu \ sym(\mathbf{u}) + ( \lambda \ tr(\mathbf{u}) - p) \mathbf{I}$$

and I tried to solve the problem in the following way.

I created a

V=VectorFunctionSpace(mesh, "Lagrange",1)
VP=FunctionSpace(mesh,"Lagrange",1)

and used the VP space to solve the pressure equation. That is I wrote something like


u1=Function(V)
p=Function(VP)
problem = LinearVariationalProblem(a,L,u1,bcs=bc)
solver=LinearVariationalSolver(problem)
problemP= LinearVariationalProblem(aP,LP,p,bcs=bcP)
solverP = LinearVariationalSolver(problemP) file = File("displacement.pvd")
fileP = File("pressure.pvd")
while t <= T:
t += dt
h.t = t
solver.solve()
update(u1,u0,v0,a0,beta,gamma,dt)
solverP.solve()
file << u1
fileP << p

Now, the pressure equations has the divergence of the velocity defined on V and when I write the governing equations

F = (rho*dot(a1,w)+inner(sigma(u1,v1),sym(grad(w))))*dx - dot(h,w)*ds
Fp= (alp*inner(grad(p),grad(q))-inner(div(v1),q))*dx - inner(0.0,q)*ds

and run the simulation I get

An Integral without a Domain is now illegal.

and I get the first error from

File "/Applications/FEniCS.app/Contents/Resources/lib/python2.7/site-packages/ufl/measure.py", line 426, in __rmul__

Anyway, what should I do in such cases?

asked Apr 12, 2016 by Pierluigi FEniCS Novice (510 points)

Hi,
to fix your problem (the error message) consider to use

Fp= (alp*inner(grad(p),grad(q))-inner(div(v1),q))*dx - inner(Constant(0.0),q)*ds

instead of

Fp= (alp*inner(grad(p),grad(q))-inner(div(v1),q))*dx - inner(0.0,q)*ds
...