Skip to content
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

higher order magnetic refinement satisfaying divB #794

Open
nicolasaunai opened this issue Dec 14, 2023 · 1 comment
Open

higher order magnetic refinement satisfaying divB #794

nicolasaunai opened this issue Dec 14, 2023 · 1 comment
Assignees
Milestone

Comments

@nicolasaunai
Copy link
Member

This is the magnetic field Bx we get at t=0 after initializing a harris tanh() with 3 levels

image

The current is not pretty but consistently 0 where Bx has steps.

image

This results from the new magnetic field refinement introduced in #743 where the magnetic field on fine faces take the same value as the one on the shared coarse cell, for flux conservation.

This obviously results in steps that become very visible when there is a steep gradient and a very coarse L0 resolution.

At alter times, these spurious profiles will relax as they become self-consistently updated by faraday in domain.
And the profile becomes more normal, as we can see here at t=0.1 (10 steps).

image

This should be improved.
Two ways:

1- we may be able to initialize the magnetic field from user functions even on refined levels, rather than relying on the refinement.

but 1/ will only solve the issue at init time. If a L1 patch is created during runtime in a pristine L0 region where there is a steep variation of B and coarse L0 mesh, L1 values on the new patch will get initialized by refinement and the same effect will happen for some steps.

2/ therefore, I think we should think of a higher order refinement method, the one we have is order 0 (duplicate face values), order 1 should be better.

@nicolasaunai
Copy link
Member Author

reproducer script

python3 harris.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Do me  👋
Development

No branches or pull requests

2 participants