Units, trying to get correct results with Calculix

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
dubstar-04
Posts: 446
Joined: Mon Mar 04, 2013 8:41 pm
Location: Manchester, UK
Contact:

Re: Units, trying to get correct results with Calculix

Postby dubstar-04 » Tue Oct 14, 2014 11:53 am

shoogen wrote:The GUI will have nice units. But we really need to sort out the units we pass to the solver and we get back from the solver.
imo The most appropriate units for the solver are SI units. N, M, Pa.

from experience the solvers generally don't understand units so you could even have the user select what units they want.

Something Like:

GUI:
Force N
Mesh m (mm)

Solver:
Force N
Mesh m (mm)
Stress N/m^2 or Pa (N/mm^2 or MPa)

As long as the information is passed to the solver and the GUI knows what to expect in return.

Am i over simplifying this?
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Units, trying to get correct results with Calculix

Postby shoogen » Tue Oct 14, 2014 12:17 pm

dubstar-04 wrote:Am i over simplifying this?
I think so. First of all please don't pick SI units. Either you use the whole SI-System or don't mention that some of the units you pick are part of the SI-Sytem. The question is which are base units and which are derived ones. As soon as you make mm the length unit, you leave the SI-System behind. To make your new system consistent you need to change all derived units that have a dimension "length" to get coherent derived unit.


The unit system used "for" the solver should be consistent.
dubstar-04 wrote:from experience the solvers generally don't understand units so you could even have the user select what units they want.
The fact that the solvers don't recognize units, does not mean that the programmer or user can do what he/she wants. All the solvers manuals tell to use consistent unit systems.

On letting the user choose: This is second step. The first step is to provide a usable and scientifically correct default.
This means that if someone later decides to use calculix for fluid simulations, he can still use our unit system.
If this works well we can make the units user configurable. But to me this would mean to check if the user selected/provided a consistent unit system and to refuse to work if he/she did otherwise.
User avatar
jriegel
Site Admin
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Units, trying to get correct results with Calculix

Postby jriegel » Sat Nov 22, 2014 1:04 pm

We need to port FEM to the Units framework of FreeCAD. There we can interprete all kind of units and translate it into a know system. That means also the Material DB. There we need to add a Unit to all constances...
Stop whining - start coding!
User avatar
TT-RS
Posts: 70
Joined: Fri Oct 24, 2014 9:19 pm

Re: Units, trying to get correct results with Calculix

Postby TT-RS » Fri Nov 28, 2014 4:08 pm

kwahoo wrote:Any consistent unit system should be ok.
Exactly. I recommend SI units system.
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Units, trying to get correct results with Calculix

Postby shoogen » Fri Nov 28, 2014 4:30 pm

TT-RS wrote:I recommend SI units system.
{m,kg,s,K}
That wouldn't work with FreeCAD. You would need to rescale all meshes to convert them from Millimeters to Meters.
I mean you could implement that. But then you would use different meshes just for FEM. To me this would be far worse then using {mm,N,s,K} or {mm,kg,s,K}
kwahoo
Posts: 267
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Units, trying to get correct results with Calculix

Postby kwahoo » Sat Mar 28, 2015 10:47 am

kwahoo wrote: It is an I-beam HEB100, 1000mm length. One end fixed, other end 10 000N force along Y. The results (confirmed by Z88 FEM tool) should be:
Name Ix Iy Wx Wy ix iy
cm4 cm3 cm
100 HEB 450 167 90 33 4,2 2,53

Wx=90000mm^3
M=F*l=10000N*1000mm=10000000Nmm
Sig=M/W=10000000Nmm/90000mm^3=111N/mm^2=111MPa
f=F*l^3/(3*E*J)
f=10000N*(1000mm)^3/(3*206000N/mm^2*4.5*10^6mm^4)=3.6mm
Ok, the latest build (the devfem2 branch) gives me 3.84mm displacement (pretty good) and 184 MPa max von Mises-Huber stress. 184 vs 111 looks like a huge error, but in fact the highest stresses are only visible in corner nodes, near to the fix constraint.
User avatar
bernd
Posts: 9272
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Units, trying to get correct results with Calculix

Postby bernd » Sat Mar 28, 2015 5:07 pm

kwahoo wrote:Ok, the latest build (the devfem2 branch) gives me 3.84mm displacement (pretty good) and 184 MPa max von Mises-Huber stress. 184 vs 111 looks like a huge error, but in fact the highest stresses are only visible in corner nodes, near to the fix constraint.

You could check with gcx, the stress in lenth direction of the beam. Its Szz in your case,I think. Would be interesting if this fits better. By the way do you have netgen running on linux?
Last edited by bernd on Tue Apr 07, 2015 6:01 am, edited 3 times in total.
kwahoo
Posts: 267
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Units, trying to get correct results with Calculix

Postby kwahoo » Sat Mar 28, 2015 7:40 pm

bernd wrote:
kwahoo wrote:By the way do you have netgen running on linux?
Yes, FreeCAD compiled with BUILD_FEM_NETGEN. Works only with oce-0.15.x.
User avatar
bernd
Posts: 9272
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Units, trying to get correct results with Calculix

Postby bernd » Tue Apr 07, 2015 6:01 am

Bernd wrote:
kwahoo wrote:Ok, the latest build (the devfem2 branch) gives me 3.84mm displacement (pretty good) and 184 MPa max von Mises-Huber stress. 184 vs 111 looks like a huge error, but in fact the highest stresses are only visible in corner nodes, near to the fix constraint.
You could check with gcx, the stress in lenth direction of the beam. Its Szz in your case,I think. Would be interesting if this fits better. ..
Did it, and it really fits better :D . Calculated the beam provided of your first post in FreeCAD an opened the resultfile in cgx the resultviewer of CalculiX. Stress Szz which is equivalent to the calculated stress of the beam theory shows pretty much what you have calculated by beam theory. The orange is 107 to 123 MPa. Average of the orange area would be 115 which is pretty much near to 111 MPa.
Attachments
kwascreen12.jpg
kwascreen12.jpg (70.65 KiB) Viewed 2408 times
ulrich1a
Posts: 1920
Joined: Sun Jul 07, 2013 12:08 pm

Re: Units, trying to get correct results with Calculix

Postby ulrich1a » Sun May 10, 2015 1:27 pm

I had a look into the beam-case and I found that FreeCAD shows the Mises-stress about 40% higher than cgx does from the same frd-file.
Are there different formulas to calculate the Mises-stress? Or there must be a bug in one of the programs.
I could confirm this with a simple other FEM-case.

Ulrich

OS: Debian GNU/Linux 8.0 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.4947 (Git)
Build type: Release
Branch: remotes/origin/master
Hash: 13070cbe23f80a6f739b8bb89a28fe0e005d51c7
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17