FEM anaylsis of GDML Designs.

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: FEM anaylsis of GDML Designs.

Post by bernd »

does it work for you on a simple part box?


boxmesh.FCStd
(93.68 KiB) Downloaded 31 times

Screenshot_20190921_085259.png
Screenshot_20190921_085259.png (137.07 KiB) Viewed 1117 times
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: FEM anaylsis of GDML Designs.

Post by keithsloan52 »

bernd wrote: Sat Sep 21, 2019 6:51 am
keithsloan52 wrote: Sat Sep 21, 2019 5:52 am Okay I tried to see if I creating a Mesh for a simple GDML Object i.e. implemented as a FreeCAD Python Object.

When in FEM workbench. Have it selected then click on Mesh icon window pops up with Apply | Cancel | OK
but before I get to try Apply I get a message in Report View
Fem::FemMeshObjectPython / FEMMeshGmsh: Links go out of the allowed scope

If I try Apply I get
0.0: We are going to start ...
0.0: Start Gmsh ...
1.0: Clean run of Gmsh
1.0: Gmsh done!

But No mesh created as far as I can tell

Using Check Geometry in Part Workbench gives
1 processed out of 1 selecfed
0 invalid shapes
would you post the FreeCAD file with that object ?
Attached is the FreeCAD file, but not sure you will be able to do much with it without installing the Workbench
https://github.com/KeithSloan/FreeCAD_Python_GDML

test.FCStd
(9.7 KiB) Downloaded 38 times
The imported GDML file is g4box.gdml in the SampleFiles directory see github.
(This forum does not allow upload of files with the gdml extension).
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM anaylsis of GDML Designs.

Post by bernd »

keithsloan52 wrote: Sat Sep 21, 2019 7:59 am (This forum does not allow upload of files with the gdml extension).
just add .txt and you can upload any file
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: FEM anaylsis of GDML Designs.

Post by keithsloan52 »

Not sure what has changed but I still get the message, but it does now create a Mesh.
I will experiment to see if I can reproduce the problem again.

What is the situation with Compounds of different materials, can one still do FEM analysis on them ?
How does one specify the material of each object? All the GDML solids have a material definition but it is very
different from FEM's. Can I allocate a material under program control?
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: FEM anaylsis of GDML Designs.

Post by keithsloan52 »

Hi @bernd I see from the tutorial https://www.freecadweb.org/wiki/FEM_Tutorial_Python It is possible to define materials and allocate to an object. Do you have a pointer to a full list of material parameters? Also just the materials associated with heat transfer.
Thanks
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: FEM anaylsis of GDML Designs.

Post by keithsloan52 »

Okay I have had a go at adding materials and thermal properties but am not sure how I can check if it worked.
Get the impression that the values have not been set.
testA.FCStd
(13.98 KiB) Downloaded 34 times
Coding print(mat) in the code outputs
{'Name': 'SSteel0x56070ee87d10', 'Density': '1.0 kg/m^3', 'ThermalConductivity': '2.0 W/m/K', 'ThermalExpansionCoefficent': '3.0 m/m/K', 'SpecficHeat': '4.0 J/kg/K'}

Also why on the second file has it add 001 to the solid names as far as I know they are unique, but maybe a bug in my code.
testB.FCStd
(17.47 KiB) Downloaded 45 times

Code: Select all

print("Found Material")
matObj = ObjectsFem.makeMaterialSolid(doc, material)
mat = matObj.Material
mat['Name'] = material
mat['Density'] = str(n.density) + " kg/m^3"
mat['ThermalConductivity'] = str(n.conduct) + " W/m/K"
mat['ThermalExpansionCoefficent'] = str(n.expand) + " m/m/K"
mat['SpecficHeat'] = str(n.specfic) + " J/kg/K"
print(mat)
matObj.Material = mat
analObj.addObject(matObj)
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: FEM anaylsis of GDML Designs.

Post by keithsloan52 »

Okay I see I need to double click the material to bring up the editor.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM anaylsis of GDML Designs.

Post by bernd »

multi material tutorial FEM_Shear_of_a_Composite_Block
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: FEM anaylsis of GDML Designs.

Post by saso »

Monte Carlo Geometry Processing
https://www.youtube.com/watch?v=zl9GtPX0LjM

A Grid-Free Approach to PDE-Based Methods on Volumetric Domains
http://www.cs.cmu.edu/~kmcrane/Projects ... index.html
Conventional methods most often mesh the domain, which is both challenging and expensive for geometry with fine details or imperfections (holes, self-intersections, etc.). In contrast, grid-free Monte Carlo methods avoid mesh generation entirely, and instead just evaluate closest point queries. They hence do not discretize space, time, nor even function spaces, and provide the exact solution (in expectation) even on extremely challenging models.
Post Reply