About the development of the FEM module/workbench.

Moderator: bernd

UR_
Posts: 1184
Joined: Tue Jan 03, 2017 8:42 pm

### Re: non uniform distributed load

You are right, i noticed this too.
I think major waste of time is object adding (to tree).
I will have a look at curveWB, perhaps i can find the place where Chris_G does the magic.
Chris_G wrote:ping
@Chris_G, can we please have a hint from Premier League
Chris_G
Posts: 1313
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

### Re: non uniform distributed load

UR_ wrote:
Wed May 02, 2018 7:45 pm
I think major waste of time is object adding (to tree).
Hi,
you will probably get much faster rendering by adding directly your stuff in the coin SceneGraph().
Here is an example :

Code: Select all

``````import FreeCAD
import Part
from pivy import coin

NUM = 10

# create a sample curve

poles0 = [Vector (-2.207077980041504, -0.4698541462421417, 0.0), Vector (-1.3755598068237305, 1.137541651725769, 0.0), Vector (0.10200775414705276, 1.2364583015441895, 0.0), Vector (1.397197961807251, -0.0834609717130661, 0.0)]
weights0 = [1.0, 1.0, 1.0, 1.0]
knots0 = [0.0, 1.0]
mults0 = [4L, 4L]
periodic0 = False
degree0 = 3
rational0 = False
bs0 = Part.BSplineCurve()
bs0.buildFromPolesMultsKnots(poles0, mults0, knots0, periodic0, degree0)
edge = bs0.toShape()
obj0.Shape = edge

# compute sample points

parameters = [float(i)/NUM for i in range(NUM+1)]
poc = [edge.valueAt(p) for p in parameters] # poc = points on curve
nor = [edge.valueAt(p)+edge.normalAt(p) for p in parameters] # nor = normals

# here is the coin stuff

coinVec = list()
indexes = list()
for i in range(NUM+1):
coinVec.append(coin.SbVec3f(poc[i].x,poc[i].y,poc[i].z))
coinVec.append(coin.SbVec3f(nor[i].x,nor[i].y,nor[i].z))
indexes.extend([i*2,1+i*2,-1])

# indexes = [0, 1, -1, 2, 3, -1, 4, 5, -1, 6, 7, -1, 8, 9, -1, 10, 11, -1, 12, 13, -1, 14, 15, -1, 16, 17, -1, 18, 19, -1, 20, 21, -1]
# the -1 index value is a break in the polyline

node = coin.SoSeparator()
pts = coin.SoCoordinate3()
lineset = coin.SoIndexedLineSet()

pts.point.setValues(0,len(coinVec),coinVec)
lineset.coordIndex.setValues(0,len(indexes),indexes)

#sg.removeChild(node)

``````
http://www-evasion.imag.fr/Membres/Fran ... index.html
UR_
Posts: 1184
Joined: Tue Jan 03, 2017 8:42 pm

### Re: non uniform distributed load

Chris_G wrote:
Wed May 02, 2018 9:26 pm
Here is an example
Thanks!
Will have a look at this.
Thank you very much!
UR_
Posts: 1184
Joined: Tue Jan 03, 2017 8:42 pm

### Re: non uniform distributed load

[/quote]
Wed May 02, 2018 5:52 pm
Is there a possibility to speed this up?
Now it's a little bit faster.
So no more coffee breakes!

hardcoded user input is presetted for example file from here:

phpBB [video]
Posts: 1628
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

### Re: non uniform distributed load

UR_ wrote:
Sun May 06, 2018 5:21 pm
no problem...
relax.jpg (88.73 KiB) Viewed 665 times
Taufeeq2
Posts: 18
Joined: Fri Mar 30, 2018 12:39 pm

### Re: non uniform distributed load

there is a routine here http://web.mit.edu/calculix_v2.7/Calcul ... de190.html
But i dont know how to incoporate it in freecad
Jee-Bee
Posts: 2012
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

### Re: non uniform distributed load

*DLOAD is the presure constraint in FreeCAD. only when applaying non uniform distributed load load you have to use the script somwhere in this topic
Posts: 1628
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

### Re: non uniform distributed load

UR_ wrote:
Sun May 06, 2018 5:21 pm
Now it's a little bit faster.
So no more coffee breakes!
Yep. Writing the load needs only seconds. Very nice!
intze_tank.JPG (88.74 KiB) Viewed 620 times
Pep
Posts: 3
Joined: Fri Sep 20, 2019 12:12 pm

### Re: non uniform distributed load

Hey everyone,

I was trying to use this, since it would be extremely useful to me. However, when I run it, it computes as if there is no load distribution. The report contains the following errors:

...
Pressure on shell mesh at the moment only supported for meshes with appropriate group data.
...
PySide2.QtCore.QProcess.ProcessState.NotRunning
PySide2.QtCore.QRegExp('\*ERROR.*\n\n', 1, 0)
...

with only the first one being red. Anyone knows what is going wrong here?
bernd
Posts: 9853
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

### Re: non uniform distributed load

would you send the file you tested with, a link to the code you used and you freecad version info. than we could try to reproduce your problem