missing units in value expression parser

A forum to discuss the implementation of a good Materials system in FreeCAD
User avatar
bernd
Posts: 8486
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing units in value expression parser

Postby bernd » Wed Jun 26, 2019 7:33 pm

uwestoehr wrote:
Mon Jun 24, 2019 11:33 pm
bernd wrote:
Mon Jun 24, 2019 3:09 pm
In the regard of this n, m, c, d, k ... this seams reasonable make this available to all units without the need to define it for every unit. But needs someone with knowledge of the internals of FreeCAD Unit system who has time and interest to implement this.
I know. my spare time is too limited and I already promised too many things I could not deliver.
haha same problem here. I stopped promising to much ... :D :mrgreen:
User avatar
bernd
Posts: 8486
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing units in value expression parser

Postby bernd » Wed Jun 26, 2019 8:49 pm

Just had a look, unit Volt is fully implemented. It is called electric potential.

- https://github.com/FreeCAD/FreeCAD/blob ... nit.h#L111
- https://github.com/FreeCAD/FreeCAD/blob ... t.cpp#L440
- https://github.com/FreeCAD/FreeCAD/blob ... t.cpp#L477
- https://github.com/FreeCAD/FreeCAD/blob ... it.py#L354
- https://github.com/FreeCAD/FreeCAD/blob ... it.py#L320

It is just not implemented as a material constant in material editor. AFAIK electric is not a material constant. Am I wrong?
User avatar
bernd
Posts: 8486
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing units in value expression parser

Postby bernd » Wed Jun 26, 2019 9:01 pm

bernd wrote:
Wed Jun 26, 2019 8:49 pm
It is just not implemented as a material constant in material editor. AFAIK electric is not a material constant. Am I wrong?
But for sure the electrical conductivity is a material constant https://en.wikipedia.org/wiki/Electrica ... nductivity and not implemented in FreeCAD unit system. Would this be needed?
User avatar
bernd
Posts: 8486
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing units in value expression parser

Postby bernd » Wed Jun 26, 2019 9:03 pm

but to be honest I am a concrete guy ... I know how to put in a light bulb but my knowledge does not go much further :oops:
User avatar
bernd
Posts: 8486
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: missing units in value expression parser

Postby bernd » Wed Jun 26, 2019 9:45 pm

FEM has a constraint electrostatic potential which uses Volt and you are right since it is not implemented it is not possible to use mV.
User avatar
uwestoehr
Posts: 794
Joined: Sun Jan 27, 2019 3:21 am

Re: missing units in value expression parser

Postby uwestoehr » Thu Jun 27, 2019 12:05 am

bernd wrote:
Wed Jun 26, 2019 8:49 pm
Just had a look, unit Volt is fully implemented. It is called electric potential.
It does not work for me because the parser doesn't recognize it. I had a loot and to me it seems it is missing in 3 files:
https://forum.freecadweb.org/viewtopic. ... 34#p315856
Jee-Bee
Posts: 1969
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: missing units in value expression parser

Postby Jee-Bee » Thu Jun 27, 2019 7:26 am

bernd wrote:
Wed Jun 26, 2019 9:01 pm
electrical conductivity
Here some more/ others : https://www.electrical4u.com/electrical ... materials/
  • Resistivity
  • Conductivity
  • Temperature coefficient of Resistance
  • Permittivity
  • Thermoelectricity