Closed ranocha closed 4 years ago
In GitLab by @andrewwinters5000 on Jun 4, 2020, 11:47
The errors for Alfvén seem decent, although e-10
is not as good as I would think...
The OTV and rotor do not seem correct. My guess, because the "badness" is in the magnetic fields and total energy (total energy is influenced by magnetic and psi energies), is that either:
In GitLab by @ranocha on Jun 4, 2020, 13:29
And you're using a (Powell-like) source term, aren't you? Won't these influence conservation?
In GitLab by @andrewwinters5000 on Jun 4, 2020, 14:00
Jaha! I forgot about that. The Powell term is included as part of the divergence cleaning. This will have an influence on the conservation because it is, inherently, a non-conservative term
In GitLab by @sloede on Jun 4, 2020, 14:19
OK, so this is a non-issue then? Feel free to close @andrewwinters5000 if you think all is well in the land of MHD!
In GitLab by @ranocha on Jun 4, 2020, 14:22
all is well in the land of MHD
That's definitely something I wouldn't sign :wink:
In GitLab by @andrewwinters5000 on Jun 4, 2020, 14:35
@sloede I can test this to make sure the Powell terms are spoiling the conservation. Stay tuned...
In GitLab by @andrewwinters5000 on Jun 4, 2020, 14:57
Yes, it is the Powell term. I deactivated the non-conservative terms and the conservation errors are double precision.
Here is the final output for Alfvén wave:
Here is the final output for OTV:
I did not rerun the rotor because I expect it is the same.
In GitLab by @andrewwinters5000 on Jun 4, 2020, 14:57
closed
In GitLab by @sloede on Jun 4, 2020, 11:27
Using !61, it is now possible to calculate the conservation error for all conservative variables. These are the results I get for three of the current MHD tests:
examples/parameters_alfven_wave.toml
Here, there is a maximum conservation error of
O(1e-10)
for momentum.examples/parameters_rotor.toml
Here, there is a maximum conservation error of
O(1e-2)
for the energy. Also, the simulation crashes after 30 time steps, so this is the result for 20 time steps.examples/parameters_orszag_tang.toml
Here, there is again a maximum conservation error of
O(1e-3)
for the energy (this time recorded after 100 time steps, since the simulation is too darn long).I don't know if these conservation errors are expected or reasonable, it's just something I observed when testing the new
conservation_error
analysis quantity and I wondered if this is cool. What do you think, @andrewwinters5000 or @gregorgassner?