How about a general FemMaterial.py to suport Mechancial, Thermal, Fluidic and ElectroMagnetic

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
oliveroxtoby
Posts: 837
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: How about a general FemMaterial.py to suport Mechancial, Thermal, Fluidic and ElectroMagnetic

Post by oliveroxtoby »

I feel this issue is rather complex and we perhaps need to leave it to stew for a while and see how things mature? I am starting to worry that at this stage of our involvement with FreeCAD we are going beyond our remit diving too deeply into this.

Qingfeng, as you suggest we will happily push the interim matprop editor we made, but in my opinion we should leave this in CFD as an interim measure rather than pollute the FEM workbench with another contender. I stress this need only be an interim measure to allow us to concentrate on what we need to get done. Your solution looks like a very good way to handle fluid matprops in the FEM WB, but our worries are how well this would integrate with the CFD solvers.

This raises a question that I'm not really clear on: I know we are trying to share code between the FEM and CFD workbenches, but is this just to avoid duplication or is it actually the plan to integrate CFD into FEM eventually? I was under the impression they were going to remain separate modules.

Thanks for your patience!
Oli
Please provide all the information requested in this post before reporting problems with CfdOF.
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: How about a general FemMaterial.py to suport Mechancial, Thermal, Fluidic and ElectroMagnetic

Post by qingfeng.xia »

I have the thought of
CFD into FEM eventually
but it will not happend in 2017. So please go head to demonstrate your work in CFD.

We can always refactor if needed years later.

Thanks
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: How about a general FemMaterial.py to suport Mechancial, Thermal, Fluidic and ElectroMagnetic

Post by qingfeng.xia »

Agreed, Material task panel could be very complicate to support all kind of material.

let's make simple fluid and simple solid in Fem first, so other solvers can use it for developing test.
Once your CfdFluidMaterial is usable, it can be imported from Cfd Workbench.

https://github.com/FreeCAD/FreeCAD/pull/453

2 very common fluid material: water and air is added

Code: Select all

[FCdMat]
Name = Water
Description = Standard distilled water properties at 20 Degrees Celsius and 1 atm
MolarMass = 18
Density = 998 kg/m^3
;Fluidic properties
DynamicViscosity = 1.003e-3 kg/m/s 
KinematicViscosity = 1.005 m^2/s ; only one viscosity is needed, KinematicViscosity = DynamicViscosity/Density
;VolumetricExpansionCoefficient should be VolumetricThermalExpansionCoefficient , correct in next commit
VolumetricExpansionCoefficient = 2.07e-4 m/m/K

SpecificHeat = 4.182 J/kg/K
ThermalConductivity = 0.591 W/m/K
;ThermalExpansionCoefficient is only meaningful to solid, VolumetricThermalExpansionCoefficient = 3 ThemalExpansionCoefficient
makeFemMaterail = makeSolidMaterial, existent function of solid material is not affected

user switch between solid and fluid material category is not allowed in taskpanel (text label instead of combobox is used). delete and add new material instead,if user clicks the wrong toolbar item.

Future work on fluid material in fem:
1) make a fluid material icon
2) add feature of customed material save as/export to fcmat function.


oliveroxtoby wrote:I feel this issue is rather complex and we perhaps need to leave it to stew for a while and see how things mature? I am starting to worry that at this stage of our involvement with FreeCAD we are going beyond our remit diving too deeply into this.

Qingfeng, as you suggest we will happily push the interim matprop editor we made, but in my opinion we should leave this in CFD as an interim measure rather than pollute the FEM workbench with another contender. I stress this need only be an interim measure to allow us to concentrate on what we need to get done. Your solution looks like a very good way to handle fluid matprops in the FEM WB, but our worries are how well this would integrate with the CFD solvers.

This raises a question that I'm not really clear on: I know we are trying to share code between the FEM and CFD workbenches, but is this just to avoid duplication or is it actually the plan to integrate CFD into FEM eventually? I was under the impression they were going to remain separate modules.

Thanks for your patience!
Oli
Last edited by qingfeng.xia on Fri Jan 20, 2017 9:34 am, edited 1 time in total.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
vdwalts
Posts: 9
Joined: Wed Jun 22, 2016 12:43 pm

Re: How about a general FemMaterial.py to suport Mechancial, Thermal, Fluidic and ElectroMagnetic

Post by vdwalts »

I see in some of the freecad wiki documentation that the proposed format for the documentation of material properties was xml (http://www.freecadweb.org/wiki/index.ph ... data_model). So I was just wondering if all the materials somewhere in the future could be standardised in the non-proprietary, generic xml markup language 'MatML' as developed by NIST?

There is already a link to matweb.org on the materials gui in FEM, whose material properties are given in MatML format.
This would ease the importing and exporting of materials from standard libraries and be able to support all the different types of materials ie mechanical, thermal, fluidic etc. And it will also enable the interoparbility of materials between different software packages.
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: How about a general FemMaterial.py to suport Mechancial, Thermal, Fluidic and ElectroMagnetic

Post by qingfeng.xia »

page 41 of link pdf: http://xml.coverpages.org/MatMLv30-NIST ... 200301.pdf is the exampel Al material.

FreeCAD wiki has proposed a simplified similar xml model http://www.freecadweb.org/wiki/index.ph ... data_model

MatML seems quite heavyweight, supporting both MatML and FcMat may be a good ideal. FcMat is user editable.

If there is some python lib to parse MatML that will be useful to integrate into FreeCAD.

vdwalts wrote:I see in some of the freecad wiki documentation that the proposed format for the documentation of material properties was xml (http://www.freecadweb.org/wiki/index.ph ... data_model). So I was just wondering if all the materials somewhere in the future could be standardised in the non-proprietary, generic xml markup language 'MatML' as developed by NIST?

There is already a link to matweb.org on the materials gui in FEM, whose material properties are given in MatML format.
This would ease the importing and exporting of materials from standard libraries and be able to support all the different types of materials ie mechanical, thermal, fluidic etc. And it will also enable the interoparbility of materials between different software packages.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
vdwalts
Posts: 9
Joined: Wed Jun 22, 2016 12:43 pm

Re: How about a general FemMaterial.py to suport Mechancial, Thermal, Fluidic and ElectroMagnetic

Post by vdwalts »

Okay thanks, will look into it.
Post Reply