-
Notifications
You must be signed in to change notification settings - Fork 39
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
Addition of sw1.dat values to constBg #999
Comments
This is, no doubt, confusing behaviour. Especially when it comes to time-varying inflow. |
My opinion (as of the new user), is that a comment inside of sw1.dat with an explanation of where those values actually go - will be enough |
Ah, that's a nice idea actually... since realistically, everybody just takes an existing sw1.dat and modifies it when setting up a new run. But then we should make sure that we actually put those comments into all of them, systematically. |
(In the same step, we can also add an explanatory header that actually, once and for all, documents which number means what. I think I have had to look up their meaning from the source code half a dozen of times in the last years...) |
Template-B values will be set from the last Maxwellian inflow population that gets templated: vlasiator/sysboundary/setmaxwellian.cpp Line 265 in 62ac639
So this is a bit... risky, when we have multiple populations. If we want to stick to the same format, I think it would be better to have IMF defined in its own file instead... but that'd be an extra file to keep track of, which is a bit inelegant (... but better than competing files). |
Yes exactly, it was a bit difficult to clarify the meanings of zeros. |
Maybe the logfile should say what the effective IMF (and solar wind) is at the start of the simulation. That way it would be easy to check when starting that the conditions are right. |
Effective IMF is different for every cell if there's a dipole for example. So not very practical. But a (better) explanation is certainly feasible. The help text at the moment says:
so feel free to send a PR with an amended text. The code lines are here. Something like "the magnetic field components are added to possibly existing background field components, this is not the resulting total field" I guess would do? Feel free to amend from your first-time user perspective! :) I think the first line of a solar wind dat file can be a comment line starting with #, indeed it was included in the KH sample https://github.com/fmihpc/vlasiator/blob/dev/samples/KHB/mxm.dat, so you could also include that line in every dat file you find in the repo. |
I think it is fair for a user to expect the dipole to be shielded in the upstream, so "effective IMF" does make sense (until we start introducing SW turbulence or somesuch). |
The most intriguing part of it is that sw1.dat should keep some number while some of them - not (if I understood correctly): |
This tells the code that at this time, the moments as well as the perturbed magnetic field component in the boundary cells should be these values requested by the user. And the problem at hand now is to make it clear to the user that the Bx, By, Bz listed here are added on top of the background field that is set for the whole box elsewhere. (And it gets a bit more complex with the dipole type 4 which transitions from the dipole to the IMF set in the |
It would also be possible that magnetospheric project runs would take the input IMF value and instead of placing it in BGB. place it in perB. That would make BGB a pure dipole field (or dipole + mirror dipole). Still, this would also be a breaking change, but would bring magnetospheric runs to be in line with all other projects. |
... and ceterum censeo, IMF should not anyway be given by some one-of-n-populations inflow file. |
Modification of sw1.dat file might cause issue. Namely, magnetic field from the sw1.dat will be added on top the constBg creating the artificial discontinuity coming from the inflow boundary.
The text was updated successfully, but these errors were encountered: