ccxInputWriter vs. Faces

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: ccxInputWriter vs. Faces

Post by bernd »

gave the pressure on shell meshes a try. https://github.com/berndhahnebach/FreeC ... diff=split works for meshes with appropriate group data only (use gmsh mesh object and mesh inside an analysis)

BUT:
I'm facing problems. How do I get the information if a FEM mesh face is in the same direction like the geometrical face normal (the normal of the reference shape). On a plane face this is rather simple but on a half sphere it is not that easy, even more if different mesh densities are taken into account. Furthermore I have seen FEM meshes with mesh face normals flipping around ...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: ccxInputWriter vs. Faces

Post by bernd »

ulrich1a wrote:
bernd wrote:I'm surprised ccx gives some results ?!?
At least FreeCAD writes something into the Pressure constraint. And Calculix does not use the wrong references to the face numbers of the shell elements in case of shells, so it has no reason to complain.
From my point of view ccx should at least give a warning if Px (x = some volume element face number) is used on a shell mesh because on a shelll mesh it should be P(without any number), AFAI understand the documentation.
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: ccxInputWriter vs. Faces

Post by UR_ »

Hello,
this is an example inp-file from
http://www.dhondt.de/ccx_2.12.test.tar.bz2
Files in this archive should be used to validate your homemade ccx builds

You are right "shell1.inp", see line 75 ... (DLOAD section)

Code: Select all

**
**   Structure: cantilever shell.
**   Test objective: S8R elements, nodal thickness,
**                   temperature gradient.
**
*NODE, NSET=Nall
       1, -7.45058e-09, -7.45058e-09,  0.00000e+00 
       2,  5.00000e-01, -7.45058e-09,  0.00000e+00 
       3,  5.00000e-01,  5.00000e-01,  0.00000e+00 
       4, -7.45058e-09,  5.00000e-01,  0.00000e+00 
       5,  2.50000e-01, -7.45058e-09,  0.00000e+00 
       6,  5.00000e-01,  2.50000e-01,  0.00000e+00 
       7,  2.50000e-01,  5.00000e-01,  0.00000e+00 
       8, -7.45058e-09,  2.50000e-01,  0.00000e+00 
       9,  5.00000e-01,  1.00000e+00,  0.00000e+00 
      10, -7.45058e-09,  1.00000e+00,  0.00000e+00 
      11,  5.00000e-01,  7.50000e-01,  0.00000e+00 
      12,  2.50000e-01,  1.00000e+00,  0.00000e+00 
      13, -7.45058e-09,  7.50000e-01,  0.00000e+00 
      14,  1.00000e+00, -7.45058e-09,  0.00000e+00 
      15,  1.00000e+00,  5.00000e-01,  0.00000e+00 
      16,  7.50000e-01, -7.45058e-09,  0.00000e+00 
      17,  1.00000e+00,  2.50000e-01,  0.00000e+00 
      18,  7.50000e-01,  5.00000e-01,  0.00000e+00 
      19,  1.00000e+00,  1.00000e+00,  0.00000e+00 
      20,  1.00000e+00,  7.50000e-01,  0.00000e+00 
      21,  7.50000e-01,  1.00000e+00,  ,0.00000e+00 
*ELEMENT, TYPE=S8R, ELSET=Eall
     1,      1,      2,      3,      4,      5,      6,      7,      8
     2,      4,      3,      9,     10,      7,     11,     12,     13
     3,      2,     14,     15,      3,     16,     17,     18,      6
     4,      3,     15,     19,      9,     18,     20,     21,     11
*NSET,NSET=Nfixx 
1, 
4, 
8, 
10, 
13, 
*BOUNDARY
Nfixx,1,6
Nfixx,3,6
4,2,2
*MATERIAL,NAME=EL
*ELASTIC
210000,.3
*EXPANSION
12.E-6
*SHELL SECTION,ELSET=Eall,MATERIAL=EL,OFFSET=0.
0.01
*INITIAL CONDITIONS,TYPE=TEMPERATURE
Nall,273.
*NSET,NSET=Nsetm 
2, 
3, 
6, 
9, 
11,
*NSET,NSET=Nsete 
14, 
15, 
17, 
19, 
20, 
*NODAL THICKNESS
Nsetm,0.03
Nsete,0.02
5,0.02
7,0.02
12,0.02
16,0.025
18,0.025
21,0.025
*STEP,NLGEOM
*STATIC
*DLOAD
3,P,-.1
4,P,-.1
*TEMPERATURE
Nall,373.,1000.
*CLOAD
15,1,1.
*NODE PRINT,NSET=Nall
U,NT,RF
*EL PRINT,ELSET=Eall
S
*NODE FILE,OUTPUT=3D
U,NT,RF
*EL FILE
S
*END STEP
bernd wrote:How do I get the information if a FEM mesh face is in the same direction like the geometrical face normal (the normal of the reference shape).
Mesher should not flip faces, if does nevertheless, post a bug report :D
Accidently flipped faces can be checked manually by gui.
In Gmsh (gui) or Salome i've seen a functionality for flipping faces by clicking.
This should happen in rare cases.
If you design your model upwards (points->edges->faces) you have to take care about normals by yourself.
If you downgrade from solids, cad kernel should do this for you.
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: ccxInputWriter vs. Faces

Post by ulrich1a »

bernd wrote:BUT:
I'm facing problems. How do I get the information if a FEM mesh face is in the same direction like the geometrical face normal (the normal of the reference shape).
I did expecting this, but had no time to investigate.
I already had one example where I got FEM-faces, which had its normal into the wrong direction, causing trouble. This is a problem for axisymmetric elements. Old versions of calculix stopped the analysis, but newer versions only gave a warning and than wrong results. I realized this later, fortunately not too late. The solution was to revert the face in FreeCAD and make a mesh from the reverted face.
We may have to look, what the following commands give for a face and make some experiments with the mesher.

Code: Select all

App.ActiveDocument.Plane.Shape.Orientation
App.ActiveDocument.Plane.Shape.normalAt( 
normalAt should also work with sperical surfaces.

Ulrich
User avatar
Groguigui
Posts: 25
Joined: Thu Mar 09, 2017 2:13 pm
Location: Lille

Re: ccxInputWriter vs. Faces

Post by Groguigui »

We can also notice that when you remesh (but with same boundary condition) in a similar case (biaxial tensile test) freeCAD bug in ccxInputWriter : face 1 and face 3 have same nodes to apply fix constrain.

In the same way, I don't understand why with DLOAD lot of node are constrain with negative forces (like explain here http://web.mit.edu/calculix_v2.7/Calcul ... de147.html), and how ccxInputWriter can write this with CLOAD.

But maybe it is problem totally different of this subject! :lol:
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: ccxInputWriter vs. Faces

Post by bernd »

User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: ccxInputWriter vs. Faces

Post by bernd »

Just as a side note, found this today ...
UR_ wrote: Wed Apr 19, 2017 3:57 pmMesher should not flip faces, if does nevertheless, post a bug report :D
Accidently flipped faces can be checked manually by gui.
Attached an example imported from a quite expensive structural engineering tool. I assume they are not flipped inside their mesh (hopefully) and it happend somewhere during export import converting process, but it happend ...

ATM there is no tool in FEM to change the normals AFAIK. Since it is a triangel shell mesh it could be converted into Mesh and repaired and back to a FEMMesh.
screen.jpg
screen.jpg (49.91 KiB) Viewed 1481 times
fem_shell_mesh_flipped_normals.fcstd
(515.61 KiB) Downloaded 32 times
Post Reply