Commit Graph

68 Commits

Author SHA1 Message Date
marioalexis
108687b938 Fem: Improve constraint BodyHeatSource 2024-06-03 03:15:14 -03:00
FEA-eng
14a7ca99cd Base: Add moment unit 2024-05-16 12:51:37 -05:00
marioalexis
a671237073 Base: Add stiffness per unit area unit 2024-01-26 13:44:16 -03:00
hasecilu
b1515377b5 Add ':' to TODOs to activate highlight
Some linters have a special highlightning on "TODO:" comments.
2023-12-19 17:01:17 -06:00
wmayer
fd74acca35 Base: fix several reported lint warnings 2023-11-13 12:01:26 -05:00
wmayer
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
Uwe
9e211c7f93 [Base] fix issues with new units
- also sort units for better overview
2023-02-26 22:19:31 +01:00
Oliver Oxtoby
806c47311e [App] [Base] Add missing Property classes for all Units (#6717)
- Add missing Property classes for all Units
- Add missing units to unit calculator, as well as some missing string representations
- also change units used for dynamic viscosity to the customary Pa*s
2023-02-26 15:28:28 +01:00
Uwe
94a5bf7780 [Core] add quantity Magnetization
- needed for FEM and Material
2023-02-08 20:33:58 +01:00
Uwe
a58c74c556 [Core] disable the the unit Oersted
- is not feasible for practical usage and (was up to now not used, thus no consequence)
  moreover, Oersted is a cgs unit while we use SI units, thus also not suitable for FEM, only makes problems for magnetization
2023-02-08 19:59:36 +01:00
Uwe
a9b8be3e00 [Core] add current density
- necessary to implement electromagnetic features to the FEM WB
2023-02-04 03:22:24 -06:00
wmayer
2af16e4804 Base: [skip ci] fix scale factor in unit schemes 2022-08-24 11:24:52 +02:00
wmayer
ff38f8b8e8 CMake: [skip ci] remove trailing whitespaces 2022-08-24 07:46:07 +02:00
Jonas Bähr
1394c62cdd Fix build on MacOS-X 10.14: missing cmath header
This undoes a small part of commit 5de761eef0cb059c899fd6388dc2a5f88e40f526,
which seems a bit too agressive. Without the cmath header the build fails
using Apple clang version 11.0.0 (clang-1100.0.33.17) on Mojave with the
following error:

.../FreeCAD-git/src/Base/UnitsSchemaInternal.cpp:39:24: error: call to 'abs' is ambiguous
    double UnitValue = std::abs(quant.getValue());
                       ^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdlib.h:132:6: note: candidate function
int      abs(int) __pure2;
         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
                                           ^
1 error generated.
2022-08-24 07:40:04 +02:00
Uwe
94cc1b867a [Gui] revert the revert of setting unit factor for F/m
- see https://github.com/FreeCAD/FreeCAD/commit/2f0824be#r81159352
2022-08-14 22:58:12 +02:00
Uwe
91bf791e3c [Gui] revert setting unit factor for F/m
- see https://github.com/FreeCAD/FreeCAD/commit/2f0824be#r81159352
2022-08-14 20:49:58 +02:00
Uwe
865481fcf4 [FEM] fix handling of vacuum permittivity
- fix message that permittivity object was not handled
- set an expression, otherwise the user gets only "0.000" for the default of 8.8e-12
- use as unit the common "F/m" (this is also more user-friendly than "s^4*A^2 / (m^3*kg)")
- fix a ToDo
2022-08-14 17:59:42 +02:00
Uwe
1945f23f69 [Base] UnitsSchemaInternal: improve code readability 2022-07-02 05:15:11 +02:00
Stefan Brüns
4d63de1fe7 Base: Fix wrong character encoding for micro-siemens
Contrary to any other Unit with micro prefix (e.g. ug, uH, uF) the
string was created with a Latin1 encoding instead of UTF-8.

The problem can be verified with these python statements:
```
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroSiemens, 0)
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroGram, 0)
```
2022-03-06 11:20:09 -05:00
Uwe
4d0a5c045c [Base] Units and Uui: remove unused includes 2022-02-24 11:08:56 +01:00
Preslav
5030d8bb6d Added stiffness units to FreeCAD [mN/m, N/m, kN/m, MN/m] 2021-08-16 12:27:41 +01:00
donovaly
6c67300d62 [Base] add electrical conductivity
- this is necessary to perform electrodynamics simulations. Since the typical values are in the range of 1e6 S/m, we need the new units kS and MS

- since this is for simulations, also add electrical conductivity to the FEM material cards
2021-03-25 17:13:52 +01:00
qingfengxia
c6364c823a Base: add VolExpansionCoeff and complete KinematicViscosity unit 2020-05-23 00:03:09 +02:00
wmayer
e14e5b845e [skip ci] use QLocale class consistently to make it possible to change it application-wide 2020-03-26 16:37:45 +01:00
donovaly
d1b354fc6b add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00
donovaly
68ea38cc8d add the units Ohm and Siemens 2020-01-05 15:00:46 +01:00
luz.paz
011e5aedfa src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
donovaly
b255475d7c missing parts from from commit 33b8054228
- also add keV and MeV since these are the units used in practice
2019-12-24 13:31:00 +01:00
donovaly
a6a043a6f2 also add unit THz as requested 2019-12-23 16:49:45 +01:00
donovaly
26196ae612 add mJ and kW
- also some fixes
- add conversions for forces
2019-12-19 13:31:12 +01:00
donovaly
23ec305c4b correct Unit::Work conversions
- also add conversions for Unit::Mass and Unit::Power
2019-12-19 13:31:12 +01:00
donovaly
53b34a3dc0 take care of the UnitsCalculator
- also fix uF and uH
- add conversion routine for C and T
2019-12-19 13:31:12 +01:00
donovaly
4b99ee28ce generate QuantityLexer.c
- also set proper unit conversions
- fix MilliWatt and MilliMole
2019-12-19 13:31:12 +01:00
donovaly
94bae36cee add the following units:
- mmol
- ml
- bar
- mbar
- kJ
- kWh
- eV
- C
- T
- F (p, n, u, m)
- H (n, u, m)
2019-12-19 13:31:12 +01:00
wmayer
617a8d7598 Support for Frequency in quantity parser 2019-10-21 11:49:55 +02:00
luz.paz
c7785267a7 Misc. typos and whitespace
Found via `codespell -q 3 --skip="*.po,*.ts,./.git,./src/3rdParty,./src/CXX,./src/zipios++,./src/Mod/Assembly/App/opendcm,./ChangeLog.txt" -I ../fc-word-whitelist.txt` and `grep`. Excess whitespace auto-removed by Atom editor.
2018-11-03 16:13:06 -03:00
wmayer
b1bfb62583 add derived unit electric potential 2017-10-16 21:56:13 +02:00
Harald Geyer
f50a19df2f Fix rendering of Unit::ThermalConductivity
The old behaviour was:
>>> Quantity('0.9 W/m/K').UserString
u'0.00 W/mm/K'
>>> Quantity('1.1 W/m/K').UserString
u'1.10 W/m/K'
>>> Quantity('1100 W/m/K').UserString
u'1100.00 W/m/K'

The new behaviour is:
>>> Quantity('0.9 W/m/K').UserString
u'0.90 W/m/K'
>>> Quantity('1.1 W/m/K').UserString
u'1.10 W/m/K'
>>> Quantity('1100 W/m/K').UserString
u'1.10 W/mm/K'
2017-10-10 20:35:33 +02:00
Oliver Oxtoby
f93bdfb927 Base: Add DynamicViscosity and SpecificEnergy units 2017-08-20 16:50:11 +02:00
wmayer
6ae540b053 fixes #0003137: Unit UserString wrong 2017-07-24 16:52:03 +02:00
wmayer
c8084ac5c5 quantities must be expressed in units m,g,s for MKS and internal scheme 2017-06-18 23:43:42 +02:00
Itai Nahshon
a42391fa3b Add Units schemaTranslate for Unit::Velocity.
Independent of scale, use only mm/min or in/min because it is compatible
with GCODE feed rate units.
(My use case is definition os feed-rates in PathLoadTool.py).
2017-06-18 17:11:49 +02:00
vdwalts
59ac40a584 Base: Units for FEM, new heat and heat flux functions 2016-12-21 11:27:41 -02:00
wmayer
61b62ee314 add class QuantityFormat to control user string of Quantity
do some code refactoration to reduce duplicate code
2016-08-06 19:06:29 +02:00
wmayer
f8dc307820 fix bug in factor for Pa in units system 2016-08-05 13:57:27 +02:00
wmayer
1e6981b089 use the unicode symbol for mu 2016-08-05 10:38:33 +02:00
wmayer
787cfc660d use const reference in schemaTranslate to avoid tmp. copy 2016-08-05 10:33:41 +02:00
wmayer
1783528282 improve whitespaces, fix typos 2016-08-05 10:00:12 +02:00
wmayer
affdb168b7 whitespace improvements 2016-08-04 17:45:04 +02:00
vdwalts
a42fd4b1fb Base: Units: add units for thermomechanical analysis 2016-08-04 17:45:04 +02:00