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

About the development of the FEM module/workbench.
User avatar
oliveroxtoby
Posts: 7
Joined: Fri Dec 23, 2016 9:43 am

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

Postby oliveroxtoby » Wed Jan 11, 2017 11:28 am

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
qingfeng.xia
Posts: 102
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

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

Postby qingfeng.xia » Wed Jan 11, 2017 12:37 pm

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 0.17-dev OpenFOAM + FreeCAD
qingfeng.xia
Posts: 102
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

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

Postby qingfeng.xia » Thu Jan 19, 2017 9:12 am

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
https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Material/FluidMaterial/Water.FCMat

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 0.17-dev OpenFOAM + FreeCAD
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

Postby vdwalts » Thu Jan 19, 2017 1:43 pm

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.php?title=Material_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 [url]matweb.org[/url] 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: 102
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford Uk
Contact:

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

Postby qingfeng.xia » Fri Jan 20, 2017 9:46 am

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

FreeCAD wiki has proposed a simplified similar xml model http://www.freecadweb.org/wiki/index.php?title=Material_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.php?title=Material_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 [url]matweb.org[/url] 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 0.17-dev OpenFOAM + FreeCAD
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

Postby vdwalts » Mon Jan 23, 2017 12:45 pm

Okay thanks, will look into it.