- Thank you received: 0
Solving advection equation on domain split in two
- rhebergens
- Topic Author
- Offline
- Junior Member
Less
More
6 years 3 months ago #674
by rhebergens
Solving advection equation on domain split in two was created 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
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:
6 years 3 months ago #676
by joachim
Replied by joachim on topic Solving advection equation on domain split in two
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
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:
- rhebergens
- Topic Author
- Offline
- Junior Member
Less
More
- Thank you received: 0
6 years 3 months ago #684
by rhebergens
Replied by rhebergens on topic Solving advection equation on domain split in two
Hi Joachim,
Thanks for the suggestion. HDG indeed does the job. Attached the code using HDG.
Thanks,
Sander
Thanks for the suggestion. HDG indeed does the job. Attached the code using HDG.
Thanks,
Sander
Attachments:
Time to create page: 0.095 seconds