FEM-Hydrostatic pressure constraint help/request
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
FEM-Hydrostatic pressure constraint help/request
Hi everyone,
Here I would ask about hydrostatic pressure.
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:
https://forum.freecadweb.org/viewtopic.php?f=18&t=10692
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
OS: Windows 10
Word size of OS: 32-bit
Word size of FreeCAD: 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)
Here I would ask about hydrostatic pressure.
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:
https://forum.freecadweb.org/viewtopic.php?f=18&t=10692
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
OS: Windows 10
Word size of OS: 32-bit
Word size of FreeCAD: 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)
Re: FEM-Hydrostatic pressure constraint help/request
some info from the *DLOAD card (https://www.feacluster.com/CalculiX/ccx ... de241.html)
I think that if you are interested in (helping)programming that someone is willing to help you.
So indeed *DLOAD is the right one for creating hydrostatic pressure constraints.The surface loading is entered as a uniform pressure with distributed load type label Px where x is the number of the face. Thus, for pressure loading the magnitude of the load is positive, for tension loading it is negative. For nonuniform pressure the label takes the form PxNUy, and the user subroutine dload.f must be provided. The label can be up to 20 characters long. In particular, y can be used to distinguish different nonuniform loading patterns (maximum 16 characters). A typical example of a nonuniform loading is the hydrostatic pressure.
I think that if you are interested in (helping)programming that someone is willing to help you.
Re: FEM-Hydrostatic pressure constraint help/request
I have just checked github and the presure constraint is defined here:
https://github.com/FreeCAD/FreeCAD/blob ... essure.cpp
https://github.com/FreeCAD/FreeCAD/blob ... Pressure.h
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...
https://github.com/FreeCAD/FreeCAD/blob ... essure.cpp
https://github.com/FreeCAD/FreeCAD/blob ... Pressure.h
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...
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.
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.
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.
See https://github.com/FreeCAD/FreeCAD/blob ... #L119-L126 or FEM_Tutorial_Python for how to add constraints by Python.
Such a macro could even be integrated as an utility into FreeCAD FEM master
See https://github.com/FreeCAD/FreeCAD/blob ... #L119-L126 or FEM_Tutorial_Python for how to add constraints by Python.
Such a macro could even be integrated as an utility into FreeCAD FEM master
Re: FEM-Hydrostatic pressure constraint help/request
load the file run the code ...
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 ...
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()
- Attachments
-
- hydrostatic-pressure.FCStd
- (18.06 KiB) Downloaded 120 times
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.
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.
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.
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
Paul
Re: FEM-Hydrostatic pressure constraint help/request
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?