Anisotropic diffusion implementation

27 views
Skip to first unread message

Corbin Foucart

unread,
Dec 17, 2020, 10:56:07 PM12/17/20
to deal.II User Group
I have a problem with direction-dependent diffusion (that is, the diffusivity \nu depends on the derivative direction but not spatial location) such that the horizontal diffusivity and vertical diffusivity are different, leading to a Laplacian as follows:


I am discretizing the problem with a mixed method, which defines the auxiliary variable L = ∇u such that


So in my weak form, I end up with terms like the following:
(please excuse the abuse of index notation with repeated j three times). phi_ij here refers to each scalar basis function in the tensor-valued finite element space.

It seems using the deal.ii FEValuesExtractors, I can access the divergence of each tensor-valued basis function, but I need to multiply each term in the divergence with the appropriate value of \nu by component.

I suppose I could ask for the gradient of each phi and do the sum manually,but I was wondering if there's a way to do it directly. Is there a standard way of doing this in deal.ii?

Any pointers would be appreciated!

Corbin Foucart

unread,
Dec 17, 2020, 10:57:54 PM12/17/20
to dea...@googlegroups.com
It seems my images were not rendered -- here they are in order as attachments.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/ptfmuBKUoiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/65594873-33d7-44c2-834b-ba398fd9fb1bn%40googlegroups.com.
Screenshot from 2020-12-17 22-38-31.png
Screenshot from 2020-12-17 22-46-52.png
Screenshot from 2020-12-17 22-48-33.png

Wolfgang Bangerth

unread,
Dec 18, 2020, 6:54:57 PM12/18/20
to dea...@googlegroups.com
On 12/17/20 8:56 PM, Corbin Foucart wrote:
> I have a problem with direction-dependent diffusion (that is, the diffusivity
> \nu depends on the derivative direction but not spatial location) such that
> the horizontal diffusivity and vertical diffusivity are different, leading to
> a Laplacian as follows:
>
>
> I am discretizing the problem with a mixed method, which defines the auxiliary
> variable L = ∇u such that
>
>
> So in my weak form, I end up with terms like the following:
> (please excuse the abuse of index notation with repeated j three times).
> phi_ij here refers to each scalar basis function in the tensor-valued finite
> element space.
>
> It seems using the deal.ii FEValuesExtractors, I can access the divergence of
> each tensor-valued basis function, but I need to multiply each term in the
> divergence with the appropriate value of \nu by component.
>
> I suppose I could ask for the gradient of each phi and do the sum manually,but
> I was wondering if there's a way to do it directly. Is there a standard way of
> doing this in deal.ii?

You (hopefully) don't ever need to take the divergence of nu*(grad u) but
instead will want to integrate by parts. This is going to give you the
bilinear form
(nabla phi_i, nu nabla phi_j)
When you assemble this, you typically do
fe_values.shape_grad(i,q) * fe_values.shape_grad(j,q)
where both objects are of type Tensor<1,dim> (i.e., vectors). In your case,
you want to do
SymmetricTensor<2,dim> nu; // fill with whatever values you need
and then do
fe_values.shape_grad(i,q) * nu * fe_values.shape_grad(j,q)

step-20 does something similar (though for a different bilinear form).

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages