add new material parameter

A forum to discuss the implementation of a good Materials system in FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

add new material parameter

Post by HarryvL »

bernd wrote: Thu May 24, 2018 8:14 pm At the moment we gone have 105 materials in FreeCAD. The could easily extended to more than 1000. In 95 % I need less than 10 materials. There is no need to have over 1000 for me. But in the 5 % I would like to have access to over 1000 materials. The problem is how to handle them?
Hi Bernd, there are many material panel topics around, so not sure I should pose my question here...

Anyway, I want to add three parameters to the SolidMaterial task panel for Concrete, i.e. Fc (concrete compressive strength), Phi (concrete friction angle) and Fy (reinforcement yield strength). These feature in my topic Plotting of Concrete Reinforcement Ratio (https://forum.freecadweb.org/viewtopic. ... 21#p234582.

As far as I can see, this mostly affects _ViewProviderFemMaterial.py, right? While playing with the task panel though I hit a few problems with the behaviour of the input fields and therefore wonder if I am using the latest version of this recent development, i.e.:

> upon entering of the panel the density is set at 2400.00 kg/m^3. When putting the cursor at the first position and pressing <Delete> the cursor jumps to the end of the field. The same happens after entering new digits at the start of the field
> The default for Young's modulus is 32.00 GPa. When clearing this field by highlighting <Double click> and <Delete> the field gets automatically filled with 0.00 Pa with the cursor jumping to the end.
> A strange handling of numbers by splitting the number in two parts (before and after the decimal point)?

Before I dive into this, could you please confirm I am looking at the latest development in this regard?

OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13980 (Git)
Build type: Debug
Branch: trajectories
Hash: fac95438864d4f617dd7702016cbe1694a1a3868
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Last edited by HarryvL on Sun Jun 24, 2018 8:22 pm, edited 1 time in total.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new material parameter

Post by bernd »

1. add new material parameter to the material module and to at least one material card
The material parameter are not defined in the FreeCAD source code. The only resource where they are defined is the wiki. See Material and Material_data_model ( https://forum.freecadweb.org/viewtopic. ... 30#p238883 ) Means a new material parameter is just used in the material cards of each material. See for example: https://github.com/FreeCAD/FreeCAD/blob ... teel.FCMat

2. have a possibility to edit the new parameter
The easiest way would be to use an editor and edit the material cards but this is not smart. Another way would be the FEM material task panel, but this is not smart either, because it is only of use in FEM. The way to go is to use the material editor. Thus the new material parameter needs to be added to the material editor source code. This should happen here: https://github.com/FreeCAD/FreeCAD/blob ... #L101-L108 ATM IMHO this it what defines a material parameter.

3. finally it needs some tools which use the new material parameter. This is your existing code.


Eventually:
- add the new parameter to the wiki pages (The wiki is missing some material parameters already ... :shock: )
- add it to the material module method which is used by the material editor: https://github.com/FreeCAD/FreeCAD/blob ... #L101-L108
- use it in at least one material card
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new material parameter

Post by bernd »

should I add these parameter for you?

BTW: for the reinforced yield strength we should.add a new material card "reinforced concrete" and only add this property to this card. Furthermore this concrete has a highter density.
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: add new material parameter

Post by HarryvL »

That would be fantastic Bernd, because it would take me a long time to understand how the various parts of FC interact in the creation and storage of material properties.

We could consider creating a separate material "reinforced concrete", but one could argue that all concrete in civil engineering practice is reinforced. So I am not so sure that we would need both types.

The specific gravity of reinforced concrete is higher than that for unreinforced concrete, but strongly dependent on the reinforcement ratio. It may range from 2400 KN/m^3 for very light reinforcement to 2800 KN/m^3 for heavy reinforcement (based on 5% RR). So what to put is unclear and I would leave it to the user to select.

In summary, my proposal would be to stick with one material card for concrete and let the user select the parameters, with the option to put fy=0.0 MPa for unreinfroced concrete (I will make sure to catch that in the routine to prevent /0.0).

The proposed name and default values for the new parameters would be:

Yield Strength Reinforcement Steel: fy=500MPa
Unixial Compression Strength Concrete: fc=30MPa
Angle of Internal Friction Concrete: Phi=30 deg

I will then add a description on Wiki and do a tutorial to make sure these parameters are understood and put into context of an engineering analysis.

By the way - I found some strange behaviors of the material panel input fields (as mentioned in my post). Is this something I need to report separately as a potential bug?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new material parameter

Post by bernd »

HarryvL wrote: Thu Jun 28, 2018 1:43 pmBy the way - I found some strange behaviors of the material panel input fields (as mentioned in my post). Is this something I need to report separately as a potential bug?
report it in this topic https://forum.freecadweb.org/viewtopic.php?f=18&t=24015
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new material parameter

Post by bernd »

HarryvL wrote: Sun Jun 24, 2018 8:17 pm Fc (concrete compressive strength), Phi (concrete friction angle) and Fy (reinforcement yield strength).
just to be sure we are talking about the same properties ...

Compressive strength --> https://en.wikipedia.org/wiki/Compressive_strength
Yield strength --> https://en.wikipedia.org/wiki/Yield_(engineering)
Angle of friction --> https://en.wikipedia.org/wiki/Friction# ... f_friction (But this is between two materials ?)
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: add new material parameter

Post by HarryvL »

bernd wrote: Fri Jun 29, 2018 4:40 pm just to be sure we are talking about the same properties ...

Compressive strength --> https://en.wikipedia.org/wiki/Compressive_strength
Yield strength --> https://en.wikipedia.org/wiki/Yield_(engineering)
Angle of friction --> https://en.wikipedia.org/wiki/Friction# ... f_friction (But this is between two materials ?)
Yes, yes and almost. The last one is better introduced by referring to the Mohr-Coulomb model, here: https://en.m.wikipedia.org/wiki/Mohr–Coulomb_theory. This actually refers onward to your link, but is a better starting point.
User avatar
HarryvL
Veteran
Posts: 1285
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: add new material parameter

Post by HarryvL »

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new material parameter

Post by bernd »

https://github.com/FreeCAD/FreeCAD/blob ... #L118-L127

You can use the material editor to edit the material cards. I did not yet add the reinforcement yield strength. As a work around you could use the normal yield strength instead. The problem I see is we gone ad composite materials to the material cards. If we gone start this we may never end in adding special composite properties. May be a better way is to add a separate card for reinforcement and somehow create the composite material in FEM. Arch does make some similar approach.

bernd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: add new material parameter

Post by bernd »

Would be cool if you could extend this if you have a minute ... https://www.freecadweb.org/wiki/Materia ... properties
Post Reply