← Back to team overview

fenics team mailing list archive

Fenics for 3D Absorption/Diffusion Problems

 

Dear All,
I am trying to migrate from Comsol to Fenics.
Now, one problem I need to be able to tackle with Fenics (a problem
which is conceptually simple) is the following.
Consider (in 3D) a large box (computational domain). To fix the ideas,
let us say that the box has size L=30 and it stretches from -15 to 15
along x, y and z. Inside the box I have what in aerosol science is
called an aggregate i.e. static configuration of hard spheres, where
every sphere is in touch with at least another sphere.
To fix the ideas, consider, as a minimal example two spheres having both
R=1 (in some units) and whose centres are in positions (-1,0,0) and
(1,0,0).
Now, the problem I would like to solve is a diffusion problem (we can
set D=1 if we want)

D\nabla^2\rho=0 with boundary conditions 
\rho=1 on the sides of the box
and \rho=0 on the aggregate surface.
No computations need to be carried out for the inside of the spheres.

I need to be able to calculate then fairly standard quantities like the
concentration \rho(x,y,z) inside the box and the diffusive flux
orthogonal to the aggregate surface.
I know that this specific example, being in the end of the day a linear
chain, is axisymmetric and hence 2D, but the more general cases I have
in mind (to be tackled when and if I get started with Fenics) are not.
Can anyone point me in the right direction, maybe with a minimal script
I can then study and fine-tune according to my needs?
It should not be tremendously complicated for someone who is experienced
in running much more complicated simulations with Fenics.
Any help is appreciated.
Cheers

Lorenzo




Follow ups