test request, new constraints, including contact and thermomechanical analysis
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
test request, new constraints, including contact and thermomechanical analysis
I have been spending some time to rebase the development which was done by the forum member vdwalts and makkemal. Here we are, lot's of improvements to the FEM module. There where some threads about the new tools already. This topic takes it all together rebased on master. I would like to get feedback before I'm gone make a pull request.
cheers bernd
branch:
https://github.com/berndhahnebach/FreeC ... onstraints
new tools and features:
- new constraints
-- constraint contact
-- constraint plane rotation
-- constraint temperature
-- constraint heatflux
-- constraint initial temperature
- new analysis
-- thermomechanical analysis
- new calculix solverattributes
-- nonlinear geometry
-- max iterations
-- matrix solver type
- reference selection improvements
-- constraint pressure
-- constraint displacement
- results
-- add shear stress and prinzipal stress
-- make a widget for user defined result calculations
cheers bernd
branch:
https://github.com/berndhahnebach/FreeC ... onstraints
new tools and features:
- new constraints
-- constraint contact
-- constraint plane rotation
-- constraint temperature
-- constraint heatflux
-- constraint initial temperature
- new analysis
-- thermomechanical analysis
- new calculix solverattributes
-- nonlinear geometry
-- max iterations
-- matrix solver type
- reference selection improvements
-- constraint pressure
-- constraint displacement
- results
-- add shear stress and prinzipal stress
-- make a widget for user defined result calculations
Re: test request, new constraints, including contact and thermomechanical analysis
example file plane rotation:
example file theromomechanical analysis:
example file contact:
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: test request, new constraints, including contact and thermomechanical analysis
Just have launched a build, by the end of the day I shall be able to report some feedback
Re: test request, new constraints, including contact and thermomechanical analysis
I attach an example of transient thermal analysis.
Plotting the Max temp over time gives the following
Code for plot
Plotting the Max temp over time gives the following
Code for plot
Code: Select all
"""
import FreeCAD
import numpy as np
import matplotlib.pyplot as plt
#Get list of anylysis memebers
members=FreeCAD.ActiveDocument.Analysis.Member
time=[]
temp=[]
for member in members:
if member.isDerivedFrom("Fem::FemResultObject"):
memresult=member
#Check first object and toggle visibility to oppesite
# P1=np.array(memresult.PrincipalMax)
# P2=np.array(memresult.PrincipalMed)
# P3=np.array(memresult.PrincipalMin)
# Von=np.array(memresult.StressValues)
T=np.array(memresult.Temperature)
# dispvectors=np.array(memresult.DisplacementVectors)
# x=np.array(dispvectors[:, 0])
# y=np.array(dispvectors[:, 1])
# z=np.array(dispvectors[:, 2])
#Print messages for testing
#FreeCAD.Console.PrintMessage(str(member.Name)+" \n")
#FreeCAD.Console.PrintMessage(str(member.Time)+" \n")
#Save the value you need
time.append(member.Time)
temp.append(max(T))
# plot with various axes scales
plt.figure(1)
plt.plot(time,temp)
plt.title('Maximum Temprature vs time')
plt.xlabel('Time (S)')
plt.ylabel('Temprature (K)')
plt.show()
- Attachments
-
- thermal transient.fcstd
- (62.57 KiB) Downloaded 98 times
Re: test request, new constraints, including contact and thermomechanical analysis
Static contact test
- Attachments
-
- Contact test(Cylinder).fcstd
- (354.66 KiB) Downloaded 176 times
Re: test request, new constraints, including contact and thermomechanical analysis
Compiles and passes all self tests on Win x64. I'll run the provided examples, so far looks good. Thanks for the work everybody
"fight the good fight"
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: test request, new constraints, including contact and thermomechanical analysis
I have been able to make it works on Xenial too. (ubuntu 64bits).sgrogan wrote:Compiles and passes all self tests on Win x64. I'll run the provided examples, so far looks good. Thanks for the work everybody
Bernd, just a quick Feedback, I am a little bit lost on how we setup the thermal property. I am a daily user of a code called Flotherm from Mentor, and most of the time the process on thermal is as follow
-> Select volume material -> which is providing thermal conductivity/heat capacity and surface finishing is providing thermal resistance at the boundaries
-> Allocate a heat flux in Watts (I know, this is for electronic engineers ) to the volume instead of a face
-> Warm it up (aka run the simulation)
Re: test request, new constraints, including contact and thermomechanical analysis
The thermal properties (thermal conductivity and heat capacity) are a material property and has been added to materials section.Bernd, just a quick Feedback, I am a little bit lost on how we setup the thermal property. I am a daily user of a code called Flotherm from Mentor, and most of the time the process on thermal is as follow
-> Select volume material -> which is providing thermal conductivity/heat capacity and surface finishing is providing thermal resistance at the boundaries
-> Allocate a heat flux in Watts (I know, this is for electronic engineers ) to the volume instead of a face
-> Warm it up (aka run the simulation)
The heat transfer coefficient is a value the user needs to add (calculate by some other means taking surface finish into account)
The finite element the calculates the temperature and deformations. This the way Calculix handles the calculation (All commercial FEM code I have used does the same). Please note stresses and temperate are calculated simultaneously which is different than just a thermal calculation
I suspect Flowtherm is a finite volume method which would have a totally different approach the the problem.
Re: test request, new constraints, including contact and thermomechanical analysis
A simple clamped beam problem to explain why you would want Thermomechanical analysis attached.
The beam is clamped thus preventing thermal expansion.(which induces stress)
The same heat transfer coefficient is applied to each end although different ambient temperature is specified.
The beam reaches a steady state temperature between the two ambient temperatures but due the lack of thermal expansion results in a constant stress across the beam.
In industrial power plants you have steam running through pipes, various books exist that specify heat transfer coefficient for different steam conditions. If you ramp you steam temperature up or down to fast it will results in a broken, by specifying the heat transfer and running transients problematic operating conditions can be identified through simulation(when one section does not heat up a fast as another section)
The beam is clamped thus preventing thermal expansion.(which induces stress)
The same heat transfer coefficient is applied to each end although different ambient temperature is specified.
The beam reaches a steady state temperature between the two ambient temperatures but due the lack of thermal expansion results in a constant stress across the beam.
In industrial power plants you have steam running through pipes, various books exist that specify heat transfer coefficient for different steam conditions. If you ramp you steam temperature up or down to fast it will results in a broken, by specifying the heat transfer and running transients problematic operating conditions can be identified through simulation(when one section does not heat up a fast as another section)
- Attachments
-
- Beam_clamped.fcstd
- (14.62 KiB) Downloaded 88 times
Re: test request, new constraints, including contact and thermomechanical analysis
I've tested all the examples, and although I don't fully understand how everything works yet, I don't get crashes and everything appears to work as advertised. Unless others have issues I think a pull request soon would be good so bernd doesn't have to go through the rebase exercise again.
Thanks again all involved lots more tools to play with
Thanks again all involved lots more tools to play with
"fight the good fight"