Creating node sets and applying zero magnitude forces

Hello
I am fairly new to CalculiX and want to use it to carry out FSI using preCICE. I am trying to recreate the perpendicular flap preCICE tutorial case Perpendicular flap | preCICE - The Coupling Library
I tried using FreeCAD however, I haven’t been able to generate an .inp file similar to the one in the tutorial (image attached).


I cannot make node sets and am unable to apply a zero magnitude force on the interface like the one in the original tutorial file.
Can this be done in FreeCAD or should I use a different software? If yes, how should I approach the problem and its relevant boundary conditions? I have tried Salome but I am new to it so I am not sure I did it right.

This is the link to my post on the preCICE platform incase more specifics are needed.
Recreating perpendicular flap case using CalculiX and OpenFOAM - Non-preCICE - preCICE Forum on Discourse

Would appreciate any help.

Hello mishal49,

you have many questions, and there are maybe many solutions for your simulation.
i recommend you to start very simple.
the best way is to create your mesh and sets with cgx,
send out all sets and create a very simple inp file.
If everything works fine, you can change to create your mesh and sets with other tools

here is an very simple example to create a plate

1 Like

plate_buckling_solids.fbd

Structure: plate 200x100x1

Test objective: plate buckling with solid elements

PNT p01 0.00000 0.00000 0.00000
SETA p01 p p01
SWEP p01 line01 tra 100 0 0
SETA line01 l L001
COMP line01 d
SWEP line01 area01 tra 0 100 0
SETA area01 s all
SWEP area01 bodie01 tra 0 0 .5
SETA bodie01 b all
COMP bodie01 d
SWEP area01 bodie02 tra 0 0 -.5
SETA ldivlh l L009 L00A L00C L00B L00H L00I L00K L00J
DIV ldivlh mult 0.5
SETA ldivlb l L001 L002 L005 L006 L00D L00E
DIV ldivlb mult 10
SETA ldivll l L003 L004 L007 L008 L00F L00G
DIV ldivll mult 20
SETA fixz L001 L002 L003 L004
COMP fixz d
SETA fixx l L003 L004
COMP fixx d
SETA fixy l L001
COMP fixy d
SETA lmove l L002
COMP lmove d
ELTY all HE20
MESH all
SETA pres s A004 A009
COMP pres d
COMP pres d
plot e all
DEL se p01
DEL se area01
DEL se ldivlh
DEL se ldivlb
DEL se ldivll
DEL se -NJBY
DEL se bodie01
DEL se bodie02
send all abq
send all abq nam
send pres abq pres 1

plate_buckling_solids.inp

**
** Structure: plate 100x100x1
** Test objective: Plate buckling
** pressure 1 N/mm²
** load factor = 4 x 18,98 = 75,92
** ccx: 74,36

*HEADING
Model: plate_buckling with solids
*INCLUDE, INPUT=all.msh
*INCLUDE, INPUT=fixz.nam
*INCLUDE, INPUT=fixy.nam
*INCLUDE, INPUT=fixx.nam
*INCLUDE, INPUT=lmove.nam
*BOUNDARY
Nfixz,3,3,0
**Nfixz,1,1,0
Nfixy,1,2,0
**Nlmove,2,2,0
*MATERIAL, Name=steel
*ELASTIC
210000, 0.3
*SOLID SECTION, Elset=Eall, Material=steel
*STEP
***STATIC
*BUCKLE
5
*DLOAD
*INCLUDE, INPUT=pres.dlo
***BOUNDARY
**Nlmove,1,1,-.000656
*NODE PRINT,NSET=Nfixy,totals=yes
RF
*NODE FILE
U
*EL FILE
S
*END STEP

1 Like

Structure: beam 1062x60x10

Test objective: Calc. of max. plastic moment for a rectangle Cross-section beam with Initial time increment

PNT p01 0.00000 0.00000 0.00000
PNT p02 0.00000 10.00000 0.00000
PNT p03 1062.00000 10.00000 0.00000
PNT p04 1062.00000 0.00000 0.00000
PNT p05 0.00000 0.00000 30.00000
PNT p06 0.00000 10.00000 30.00000
PNT p07 1062.00000 10.00000 30.00000
PNT p08 1062.00000 0.00000 30.00000
PNT p09 0.00000 0.00000 60.00000
PNT p10 0.00000 10.00000 60.00000
PNT p11 1062.00000 10.00000 60.00000
PNT p12 1062.00000 0.00000 60.00000
LINE L001 p01 p02 2
LINE L002 p02 p06 1
LINE L003 p06 p05 2
LINE L004 p05 p01 1
LINE L005 p06 p10 1
LINE L006 p10 p09 2
LINE L007 p09 p05 1
LINE L008 p04 p03 2
LINE L009 p03 p07 1
LINE L010 p07 p08 2
LINE L011 p08 p04 1
LINE L012 p07 p11 1
LINE L013 p11 p12 2
LINE L014 p12 p08 1
LINE L015 p01 p04 60
LINE L016 p02 p03 60
LINE L017 p09 p12 60
LINE L018 p10 p11 60
LINE L019 p05 p08 60
LINE L020 p06 p07 60

length

SETA ldivl l L015 L016 L017 L018 L019 L020
DIV ldivl mult 4

height

SETA ldivh l L002 L004 L005 L007 L009 L011 L012 L014
DIV ldivh mult 8

wide

SETA ldivw l L001 L003 L006 L008 L010 L013
DIV ldivw mult 1
GSUR A001 + BLEND - L002 - L001 - L004 - L003
GSUR A002 + BLEND + L003 - L007 - L006 - L005
GSUR A003 + BLEND + L008 + L009 + L010 + L011
GSUR A004 + BLEND - L010 + L012 + L013 + L014
GSUR A005 + BLEND - L015 + L001 + L016 - L008
GSUR A006 + BLEND - L018 + L006 + L017 - L013
GSUR A007 + BLEND - L007 + L017 + L014 - L019
GSUR A008 + BLEND + L019 + L011 - L015 - L004
GSUR A009 + BLEND - L018 - L005 + L020 + L012
GSUR A010 + BLEND + L020 - L009 - L016 + L002
GSUR A011 + BLEND - L019 - L003 + L020 + L010
GBOD B001 NORM + A001 + A003 - A008 - A011 + A010 + A005
SETA B001 b b001
GBOD B002 NORM + A002 + A004 + A006 - A009 + A011 - A007
SETA B002 b b002
ELTY all he20
MESH all
SETA fixlxyz l L003
COMP fixlxyz d
SETA fixlyz l L010
COMP fixlyz d
SETA pres s A006
COMP pres do
COMP pres do
DEL se ldiv
DEL se -NJBY
SEND all fbd
SEND all abq
SEND fixlxyz abq nam
SEND fixlyz abq nam
SEND pres abq nam
SEND pres abq pres 1
plot e all
view elem

1 Like

Thank you @dichtstoff for such a quick response and the cases. I tried both and they worked. I have also done the CCX starter case of the rectangular beam. I did notice that in all cases, when using CGX, .inp files are manually created. Is this always the case when using CGX?

As for the different software approach, I intend to work with a more complex geometry that I do not think I could deal with in CGX which is why, I wanted to replicate the file using FreeCAD or Salome. Also, this would help skip the process of manually making the .inp file right?

hello,

both are working, salome could be maybe a bit tricky. there should be many tutorials videos.
i prefer to work with stp files and netgen. with stp files you can use line on surfaces,
to create node sets on so on.
the output from netgen is example.vol
you can read with cgx with cgx -ng example.vol
and you can create a cgx file for your work with cgx, and use it with read cgx.fbd

seta nodes n all

enq nodes sbound_01 rec _ 1255 _ 1
enq nodes sbound_02 rec _ 0 0 1

seta refnode n 39 40

seta spin +set48 +set13

prnt se
plot n sbound_01
plus n sbound_02 g
plus n spin b

send all abq
send sbound_01 abq nam
send sbound_02 abq nam
send spin abq nam

1 Like

Hi Mishal49,

¿May I ask you something that had gone unnoticed?. ¿What does the title of your post mean? ¿Is it possible to establish a boundary condition that imposes FORCE=0? I didn’t know about that kind of BC. ¿Don’t you mean free rotation or Friction=0?

Regards
Disla

Hi @Disla
I see how this might be confusing however, I wrote it like that because a zero magnitude load on the interface between fluid and solid acts as a place holder for the forces that the fluid will impose on the plate which will cause the value to update.

Hi @dichtstoff
Let me try this out and get back to you. Could I also import an already meshed file into netgen and then just generate the .vol file and import into CGX?

Thanks,

That’s new to me.

1 Like

you import a geo file like stp file into netgen and generate a mesh and save it as a vol file.
with cgx you import the vol file, prepare the mesh and sets for your input file.
there should be also something in the manual. you can also mesh surfaces

NETGEN Import
In case NETGEN is used for meshing then the edges which are generated by
NETGEN can be included for modifications;
read edge-file edg
will create beam elements based on the defined edges. When the modifications
are done, the beam elements can be exported in the NETGEN-edge format with
the ”send setname stl” command and used for meshing in netgen (see also ”How
to deal with CAD-geometry”). The netgen mesh can be imported with
read netgen-file ng
If the NETGEN (.vol) file contains solid elements, all shells and beams are only
used to define surface sets of nodes and faces (+set). The shell elements
and beams are deleted by default. If you want to be more selective about the
elements imported from netgen, you use the keyword ndsb (NoDeleteShellsAnd-
Beams).

B.23 Remarks Concerning NETGEN
It is not necessary to write the mesh in abaqus format if you use netgen as a
mesher. The native netgen format (.vol) can be read by cgx (cgx -ng file.vol)
as well. The netgen mesh format (.vol) includes the surface-patches which were
defined by the edges of the model and used for the generation of the volume-
mesh. This patches can be used to define boundary conditions or loads. The
nodes and faces of this patches are stored in sets named “+set[nr]”. To get
an overview over the patches type “prnt se”. To see were the patches are lo-
cated type “plot f all” and use the “PAGE DOWN”-key to scan through all sets.

Hello mishal49,

you can create inp files automatically with software like:

PrePoMax

[

PrePoMax

](https://prepomax.fs.um.si/)

Calculix Launcher

[

Calculix Launcher

All programs comes with their own licenses WITHOUT ANY WARRANTY read more it at official websites: http://www.c

](CalculiX - Free Finite Element Software: Calculix Launcher)

or

Mecway - Finite Element Analysis

[

Mecway - Finite Element Analysis

](https://mecway.com)

you have always three parts of work. One is creating the mesh with elements and nodes, included all sets of nodes
the second part is to create the inp file and of course a third with post-process, the results.

there is a good example how can work with more than one part in cgx and netgen.
but also freecad or salome or gmesh could be interesting.
if you want to an easy and quick way, than you have to buy software for these.

wbr dichtstoff

(Attachment Advanced CalculiX Tutorial.pdf is missing)

Hello @dichtstoff
Thank you for sharing these resources.
I made the flap (0.1m thick and 1m tall) in FreeCAD, saved it as a .iges file and then imported this into PreProMax however, the problem I am having is that PreProMax recognizes all surfaces as shell parts and so when I try to make sections, I can only make shell sections and not solid sections. Is it automatically assuming shell elements because of the 0.1 thickness? Is there anyone who knows a way that I could modify this in PreProMax?

Would appreciate any help

When you generated the flap, did you make a solid or a face? Maybe try to extrude it instead of using face features. Maybe this could help solve the problem. Also try to increase its thickness and see if it affects the PrePoMax import.

if you mesh surfaces, you get shell elements,
if you mesh solids, you geht solid elements,
so you have create only solid parts.