In different examples, I have 2d plane stress and axisymmetric elements where I create the geometry containing multiple surfaces and then mesh them with cgx. But I am having trouble with element orientations. I have multiple surfaces and I cannot make sure elements for all of these surfaces share same orientation. Even when orientation for one surface is different ccx won’t solve. I was able to solve this by ‘flip surf_name auto’ command but I updated to a newer version of CalculiX and this doesn’t work anymore. I need to find another combination of surfaces to use with flip command. When you have automated scripts this becomes a huge problem.
Is there a simple method with cgx to make sure orientation of elements for all surfaces are the same?
Yes, 2.20. The older version (1.18?) also had it bu I added several flip x auto commands to make it work. İn 2.20 these don’t work anymore. Probably need some other combination of surfaces to flip. Thus I wonder if there is a better and sure way to insure shared orientation across elements of all surfaces. Thank you.
Thank you for the reply. I wasn’t aware of this solution. I will try and report back.
I was trying to correct orientations in cgx, as shown in following image\ and thought that’s where this issue needs to be resolved.
I had time to try this on an example case. However, I could not get it to work. Following are my files (pre.fbd; run.inp). I appreciate if you can take a look. When I uncomment FLIP commands it works. With FLIP commands commented out inp run exit with errors.
pre.fbd
#
## Geometry
#
# Points
PNT P_origin 0 0 0
PNT P0 0 250 0
PNT P1 50 250 0
PNT P2 50 200 0
PNT P3 50 150 0
PNT P4 50 100 0
PNT P5 50 50 0
PNT P6 0 50 0
PNT P7 0 100 0
PNT P8 0 150 0
PNT P9 0 200 0
# Lines
LINE L1 P0 P1
LINE L2 P1 P2
LINE L3 P2 P3
LINE L4 P3 P4
LINE L5 P4 P5
LINE L6 P5 P6
LINE L7 P6 P7
LINE L8 P7 P8
LINE L9 P8 P9
LINE L10 P9 P0
LINE L11 P2 P9
LINE L12 P3 P8
LINE L13 P4 P7
LINE L14 P5 P6
# Line divisions.
DIV L1 10
DIV L2 10
DIV L3 10
DIV L4 10
DIV L5 10
DIV L6 10
DIV L7 10
DIV L8 10
DIV L9 10
DIV L10 10
DIV L11 10
DIV L12 10
DIV L13 10
DIV L14 10
# Line set definitions.
SETA Lset1 l L1 L2 L10 L11
SETA Lset2 l L3 L9 L11 L12
SETA Lset3 l L4 L8 L12 L13
SETA Lset4 l L5 L6 L7 L13
# Create surfaces based on line sets.
SURF S1 Lset1
SURF S2 Lset2
SURF S3 Lset3
SURF S4 Lset4
# Surface set definition for meshhing.
SETA b_surf s S1 S2 S3 S4
# FLip needed to correct surface orientatons. Applicable to this specific example only.
# FLIP S1
# FLIP S4
# Rotate all surfaces so that the disk rotates about y-xis
MOVE all ROT P_origin z -90
#
## Meshing
#
# Element type is assigned to surfaces.
ELTY b_surf qu8cr
# Mesh the geometry.
MESH all
# All nodes are stored in a set.
SETA nodes n all
# Boundary condition nodes are selected from the all nodes and stored in a set.
enq nodes symm_BC rec _ 0 0 0.001 a
# Node set containing boundary condition nodes are written to a file.
SEND symm_BC abq nam
# Surface to apply load due.
SETA press l L1
COMP press do
COMP press do
SEND press abq sur
# Export nodal information to a file.
SEND nodes abq
# Export elemental information to a file.
SETA axi e b_surf
SEND axi abq
PLUS n symm_BC r 6
PLUS n press b 6
ROT -z
FRAME
i modified your FBD files, this eliminate flip command or orientation keyword
#
## Geometry
#
# Points
PNT P_origin 0 0 0
PNT P0 0 250 0
PNT P1 50 250 0
PNT P2 50 200 0
PNT P3 50 150 0
PNT P4 50 100 0
PNT P5 50 50 0
PNT P6 0 50 0
PNT P7 0 100 0
PNT P8 0 150 0
PNT P9 0 200 0
# Lines and divisions
LINE L1 P0 P1 10
LINE L2 P1 P2 10
LINE L3 P2 P3 10
LINE L4 P3 P4 10
LINE L5 P4 P5 10
LINE L6 P5 P6 10
LINE L7 P6 P7 10
LINE L8 P7 P8 10
LINE L9 P8 P9 10
LINE L10 P9 P0 10
LINE L11 P2 P9 10
LINE L12 P3 P8 10
LINE L13 P4 P7 10
# Create surfaces based on line sets.
GSUR S01 + PLN1 -L1 +L2 +L11 -L10
GSUR S02 + PLN1 -L11 +L3 +L12 -L9
GSUR S03 + PLN1 -L12 +L4 +L13 -L8
GSUR S04 + PLN1 -L13 +L5 +L6 -L7
# Surface set definition for meshhing.
SETA b_surf s S01 S02 S03 S04
# Rotate all surfaces so that the disk rotates about y-xis
MOVE all ROT P_origin z -90
#
## Meshing
#
# Element type is assigned to surfaces.
ELTY b_surf qu8cr
# Mesh the geometry.
MESH all
# All nodes are stored in a set.
SETA nodes n all
# Boundary condition nodes are selected from the all nodes and stored in a set.
enq nodes symm_BC rec _ 0 0 0.001 a
# Node set containing boundary condition nodes are written to a file.
SEND symm_BC abq nam
# Surface to apply load due.
SETA press l L1
COMP press do
COMP press do
SEND press abq sur
# Export nodal information to a file.
SEND nodes abq
# Export elemental information to a file.
SETA axi e b_surf
SEND axi abq
PLUS n symm_BC r 6
PLUS n press b 6
ROT z
FRAME
I checked the file from suleymanmuti and found out that the flip command has to be used after the mesh command and that the ‘auto’ parameter is missed since just a surface name is used.
mesh all
flip S1 auto
All other surfaces will be oriented as surface S1
Or a set of surfaces can be flipped w/o auto:
MESH all
seta xx s S1 S4
FLIP xx