Closed librasteve closed 3 years ago
wikipedia info is very useful on this - https://en.wikipedia.org/wiki/Hartree_atomic_units
some thoughts:
a proposal:
a raku snippet that
#!/usr/bin/env raku
constant \hartree-energy = %( name => 'Hartree energy', value => 4.3597447222071e-18, uncertainty => 0.0000000000085e-18, units => 'J' ); my \c-he := hartree-energy;
my $He-unit; { use Physics::Unit;
$He-unit = Unit.new( defn => "{c-he<value> ~ ' ' ~ c-he<units>}", names => <Eₕ E_h Ha> );
dd $He-unit;
} { use Physics::Measure;
my $He-mea = Energy.new(value => 1, units => $He-unit );
say $He-mea; #1Eₕ
say $He-mea.in('J'); #4.3597447222071e-18J
}
closing for now (added to https://github.com/p6steve/raku-Physics-Unit/issues/12 instead )
from @kjpye