Transient FEM: Variable heat flux (or starting from previous result)

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
SoyCaliper
Posts: 3
Joined: Thu Jul 19, 2018 9:44 am

Transient FEM: Variable heat flux (or starting from previous result)

Post by SoyCaliper »

Hi, everyone.

First of all thank you to everyone who contributes to FreeCAD and the FEM workbench! It was/is a joy to see how FreeCAD evolves and has become an extremely capable and user friendly software.

I have been experimenting a bit with the FEM workbench, as it may be useful to simulate a thing I am dealing with at work. More specifically "transient thermomechanical simulations".
I have followed the tutorials on the website, and I am starting to get the hang of python scripting.


What I am looking for is a method to vary the heat-flux constraint.
Essentially I have a block of material which experiences a heat flux on one side and heats up for some time. That works great. But then i would like to investigate how it cools down again.

So my question is: Is it possible to turn off, or vary the heat flux?


If not, is it possible to use the result of a transient simulation as a starting point for a new simulation? In that way, I could heat up the block for x seconds, and then start a new simulation with the heat flux constraint switched off.
But I can't seem to find a way to start a new simulation from a "result" object.

Maybe I am overlooking something.

Thanks for any any advice or pointing me in the right direction!
User avatar
NewJoker
Veteran
Posts: 3021
Joined: Sun Oct 11, 2020 7:49 pm

Re: Transient FEM: Variable heat flux (or starting from previous result)

Post by NewJoker »

In CalculiX you can use amplitude to specify any time variation of heat flux. Another way would be to define multiple steps. However, both approaches require manual addition of appropriate keywords to the inp file exported from FreeCAD.
SoyCaliper
Posts: 3
Joined: Thu Jul 19, 2018 9:44 am

Re: Transient FEM: Variable heat flux (or starting from previous result)

Post by SoyCaliper »

Thanks! This seems to work!


For anyone googling this in the future, some info the amplitude thing in the inp file.
https://web.mit.edu/calculix_v2.7/Calcu ... de161.html

And an example of how to actually apply it:
https://web.mit.edu/calculix_v2.7/Calcu ... de188.html

I've noticed that if you investigate a result file, you can't rerun the .inp file, but have to rewrite it, overwriting your manual changes. Maybe this is a bug?



A new thing to figure out is how to add custom timestamps at specific times.
With a constant heat source I had evenly spaced result objects in time. But with the new variable heat flux, the time steps inbetween results seem to be randomly bigger after a few steps.
I'm especially interested in the time around the moment where the heat gets turned off. Paraview interpolates between results, so this may cause trouble.

It seems I have to get deeper into Calculix.
User avatar
NewJoker
Veteran
Posts: 3021
Joined: Sun Oct 11, 2020 7:49 pm

Re: Transient FEM: Variable heat flux (or starting from previous result)

Post by NewJoker »

Check the *TIME POINTS keyword, it does exactly what you are looking for.
SoyCaliper
Posts: 3
Joined: Thu Jul 19, 2018 9:44 am

Re: Transient FEM: Variable heat flux (or starting from previous result)

Post by SoyCaliper »

Tanks, that works great!

For future googlers who are looking for this:

The *TIME POINTs statement:
https://web.mit.edu/calculix_v2.7/Calcu ... de252.html
This has to be written before the *STEP command (took a while to figure that out)

Then you have to give a TIME POINTS argument to the *NODE FILE command at the end like this:
https://web.mit.edu/calculix_v2.7/Calcu ... de224.html

Same for the EL FILE and NODE PRINT commands.
Post Reply