-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDG for advection-diffusion on the sphere #34
base: master
Are you sure you want to change the base?
Conversation
GridapHybrid and related version of Gridap)
GridapHybrid versions
the assembly terms
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
=======================================
Coverage 0.00% 0.00%
=======================================
Files 18 19 +1
Lines 1246 1346 +100
=======================================
- Misses 1246 1346 +100
Continue to review full report at Codecov.
|
Hey @amartinhuertas , I'm having some basic trouble with the HDG advection on the sphere. I am getting the error:
here: |
Can you please separate the terms in the bilinear form one by one as in e.g., https://github.com/gridap/GridapHybrid.jl/blob/main/test/DarcyHDGTests.jl#L71 |
Did you try with D=3? |
...I tried |
can you attach a file with the whole backtrace? I would like to understand the cause behind the inability to perform the dot product operator. |
Ok, digging into the error log, I saw this line of code:
There we are trying to set a 3-components field vector ( What is the error that you get with D=3? |
Well spotted! Here is the D=3 log file: |
ok. Use D=3 ONLY for this line, i.e.,
The rest untouched. |
...Same error as the original, as far as I can see: :( |
...I just got this error: There is this: |
the HDG advection assembly
…:gridapapps/GridapGeosciences.jl into hdg_adv Conflicts: Project.toml
not crash). The current results it is generating are wrong.
For the records, this was addressed in 1586cf7 |
Hi @davelee2804, please read the below carefully, let me know if you have questions, and please answer my questions (no hurries). Current status of this development:
Important remarks:
Questions:
|
Thank you @amartinhuertas ! I had not appreciated the subtlety that in for example Kang et al. eqns (14) and (15) the first skeleton integral is over
as you say. I am now implementing a convergence study for the solid body rotation test (second order in space + time), to verify that everything is OK. A few days ago I got some nonsensical results with order 4, so I will also double check that as well... |
Exactly. You can write hybridizable methods either by edges or grouping together edges into cell boundaries \partial K, for each K. The second approach is the one required to implement static condensation locally at each cell, towards assembly of the global problem on the skeleton, which is the main motivation for hybridizable methods.
Ok. Let us see. |
Hey @amartinhuertas , just a heads up that the convergence is sub-optimal. There is too much dispersion, perhaps as a result of how I have formulated the time stepping. I'll take a closer look at this... |
I would try to first solve a steady advection problem with manufactured PDE solution. This way we eliminate noise related to time discretization. |
also removing the (n.n) terms. results greatly improved
Thanks @amartinhuertas , yes great point, this is the correct approach, I will do this. Just a heads up, I changed the time integration to a stiffly-stable second order implicit runge-kutta scheme, and now the solid body rotation test is converging at the correct rate (second order convergence for second order in space+time discretisation) after a single revolution round the sphere (at least for the low resolutions that I have checked). The entropy conservation error is also converging quadratically, so that is also a good sign... |
Hi @amartinhuertas , I've added a convergence test for the solid body rotation configuration of the HDG advection solver. I'm wondering if now is a good time to do a code review and merge this branch, before starting work on the linear wave equation with jump penalisation on the pressure gradient tangent component - what do you think? |
...SBRAdvectionHDG tests are failing in github-ci (but passing on my laptop) : Should I also commit the Manifest.toml? |
Yes, because we are pointing to versions of some of the packages which are not yet registered in the Julia registries. |
Also, please, pull from |
I see in the attached plot that there is a mild degradation in slope for the highest resolution that you tested. Have you tried even higher resolutions to be 100% sure that the convergence is actually quadratic? |
Hi @amartinhuertas , higher resolutions are to the left on the x-axis, so the convergence rate is actually increasing as resolution increases. Does that make sense? Have I missed your point somehow? |
...Ie: convergence rate from dx=0.12 to 0.06 is higher than from dx=0.24 to 0.12. Does that make sense? |
Ok, you are right, I was confused. The convergence curve looks like a piece-wise linear function with 2 pieces, where the right piece seems to be parallel to the theoretical convergence, and the left piece seems to bend down a little bit, with an slope which is no longer parallel to the theoretical convergence. But, as you say, bending down means even faster convergence, and not the opposite. (Here it was my confusion). |
Yes, it might be a good time to do this. The only thing is that I have some other code reviews on the queue, I wont be able to do this immediately. Apart from this code review, we need:
|
No problem. Note that for the SBRAdvectionHDGTests file that I committed, convergence between the lowest two resolutions is sub-optimal, but quadratic convergence is achieved between the next two. |
No problem @amartinhuertas , there is no rush from me. Please let me know if there is anything I can do to help with any of the issues you mention. We are using an isoparametric mapping right now, is that correct? |
We are using biquadratic elements for the geometry, and bilinear elements for the unknown. I think that the term "isoparametric" is used to refer to those scenarios in which the order of the polynomial to approximate the geometry matches the order of the polynomial to approximate the unknown. |
Aaah, yes, that is what the |
We have been using an analytical mapping in all the results we obtained with GridapGeosciences + compatible FEs so far. If we can represent the geometry exactly, better to stick to it, instead of approximating it, so that we eliminate any noise caused by geometrical errors (leaving integration errors apart). I remember e.g., that, with a bilinear approximation of the cubed sphere we were not able to obtained the theoretical convergence rates of RT+DG FEs for Darcy on the sphere. |
OK, fair enough. To my mind supporting iso or super parametric mappings (as you are already doing) is better, as if we ever want to add mountains when we will have to ditch the analytic mapping anyway, so ensuring everything works for a numerical mapping makes it easier to transition to such a case if we ever want to. But I take your point, analytic is nicer... |
Yes, sure, better to have both. |
Super WIP. Opening PR in draft mode ... just for discussion purposes