]> OCCT Git - occt.git/commitdiff
0030800: Foundation Classes, UnitsAPI - poise dynamic viscosity unit is not defined...
authorabv <abv@opencascade.com>
Fri, 2 Oct 2020 20:54:16 +0000 (23:54 +0300)
committerbugmaster <bugmaster@opencascade.com>
Sat, 3 Oct 2020 13:06:35 +0000 (16:06 +0300)
Definition of Poise unit corrected.

Added test bugs fclasses bug30800

src/UnitsAPI/Units.dat
src/UnitsAPI/UnitsAPI_Units_dat.pxx
tests/bugs/fclasses/bug30800 [new file with mode: 0644]

index a9a1a54fa9dc3a314e0c34be04266daa163695cf..daf0995fcbd05d888a6dac17d035aad453346d63 100755 (executable)
@@ -260,7 +260,7 @@ pound force per square inch                        psi
                                                  M         L         T         I         K         N         J         P         S
 DYNAMIC VISCOSITY                                1        -1        -1         0         0         0         0         0         0
 ....................................................................................................................................
-poise                                              Po                                  1                 gf/cm\xB2.s
+poise                                              Po                                  1                 g/cm/s
 poiseuille                                         Pl                                 10                 Po
 ....................................................................................................................................
                                                  M         L         T         I         K         N         J         P         S
index 629ed8220a247b618482026fffa24ea0272cee32..f54cc7f8faa619aa16a85613ac0b2f72eb1abf59 100644 (file)
@@ -263,7 +263,7 @@ static const char UnitsAPI_Units_dat[] =
   "                                                 M         L         T         I         K         N         J         P         S\n"
   "DYNAMIC VISCOSITY                                1        -1        -1         0         0         0         0         0         0\n"
   "....................................................................................................................................\n"
-  "poise                                              Po                                  1                 gf/cm\xB2.s\n"
+  "poise                                              Po                                  1                 g/cm/s\n"
   "poiseuille                                         Pl                                 10                 Po\n"
   "....................................................................................................................................\n"
   "                                                 M         L         T         I         K         N         J         P         S\n"
diff --git a/tests/bugs/fclasses/bug30800 b/tests/bugs/fclasses/bug30800
new file mode 100644 (file)
index 0000000..ec8253f
--- /dev/null
@@ -0,0 +1,14 @@
+puts "# =========================================================================================="
+puts "# 0030800: Foundation Classes, UnitsAPI - poise dynamic viscosity unit is not defined correctly"
+puts "# =========================================================================================="
+puts ""
+
+puts "Check that 1 Poise is 0.1 Pa*s"
+if { [regexp {result: ([0-9.e+-]+)} [unitconvtoSI 1. Po] res poise_si] } {
+  checkreal "Poise in SI (Pa*s)" $poise_si 0.1 1e-6 1e-6
+} else {
+  puts "Error: cannot convert Poise to SI"
+}
+
+puts "Check that 1 Poise is 0.001 kg/cm/s"
+checkreal "Poise in kg/cm/s" [unit 1. Po kg/cm/s] 0.001 1e-6 1e-6