richard-evans / vampire

Atomistic simulator for magnetic materials
GNU General Public License v2.0
124 stars 94 forks source link

Removing, moving and adding some units to units.cpp #40

Closed milton-persson closed 4 years ago

milton-persson commented 5 years ago

The Oerstedt is a unit of magnetisation or "auxiliary field", while the Gauss is a unit of field. 1 Oe = 79.57747 A/m 1 G = 1E-4 T

Removed Erg/Oe from the spin moment units. Replaced Oerstedt with Gauss in the field units. Added Oerstedt to the magnetisation units.

richard-evans commented 5 years ago

I am sorry but I can't accept these changes. I agree that Tesla and Oersted are physically incompatible quantities, but the point of these units is to consider the free applied field, ie B = mu0 H generated in a VSM or similar. Common units for this quantity in the literature are Oe and Tesla, where for free space 1Oe = 1e-4 T ( https://physics.stackexchange.com/questions/269410/what-is-the-relationship-between-the-magnetic-units-oersted-and-tesla ). The point is not to confuse the casual user. In addition conversion to volumetric quantities is complicated, since the volume of the simulation is a poorly defined quantity. These units are here for future reference in case we implement that. Finally, we are sticking to SI units, and adding Gauss is not a sensible thing to perpetuate. It may be sensible to move A/m to a unit of field however, though this is less common in the literature. By the way this code actually needs refactoring - its clunky to add new units. Finally, please make sure all pull requests are made against the develop branch, and not master.

milton-persson commented 5 years ago

Ok, thanks for your reply!

On Wed, 25 Sep 2019 at 21:32, Dr. Richard Evans notifications@github.com wrote:

I am sorry but I can't accept these changes. I agree that Tesla and Oersted are physically incompatible quantities, but the point of these units is to consider the free applied field, ie B = mu0 H generated in a VSM or similar. Common units for this quantity in the literature are Oe and Tesla, where for free space 1Oe = 1e-4 T ( https://physics.stackexchange.com/questions/269410/what-is-the-relationship-between-the-magnetic-units-oersted-and-tesla ). The point is not to confuse the casual user. In addition conversion to volumetric quantities is complicated, since the volume of the simulation is a poorly defined quantity. These units are here for future reference in case we implement that. Finally, we are sticking to SI units, and adding Gauss is not a sensible thing to perpetuate. It may be sensible to move A/m to a unit of field however, though this is less common in the literature. By the way this code actually needs refactoring - its clunky to add new units.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/richard-evans/vampire/pull/40?email_source=notifications&email_token=ANJY7GW3E54ZJYIXQ26KPELQLO4C7A5CNFSM4I2QTQVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TCLOY#issuecomment-535176635, or mute the thread https://github.com/notifications/unsubscribe-auth/ANJY7GR3FUUOBP2L7GCQYA3QLO4C7ANCNFSM4I2QTQVA .