FEM anaylsis of GDML Designs.
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: FEM anaylsis of GDML Designs.
does it work for you on a simple part box?
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: FEM anaylsis of GDML Designs.
Attached is the FreeCAD file, but not sure you will be able to do much with it without installing the Workbenchbernd wrote: ↑Sat Sep 21, 2019 6:51 amwould you post the FreeCAD file with that object ?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
https://github.com/KeithSloan/FreeCAD_Python_GDML
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).
Re: FEM anaylsis of GDML Designs.
just add .txt and you can upload any filekeithsloan52 wrote: ↑Sat Sep 21, 2019 7:59 am (This forum does not allow upload of files with the gdml extension).
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: FEM anaylsis of GDML Designs.
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?
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?
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: FEM anaylsis of GDML Designs.
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
Thanks
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: FEM anaylsis of GDML Designs.
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.
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.
Get the impression that the values have not been set.
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.
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)
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: FEM anaylsis of GDML Designs.
Okay I see I need to double click the material to bring up the editor.
Re: FEM anaylsis of GDML Designs.
multi material tutorial FEM_Shear_of_a_Composite_Block
Re: FEM anaylsis of GDML Designs.
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
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.