Plane concentration with z-Diffusionflux

Hello,

I want to calculate a 2D Problem for a reaction-diffusion equation:

grafik
with the two concentrations c_f and c_b, the Diffusioncoefficient D, two rate constants lambda and mu.

I would like to implement something in analogy to plane-strain/stress but for plane concentration, so that I still have a Diffusionflux in the z-axis but my concentrations are only diffrent from zero in the xy-plane.
For my problem the Flux in the z-axis would also be sufficient because the ones in the x and y plane are much smaller in comparrison.

Can you help me/explain me how I can implement this in fenics?
Here are the 2 equations in fenics format:

> Diff_eqn = dc_f*(c_f-c0_f)/dt *dx + D*inner(nabla_grad(c_f),nabla_grad(dc_f))*dx +\
>            phi*dc_f*(c_b-c0_b)/dt *dx   
> Reac_egn = dc_b*(c_b-c0_b)/dt *dx - dc_b*lam*c_f*dx + dc_b*mu*c_b*dx

Thanks in advance!
Martin

Here are the 2 equations in fenics format

The formulation looks okay (although, depending on the reaction–diffusion Damköhler number, the system might warrant some form of stabilization).

I still have a Diffusionflux in the z-axis but my concentrations are only diffrent from zero in the xy-plane.

It’s unclear to me what you mean here. If D is a scalar and c_\text{f} only varies with respect to x and y, then \partial c_\text{f}/\partial z = 0, so the z-component of diffusive flux will be zero. (Even if there were a constant flux in the z-direction, its contribution to the flux divergence would be zero.)

For my problem the Flux in the z-axis would also be sufficient because the ones in the x and y plane are much smaller in comparrison.

In light of the previous note, making the further approximations D\partial c_\text{f}/\partial x\approx 0 and D\partial c_\text{f}/\partial y\approx 0 (i.e., diffusive fluxes in the x- and y-directions are negligible) would leave no spatial derivatives in the formulation, so concentrations at different spatial points would evolve over time independently of one another.

Thanks for your reply!

The formulation looks okay (although, depending on the reaction–diffusion Damköhler number , the system might warrant some form of stabilization).

Thanks, I will look into it!

It’s unclear to me what you mean here. If D is a scalar and cf only varies with respect to x and y , then ∂cf/∂z=0 , so the z -component of diffusive flux will be zero. (Even if there were a constant flux in the z -direction, its contribution to the flux divergence would be zero.)

Well I meant something in analogy to planar strain/stress. For planar stress e.g. there is still a z-component of the strain, and because of that the formula for the calculation of the stress is modified like it is done here:
https://comet-fenics.readthedocs.io/en/latest/demo/elasticity/2D_elasticity.py.html
I was wondering if this is also possible to do this with a flux-part of an equation:
image

image

Or maybe there is also another way to do it. Because I have the assumption, that diffusion and the transport of new concentration will only occur in the axis perpendicular to my mesh. But I am not sure how I can implement a boundary condition in an axis, that is not there in my mesh.
In the plane of my mesh I would then like to evaluate the concentrations.

Could I solve the Diffusionequation like it is done here: https://fenicsproject.org/qa/5859/can-fenics-solve-a-1d-pde-as-the-boundary-of-a-2d-pde/ but then not as a boundary on the (existing) y-boundary but the (nonexisting) z-boundary. And then use the equation in e.g. a staggered scheme to solve my reaction-equation?