## FEM-Hydrostatic pressure constraint help/request

About the development of the FEM module/workbench.

Moderator: bernd

-alex-
Posts: 275
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

### FEM-Hydrostatic pressure constraint help/request

Hi everyone,

In FEM WB there is a pressure constraint FEM_ConstraintPressure , but as far as I know there is no any hydrostatic pressure constraint.
I did not find relevant information on the forum for the least, I only found informations about the DLOAD card concerning the actual pressure constraint:

As far I am concerned when I need to achieve such kind of analysis I split a shell model, lets say a tank filled with concrete, then I apply a pressure at each level following the well known formula: P = density x gravity x height = Rho x G x H.
But it's a rough way to do, pretty fastidious, maybe there is actually a more easy way to do by using FEM WB, I don't know, tell me.
Below is a picture illustrating what I'm talking about.

If such hydrostatic feature doesn't exist, maybe one could code it?
Just a though: I assume a feature like this one should include a reference plane or surface to define the height level 0. The DLOAD card would be weighed by the Rho*G*H value. The height would be about the distance from the reference plane up to the center of the tetraedral element witch is concerned, following the normal direction of reference plane.
BTW, I have no skills concerning programming, so... now I let talk FEM WB gurus

Alex

Hydrostatic-pressure-tank-concrete.png (356.91 KiB) Viewed 714 times
Hydrostatic-pressure-tank.FCStd

OS: Windows 10
Word size of OS: 32-bit
Version: 0.19.16502 (Git)
Build type: Release
Branch: master
Hash: 06962535fa9ff348acca1b893cc4239908fb8bae
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: French/France (fr_FR)
Jee-Bee
Posts: 1979
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

### Re: FEM-Hydrostatic pressure constraint help/request

some info from the *DLOAD card (https://www.feacluster.com/CalculiX/ccx ... de241.html)
So indeed *DLOAD is the right one for creating hydrostatic pressure constraints.
I think that if you are interested in (helping)programming that someone is willing to help you.
Jee-Bee
Posts: 1979
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

### Re: FEM-Hydrostatic pressure constraint help/request

I have just checked github and the presure constraint is defined here:

I think that best is to add some options that are only needed for non-uniform distribututed loads. But i'm not well known with this kind of stuff that i know what other properties or methods are...
bernd
Posts: 8741
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

### Re: FEM-Hydrostatic pressure constraint help/request

Mhh what we need would be a linear distributed pressure load. The hydrostatic pressure would just be one special case of this. For this we would need to calculate any DLOAD for any fe mesh face of the gemetrical face the load is applied too. We gone do similar calculations for force constraint but for nodes. Means it is doable.

It might be even simpler to archive this by the use of force constraint or a copy of force constraint.

First of all we need to define how would such load be defined.
bernd
Posts: 8741
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

### Re: FEM-Hydrostatic pressure constraint help/request

Probably the fastest and easiest solution would be a macro which creates constraints force or constraint pressure with different loads. This should be straight forward and doable even with little knowledge of Python.

Such a macro could even be integrated as an utility into FreeCAD FEM master
bernd
Posts: 8741
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

### Re: FEM-Hydrostatic pressure constraint help/request

load the file run the code ...

Code: Select all

``````from ObjectsFem import makeConstraintPressure as make_pressure
doc = App.ActiveDocument
max_pressure = 11000
for i, f in enumerate(doc.Cut.Shape.Faces):
pobj = make_pressure(doc)
pobj.Pressure = max_pressure * (len(doc.Cut.Shape.Faces) - i) / len(doc.Cut.Shape.Faces)
pobj.References = [(doc.Cut, ('Face{}'.format(i + 1)))]

doc.recompute()
``````
may be the load value calculation could improved. If cutting the face is done by Python too all is fully parametric ... BTW an array might be faster than 10 clones ...
Attachments
hydrostatic-pressure.FCStd
-alex-
Posts: 275
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

### Re: FEM-Hydrostatic pressure constraint help/request

Thank you guys for advises and to show me the way. I would like to progress about programming and learning python, however as I'm concerned that's a huge challenge because of my newbie skills... I hope I will overcome by improving my very tiny skills in programming.
bernd wrote:
Thu Jul 11, 2019 10:18 am
load the file run the code ...
Works like a charme
That's a way to ease the processe concerning simple splited models, BTW I don't understand more than 10% of your code
Anyway, I'll focus about your previous posts concerning the way to deal with DLOAD on mesh faces and so on.
paul18
Posts: 174
Joined: Sat Jul 19, 2014 7:44 pm
Location: France

### Re: FEM-Hydrostatic pressure constraint help/request

in section 6 of calculix/ccx doc (see pages 303, 304, 306), you'll see that pressure is not applied as it stand, but through nodal forces instead so that the loading remains energetically equivalent; by linear interpollation I guess, you've to find the right values so that the force is the one resulting from the hydrostatic pressure, haven't you?

Paul
Jee-Bee
Posts: 1979
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

### Re: FEM-Hydrostatic pressure constraint help/request

paul18 wrote:
Sat Jul 13, 2019 4:31 pm
in section 6 of calculix/ccx doc (see pages 303, 304, 306),
Please can you add a link to right topic of here " http://feacluster.com/CalculiX/ccx_2.13/doc/ccx/ " since section and page numbers can change per version?
paul18
Posts: 174
Joined: Sat Jul 19, 2014 7:44 pm
Location: France

### Re: FEM-Hydrostatic pressure constraint help/request

I've been speaking about the latest release
http://www.dhondt.de/ccx_2.15.pdf

Paul