public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Debye missing
@ 2006-03-14 20:17 Jochen Küpper
  2006-03-17 15:40 ` Brian Gough
  0 siblings, 1 reply; 4+ messages in thread
From: Jochen Küpper @ 2006-03-14 20:17 UTC (permalink / raw)
  To: gsl-discuss


[-- Attachment #1.1: Type: text/plain, Size: 587 bytes --]

Hi,

I was missing the conversion factor for electric dipole moments from
Debye to C/m from GSL. The attached patch fixes that.

I was not sure where exactly put the constant, for now I have added it
right behind the "ELECTRON_CHARGE" in const.el. The patch includes a
brief documentation.

Hopefully this can be included in the next release.

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: gsl-debye.patch --]
[-- Type: text/x-patch, Size: 4225 bytes --]

Index: const/const.el
===================================================================
RCS file: /cvs/gsl/gsl/const/const.el,v
retrieving revision 1.17
diff -u -u -r1.17 const.el
--- const/const.el	5 Mar 2004 15:16:12 -0000	1.17
+++ const/const.el	14 Mar 2006 19:40:21 -0000
@@ -136,9 +136,10 @@
          ("P"             "POISE")
          ("St"            "STOKES")
          
-         ("Fdy"           "FARADAY")
-         ("e"             "ELECTRON_CHARGE")
-         ("G"             "GAUSS")
+         ("Fdy"                 "FARADAY")
+         ("e"                   "ELECTRON_CHARGE")
+         ("3.33564095e-30 C/m"  "DEBYE")
+         ("G"                   "GAUSS")
 
          ("sb"            "STILB")
          ("lm"            "LUMEN")
@@ -152,8 +153,8 @@
          ("R"             "ROENTGEN")
          ("rd"            "RAD")
 
-         ("1.98892e30 kg"       "SOLAR_MASS")
-         ("0.5291772083e-10 m"  "BOHR_RADIUS")
+         ("1.98892e30 kg"         "SOLAR_MASS")
+         ("0.5291772083e-10 m"    "BOHR_RADIUS")
 
          ("N"                     "NEWTON")
          ("1e-5 N"                "DYNE")
@@ -161,14 +162,14 @@
          ("1e-7 J"                "ERG")
 
          ("pi^2 k^4 / (60 hbar^3 c^2)"       "STEFAN_BOLTZMANN_CONSTANT")
-         ("8 pi fsc^2 hbar^2/(3*c^2*me^2)" "THOMSON_CROSS_SECTION")
+         ("8 pi fsc^2 hbar^2/(3*c^2*me^2)"   "THOMSON_CROSS_SECTION")
 
          )
        )
 
 (setq gsl-electrical-constants 
       '(("8.854187817e-12 F/m" "VACUUM_PERMITTIVITY")
-        ("mu0"           "VACUUM_PERMEABILITY")))
+        ("mu0"                 "VACUUM_PERMEABILITY")))
 
 
 ;;; work around bug in calc 2.02f
Index: const/gsl_const_mksa.h
===================================================================
RCS file: /cvs/gsl/gsl/const/gsl_const_mksa.h,v
retrieving revision 1.4
diff -u -u -r1.4 gsl_const_mksa.h
--- const/gsl_const_mksa.h	26 Jun 2005 13:27:00 -0000	1.4
+++ const/gsl_const_mksa.h	14 Mar 2006 19:40:21 -0000
@@ -1,17 +1,17 @@
 /* const/gsl_const_mksa.h
- * 
+ *
  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Brian Gough
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or (at
  * your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -100,6 +100,7 @@
 #define GSL_CONST_MKSA_FARADAY (9.6485341472e4) /* A s / mol */
 #define GSL_CONST_MKSA_ELECTRON_CHARGE (1.602176462e-19) /* A s */
 #define GSL_CONST_MKSA_GAUSS (1e-4) /* kg / A s^2 */
+#define GSL_CONST_MKSA_DEBYE (1e-4) /* C / m */
 #define GSL_CONST_MKSA_STILB (1e4) /* cd / m^2 */
 #define GSL_CONST_MKSA_LUMEN (1e0) /* cd sr */
 #define GSL_CONST_MKSA_LUX (1e0) /* cd sr / m^2 */
Index: doc/.cvsignore
===================================================================
RCS file: /cvs/gsl/gsl/doc/.cvsignore,v
retrieving revision 1.5
diff -u -u -r1.5 .cvsignore
--- doc/.cvsignore	23 Jul 2004 16:55:12 -0000	1.5
+++ doc/.cvsignore	14 Mar 2006 19:40:21 -0000
@@ -11,6 +11,7 @@
 *.ky
 *.la
 *.log
+*.pdf
 *.pg
 *.ps
 *.toc
Index: doc/const.texi
===================================================================
RCS file: /cvs/gsl/gsl/doc/const.texi,v
retrieving revision 1.29
diff -u -u -r1.29 const.texi
--- doc/const.texi	21 May 2005 13:29:01 -0000	1.29
+++ doc/const.texi	14 Mar 2006 19:40:22 -0000
@@ -82,6 +82,9 @@
 
 @item GSL_CONST_MKSA_GAUSS
 The magnetic field of 1 Gauss.
+
+@item GSL_CONST_MKSA_DEBYE
+The electric dipole moment in the cgs system, @math{D}.
 @end table
 
 @node Astronomy and Astrophysics

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Debye missing
  2006-03-14 20:17 Debye missing Jochen Küpper
@ 2006-03-17 15:40 ` Brian Gough
  2006-03-19 18:19   ` Jochen Küpper
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Gough @ 2006-03-17 15:40 UTC (permalink / raw)
  To: Jochen Küpper; +Cc: gsl-discuss

Jochen Küpper writes:
 > I was missing the conversion factor for electric dipole moments from
 > Debye to C/m from GSL. The attached patch fixes that.
 > 
 > I was not sure where exactly put the constant, for now I have added it
 > right behind the "ELECTRON_CHARGE" in const.el. The patch includes a
 > brief documentation.
 > 
 > Hopefully this can be included in the next release.

Yes, I have put it in with the numerical constant as 10^-21/c.

-- 
Brian Gough

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Debye missing
  2006-03-17 15:40 ` Brian Gough
@ 2006-03-19 18:19   ` Jochen Küpper
  2006-03-21 14:27     ` Brian Gough
  0 siblings, 1 reply; 4+ messages in thread
From: Jochen Küpper @ 2006-03-19 18:19 UTC (permalink / raw)
  To: gsl-discuss

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]

Brian Gough <bjg@network-theory.co.uk> writes:

> Jochen Küpper writes:
>  > I was missing the conversion factor for electric dipole moments from
>  > Debye to C/m from GSL. The attached patch fixes that.

[...]

> Yes, I have put it in with the numerical constant as 10^-21/c.

Thanks!

But in current cvs-HEAD it is actually wrong (1e-18 instead of 1e-21): (?)
,----[const.el]
| (setq gsl-electrical-constants 
|       '(("8.854187817e-12 F/m" "VACUUM_PERMITTIVITY")
|         ("mu0"           "VACUUM_PERMEABILITY")
|         ("(1e-18/c) C/m"  "DEBYE")))
`----

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Debye missing
  2006-03-19 18:19   ` Jochen Küpper
@ 2006-03-21 14:27     ` Brian Gough
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Gough @ 2006-03-21 14:27 UTC (permalink / raw)
  To: Jochen Küpper; +Cc: gsl-discuss

Jochen Küpper writes:
 > But in current cvs-HEAD it is actually wrong (1e-18 instead of 1e-21): (?)
 > ,----[const.el]
 > | (setq gsl-electrical-constants 
 > |       '(("8.854187817e-12 F/m" "VACUUM_PERMITTIVITY")
 > |         ("mu0"           "VACUUM_PERMEABILITY")
 > |         ("(1e-18/c) C/m"  "DEBYE")))
 > `----

Oops, thanks, I've corrected that now. 

-- 
Brian Gough

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-21 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-14 20:17 Debye missing Jochen Küpper
2006-03-17 15:40 ` Brian Gough
2006-03-19 18:19   ` Jochen Küpper
2006-03-21 14:27     ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).