# How to express and solve Darcy's law?

Hi everyone,

I’m trying to solve a rather simple expression:

where alpha, kappa and viscosity are constants. The domain is over a cylinder. I know the pressure within the inner lumen and at the outer lumen. I’ve expressed the weak form of the equation (1) as:
`F = u*v*dx + ((poro*permeability)/viscosity)*v*grad(p)*dx`
My questions are:

1. How do I express my boundary conditions? Since I only know the pressure and not the velocity

2. Currently, I’ve worked out an expression for Pressure assuming a linear distribution as follows:

pressure = Expression("((P_lumen - P_adv)/vessel_thickness)*pow((pow(x[0],2) + pow(x[1],2)),0.5)", degree=1, P_lumen=p_inner_lumen,
p = interpolate(pressure,V)

However, I’m not sure if I’m supposed to assume this or treat it as another variable to be solved?

3. How do I implement the 2nd equation? I’ve been trying to follow this but since my form does not have a temporal domain I find it rather confusing.

Hi,

You can follow the tutorial : https://fenicsproject.org/docs/dolfin/1.4.0/python/demo/documented/mixed-poisson/python/documentation.html

I can post a full code of mine if needed (for the boundaries conditions on the pressure and/or on the Darcy velocity).

AMM

Hi,

Thanks! Managed to solve it with your help

You’ve linked to an old old version. Latest demo is https://fenicsproject.org/docs/dolfin/2019.1.0/python/demos/mixed-poisson/demo_mixed-poisson.py.html,
or https://fenicsproject.org/docs/dolfin/latest/python/demos/mixed-poisson/demo_mixed-poisson.py.html