FEM: How to create model with multiple materials

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

FEM: How to create model with multiple materials

Post by lambda »

Hi,

I have been trying to simulate thermal insulation leakage using the FEM module. The module probably wasn't written with that application in mind, but results are quite encouraging anyway: I can create simple models like a cube and apply different constraints to different faces and get a nice temperature field. I can also create slightly more advanced models by drawing some closed polyline and extruding this.

However what I can not do is models with two materials (say a construction part and a thermal insulation sheet): When I just try to create two cubes next to each other, I can't make a mesh out of both together. If I build a fusion of the cubes, I get mesh of the fusion and can reference the parts from two separate material objects. However on running the solver (writing the .inp file) I get "Error in get_femelement_sets -- > femelements_count_ok() failed!".

This is with 0.17R12091 (Git).

None of the tutorials I read covered this, so perhaps somebody can point me in the right direction?
Christoph
Posts: 55
Joined: Fri Jul 08, 2016 9:02 pm

Re: FEM: How to create model with multiple materials

Post by Christoph »

just create the bodys which have different materials assigned to. Then you have to fuse these bodys into a compsolid (i.e. the bodys are connected and share a face). You can do this in the Part Workbench. Make sure you delete the compound after creation of the compsolid (also Part-Workbench). In FEM-Workbench when assigning material properties you can assign different materials within the material dialogue to different parts of a body. Try a youtube search, you will find some videos which can guide you through the whole process (I have some, but sorry only in german: https://www.youtube.com/channel/UCnvFCm ... Xhw/videos).
Christoph
Posts: 55
Joined: Fri Jul 08, 2016 9:02 pm

Re: FEM: How to create model with multiple materials

Post by Christoph »

can you upload the model with the analysis which won't run? To reduce the size of the file, clear FEM mesh (right click on the mesh)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM: How to create model with multiple materials

Post by bernd »

in addition to Christoph attached an example file with multiple materials and mechanical analysis.
multiple-material-example.fcstd
(183.42 KiB) Downloaded 538 times
screen.jpg
screen.jpg (363.29 KiB) Viewed 7762 times

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

Re: FEM: How to create model with multiple materials

Post by bernd »

BTW: What kind of parts do you modell? We have seen a lot of electric parts for computer hardeware so far on FEM forum but it could be used on more fields, for sure. I'd realy be interested to see some screens of your models.

bernd
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

Re: FEM: How to create model with multiple materials

Post by lambda »

Hi,

thanks for all the answers. I never came across compsolids in FreeCAD, but I guess I will find what I need to know by searching for that term. The computer I use FreeCAD on is not connected to the internet, but I will copy over the model giving the error.

The models are really simple (or should I say abstract - I'm cutting them down to only the really relevant features), just a closed polyline, extruded and different boundary conditions applied to the faces. The problems I'm solving usually relate to thermal properties of buildings (sorry I don't know the english term, in german: Laibungsdämmung, Mauerrücksprung, etc.). but also other areas where I need to interpret the images of thermal cameras. Just today I try to figure out with thermal resolution do I need to track the pipes of a district heating plant burried 1.2 meters in the ground.

Harald
Christoph
Posts: 55
Joined: Fri Jul 08, 2016 9:02 pm

Re: FEM: How to create model with multiple materials

Post by Christoph »

Hi Harald,
FreeCAD Fem Workbencb can calculate temperature distributions using thermo mechanic, i.e. it should be possible to display the temperature distribution in building envelopes (thermal bridges as concrete floores, corners etc.). But its not possible to display heat flux density or calculate mean heat flux through a wall. To get nice pictures, use the vtk postprocessing.

Regarding compsolids: https://freecadweb.org/wiki/Part_BooleanFragments
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM: How to create model with multiple materials

Post by bernd »

Hi Harald,

very interesting. As mentioned we have seen lots of electric thermomech analysis, but no one for buildings or building details. Since I'm structural engineer for concrete buildings, I'm interested in this too. Keep up us informed. We really like screen :D If you have further questions or problem is setting up the analysis, just ask. BTW: for fem it is a good idea to use a resent developer vesion since there are fixes and improvements all the time in FEM.

cheers bernd
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

Re: FEM: How to create model with multiple materials

Post by lambda »

Yes, I'm using recent version from git (0.17R12091). It seems I'm unlucky with BooleanFragments - it says my occ version is too old (from debian stable).

Attached you find a minimal example of the fused parts causing an error when writing the .inp file, that I mentioned in my initial post. I have included the FemMesh as it is quite small and maybe there is something wrong with my mesher setup. All you need to do to reproduce is to load the file, activate the analysis, select the solver object, start the solver and click "Write .inp file" button. After a few seconds there will be a message "Error in get_femelement_sets -- > femelements_count_ok() failed!" in the console.

I will post a screen or two if I have something interesting to show.

Harald
Attachments
test-fusion.fcstd
(119 KiB) Downloaded 145 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM: How to create model with multiple materials

Post by bernd »

lambda wrote: Mon Sep 25, 2017 11:11 am Yes, I'm using recent version from git (0.17R12091). It seems I'm unlucky with BooleanFragments - it says my occ version is too old (from debian stable).
Which debian. I'm still on debian jessie (no time to upgrade :o ) but I use selv compiled occt 7.0. There is 7.2 already. For boolean fragments you need at least 6.9. The oce included in debian are to old AFAIK.


lambda wrote: Mon Sep 25, 2017 11:11 amI will post a screen or two if I have something interesting to show.
cool


I'll have a look at your file later on.
Post Reply