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.

Solving advection equation on domain split in two

More
5 years 8 months ago #674 by rhebergens
Hello,

I am trying to solve the advection equation (with advective velocity b=(0,-1)) on a domain that has been split in two subdomains. To split the domain, I'm using the code previously made available by Guosheng, see:

ngsolve.org/forum/ngspy-forum/114-interface-integrals#491

What I would like to do, is solve the advection equation on the whole domain. As initial test case I use as initial condition that u=1 and the inflow condition is 1 so that the solution must be 1 for the whole simulation. This is not happening. Instead, on half the domain the solution is equal to 1 and on the other half the solution eventually tends to u=0.5. I think this has to do with the call to u.Other() on the interface between the two subdomains. I attach my code. Do you have any suggestions how to fix this issue?

Thanks!
Sander
Attachments:
More
5 years 8 months ago #676 by joachim
Hi Sander,

for the explicit part it is working like this:

If there is a neighbouring volume element, the .Other refers to that. Thus, internal interfaces are ignored. You can use a GridFunction from a FacetFESpace to add source terms on internal edges (see attached file).

for the implicit part - I don't know. Use HDG !!!

best, Joachim
Attachments:
More
5 years 8 months ago #684 by rhebergens
Hi Joachim,

Thanks for the suggestion. HDG indeed does the job. Attached the code using HDG.

Thanks,
Sander
Time to create page: 0.152 seconds