Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Boundary integrals in tutorial 2.5: Mixed formulation for second order equations

More
4 years 7 months ago #1853 by anandes
Hello,

I am trying to go through the NGSolve example 2.5 on the mixed formulation for the diffusion equation. The primal problem has the integral on the Neumann boundary defined as:
g*vp * ds.

Where is "ds" active? Is "ds" automatically defined on the complement of the essential boundary? For the primal problem the essential boundary is set by the flag: dirichlet="bottom". So would "ds" be active on the
"right|top|left" boundaries?

Similarly for the mixed formulation, the condition u=u_D is to be applied on the bottom edge, but this is done as part of the variational form. The equivalent NGSolve implementation is given in the example as:
ud*(tau.Trace()*normal)*ds.
For the mixed formulation, the Dirichlet boundary on the H(div) space is given as: dirichlet="right|top|left". So is "ds" automatically defined on the complement of this, which is the bottom edge?

Thank you,
Anand
More
4 years 7 months ago #1854 by Guosheng Fu
I think the ds operator loops over all boudnary edges for the bilinear form. But since you have a finite element space that is Dirichlet on bottom boundary, the test function on boundary edges is always zero. There will be no difference between ds and ds("top|left|right") for the primal problem.
Similar thing happens to the Mixed form.
If instead of Dirichlet on bottom boundary, you have Robin BC, then, you really need to do ds("top|left|right") and ds("bottom") separately.
More
4 years 7 months ago #1865 by anandes
Hi Guosheng,

Thanks for clarifying how the ds operator is implemented in NGSolve and also for your note on Robin BCs.

Thank you,
Anand
Time to create page: 0.102 seconds