Problem material library - Generic glass

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Problem material library - Generic glass

Post by HoWil »

Hello,

I face a problem regarding the material settings for "Glass-Generic" when using FEM-materials. After selecting this material in Task-view and confirming the selection with OK the material-entry in Combo-Box->Model cant be edited any more. The material is marked with yellow background color as it is highlighted during editing it but the Task-View menu is empty.

I guess some values are wrong/missing for 'Glass-Generic'. EDIT: the same problem happens for 'AlMg3F24' and maybe others.
'Solid Material' is marked yellow but no dialogues are shown in Task-View!
'Solid Material' is marked yellow but no dialogues are shown in Task-View!
Screenshot from 2017-03-10 10-46-50.png (122.22 KiB) Viewed 2343 times
Steps to reproduce:
*open 3D FEM example
*change material to 'Glass-Generic' and confirm with OK
*try to reopen - FEM-material dialogue with double-clicking 'Solid-Material' in Model->Combo-View.

BR,
HoWil
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10460 (Git)
Build type: None
Branch: master
Hash: 91c59c7910436c44ede608e29d9a90a287121a11
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem material library - Generic glass

Post by bernd »

confirmed on

OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10460 (Git)
Build type: Unknown
Branch: femdev
Hash: 91c59c7910436c44ede608e29d9a90a287121a11
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0


I'll have a look.
santacruz
Posts: 14
Joined: Tue Mar 07, 2017 4:42 pm

Re: Problem material library - Generic glass

Post by santacruz »

Same problem here.


OS: Mac OS X 10.12.3
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10460 (Git)
Build type: Release
Branch: (detached from 91c59c7)
Hash: 91c59c7910436c44ede608e29d9a90a287121a11
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem material library - Generic glass

Post by bernd »

The value in glas material misses the unit, see https://github.com/FreeCAD/FreeCAD/blob ... .FCMat#L16

It should look like this in Steel-Generic with a valid unit https://github.com/FreeCAD/FreeCAD/blob ... .FCMat#L16 or like in https://github.com/FreeCAD/FreeCAD/blob ... .FCMat#L14 or like on Wood-Generic without any ThermalExpansionCoefficient at all, see https://github.com/FreeCAD/FreeCAD/blob ... Mat#L7-L13
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem material library - Generic glass

Post by bernd »

To be honest, I would rather like to see all wrong materials fixed than the material task panel. May be I will add some checks to get around wrong material cards anyway.

To fix the material cards this may help. viewtopic.php?f=10&t=17441

bernd
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Problem material library - Generic glass

Post by HoWil »

bernd wrote:To be honest, I would rather like to see all wrong materials fixed than the material task panel. May be I will add some checks to get around wrong material cards anyway.

To fix the material cards this may help. viewtopic.php?f=10&t=17441

bernd
I agree!
Will have a look on the material within the next days... cant guarantee a thing .
BR,
HoWil
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem material library - Generic glass

Post by bernd »

HoWil wrote:Will have a look on the material within the next days... cant guarantee a thing .
would be cool ...


If you are interested to reproduce the problem in a python console ...

Code: Select all

tc_new_unit = "W/m/K"

withUnit = u'43.0 W/m/K'
tc = FreeCAD.Units.Quantity(withUnit)
tc
tc_with_new_unit = tc.getValueAs(tc_new_unit)
tc_with_new_unit


withoutUnit = u'0.000009'
tc = FreeCAD.Units.Quantity(withoutUnit)
tc
tc_with_new_unit = tc.getValueAs(tc_new_unit)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem material library - Generic glass

Post by bernd »

for more informations see topic: viewtopic.php?f=10&t=21293


Implemented a work around. I extended the checks of the given material data. I may add it to all material in task panel.
https://github.com/berndhahnebach/FreeC ... diff=split

@HoWil:
Would you give this a try? It's in https://github.com/berndhahnebach/FreeC ... its/femdev
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Problem material library - Generic glass

Post by HoWil »

bernd wrote: @HoWil:
Would you give this a try? It's in https://github.com/berndhahnebach/FreeC ... its/femdev
Thanks for your effort!
cloning and compiling ...
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Problem material library - Generic glass

Post by HoWil »

First, I tested all 7 standard material available in femdev. All worked fine.
Second, copied all 99 available materials from
/FreeCAD_bhb/src/Mod/Material/StandardMaterial
to
/FreeCAD_bhb/data/Mod/Material/StandardMaterial
and tested at least the originally mentioned Glass_Generic and AlMg3F24 and all worked also fine.

I observed that for instance AlMg3F24 was after reopening the file/material-browser changed to [DE]AlMg3F24 and the following output was printed in the terminal (Glass-Generic changed to Glass)

Code: Select all

Previously used material cannot be found in material directories. Using transient material.
Previously used material cannot be found in material directories. Using transient material.
Previously used material cannot be found in material directories. Using transient material.
Is this because some parameters were not imported and set to 0?

Thanks again,
HoWil
Post Reply