"Constraint Body Heat Source" implemented yet?

About the development of the FEM module/workbench.

Moderator: bernd

stair
Posts: 5
Joined: Fri May 25, 2018 10:01 am

"Constraint Body Heat Source" implemented yet?

Post by stair »

Thanks for all the great work in getting FreeCAD 0.17 out, it is becoming truly useful :)

A simple question, attempting to edit a "Constraint Body Heat Source" object does not bring up the expected selection panel therefore I assume that actually creating a body heat source has not yet been implemented, or am I missing something?

Thanks
Stair

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13522 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 3bb5ff4e70c0c526f2d9dd69b1004155b2f527f2
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: "Constraint Body Heat Source" implemented yet?

Post by bernd »

AFAIK ther is jut no task panel, input the heat source in the property editor. It is just a nomber.
stair
Posts: 5
Joined: Fri May 25, 2018 10:01 am

Re: "Constraint Body Heat Source" implemented yet?

Post by stair »

Thanks for the reply.

In that case I don't understand the function of Constraint Body Heat Source, I thought it is the heat sourced from a solid body, in Elmer terms Body Forces:Heat Source, so I am expecting 2 parameters, the ID of the solid and the the heat in W/m^3 or W/kg

Since there is nothing yet in the Wiki please could you explain the how to use this constraint, if the number entered is the heat source how do you define what it refers to

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

Re: "Constraint Body Heat Source" implemented yet?

Post by bernd »

HoWil wrote:
he should know!
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: "Constraint Body Heat Source" implemented yet?

Post by HoWil »

bernd wrote: Fri May 25, 2018 11:47 am AFAIK ther is jut no task panel, input the heat source in the property editor. It is just a nomber.
stair wrote: Fri May 25, 2018 10:23 am t the heat source in the property edito
Hi Bernd, Hi stair,
BodyHeatSource was implemented during last GSoC (see also https://forum.freecadweb.org/viewtopic. ... ux#p188021) but it seams to be broken. I remember discussions with Markus about dividing the flux value by the density of the domain because of the way the flux is handled in Elmer.
I have built a simple model where I wanted to use this constraint. If I include the constraint into my analysis than the sif-writer does not start! If I exclude it and insert e.g. a HeatFlux onto one surface, everything works fine.
So I think simply this constraint is not working and blocking somehow the execution of the complete analysis.
BR,
HoWil
Attached you find my model including a Heatflux via a surface and the not working BodyHeatSource constraint which is excluded from the analysis and can be drag-n-drop inserted into the analysis.
Attachments
FC_heat_flux_example.fcstd
(230.59 KiB) Downloaded 89 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: "Constraint Body Heat Source" implemented yet?

Post by bernd »

stair wrote: Fri May 25, 2018 10:23 am A simple question, attempting to edit a "Constraint Body Heat Source" object does not bring up the expected selection panel therefore I assume that actually creating a body heat source has not yet been implemented, or am I missing something
There is no task panel implemented at all, see https://github.com/FreeCAD/FreeCAD/blob ... tSource.py



HoWil wrote: Sun May 27, 2018 2:26 pm BodyHeatSource ... seams to be broken. I remember discussions with Markus about dividing the flux value by the density of the domain because of the way the flux is handled in Elmer.
The BodyHeatSource object defines a property "HeatSource" : https://github.com/FreeCAD/FreeCAD/blob ... rce.py#L39

but the elmer writer tries to access a property "HeatFlux" : https://github.com/FreeCAD/FreeCAD/blob ... er.py#L268 which does not exist in the BodyHeatSource object.

This could be easily fixed by replacing HeatFlux with HeatSource (which I will include in my next PR, https://github.com/berndhahnebach/FreeC ... aa9f301b08 ), but I do neither know about the unit nor about the correct further handling of elmer.

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

Re: "Constraint Body Heat Source" implemented yet?

Post by bernd »

IMHO, the units should be correct too. https://github.com/berndhahnebach/FreeC ... 1c63550c67

@wlifried, would it be possible to check if your example gives reasonable results? You could fix your elmer writer temporary yourself to test?
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: "Constraint Body Heat Source" implemented yet?

Post by HoWil »

bernd wrote: Tue May 29, 2018 4:13 pm You could fix your elmer writer temporary yourself to test?
I changed it locally and the simulation runs now.
bernd wrote: Tue May 29, 2018 4:13 pm @wlifried, would it be possible to check if your example gives reasonable results?
The unit for HeatSource in writer.py is "W/kg" which suggests that one has to divide the introduced specific heat energy given in W/m³ by the density of the domain given in kg/m³.
Right now I do not have an idea how to test the constraint, since the HeatSource is applied to the complete simulation domain. I guess there was a reason why Markus did not add a domain-selection to this constraint.
BR,
HoWil
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: "Constraint Body Heat Source" implemented yet?

Post by HoWil »

HoWil wrote: Tue May 29, 2018 6:21 pm I guess there was a reason why Markus did not add a domain-selection to this constraint.
@Bernd
What do you think, should we introduce a domain selection for the heat source?
I manually disabled the heat-source (body-force) in the exported .sif and I get qualitatively resonable results... Please see the attached screenshot where the inner domain is heated...
Screenshot from 2018-05-29 20-40-56.png
Screenshot from 2018-05-29 20-40-56.png (606.56 KiB) Viewed 2722 times
@stair,
I will try to rebuild the original Elmer tutorial model from over here http://www.nic.funet.fi/index/elmer/doc ... orials.pdf (p4..."Heat equation – Temperature field of a solid object").
BR,
HoWil
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: "Constraint Body Heat Source" implemented yet?

Post by bernd »

HoWil wrote: Tue May 29, 2018 6:49 pm @Bernd
What do you think, should we introduce a domain selection for the heat source?
adding the References property to the object and the selection widget to the objects task panel is simple, I could do this. But who does the elmer writer implementation? I have no glue how this would work, and not a strong interest to spend much time on this either :shock: .
Post Reply