How to bring paper calculation into CalculiX?

I did a welding on a plate edge some day. The plate get deforemed, I did not know the
plate’s yield strength at that moment yet and by comparing my calculated deflection with
the real one being 8 mm I derived at yield strength of the plate being 1275 kgf/cm^2.
My calculations were in cm-kgf-sec system.
I try to achive the result on Calculix with no success yet. I paste 4 files first two files
are in N-mm-sec system, the other two are in cm-kgf-sec system. I hope I miss something.

forum.jpeg

f is deflection of the plate

file 1 beam-N-mm.fbl

valu Etyp he8

seto beam
Ont p0 0 0 0
pnt p1 0 1065 0

line l0 p0 p1
seta se0 l l0

swep se0 se1 tra 5 0 0
seta ses0 A001

swep ses0 ses1 tra 0 0 38.2 8

seta rear A005
seta front A006
comp rear e
rep rear
comp rear f
rep rear

comp front e
rep front
comp front f
rep front

seta extend A002
swep extend extended tra 0 0 9.8

setc beam

elty beam Etyp
mesh beam
send beam abq

send rear abq surf
send front abq surf
send rear abq spc 2
send rear abq pres 127.5 # N/mm^2
send front abq pres 127.5 # N/mm^2
plot f rear g
plus f front r

file 2 beam-N-mm.inp

*HEADING
Model: CalculiX Beam Input File for welding experiment
*INCLUDE,INPUT=beam.msh
*BOUNDARY
*INCLUDE,INPUT=rear_2.bou
*MATERIAL,NAME=EL
*ELASTIC
200000.0,0.3
*SOLID SECTION,ELSET=Ebeam,MATERIAL=EL
*STEP
*STATIC
*DLOAD
*INCLUDE,INPUT=front.dlo
** *NODE PRINT
** U
*NODE FILE ** It adds to Datasets → 1 DISP
U
*EL FILE ** It adds to Datasets → 2 STRESS
S
*END STEP


file 3 beam-kgf-cm.fbl

valu Etyp he8

seto beam
pnt p0 0 0 0
pnt p1 0 106.5 0

line l0 p0 p1
seta se0 l l0

swep se0 se1 tra 0.5 0 0
seta ses0 A001

swep ses0 ses1 tra 0 0 3.82 8

seta rear A005
seta front A006
comp rear e
rep rear
comp rear f
rep rear

comp front e
rep front
comp front f
rep front

seta extend A002
swep extend extended tra 0 0 0.98

setc beam

elty beam Etyp
mesh beam
send beam abq

send rear abq surf
send front abq surf
send rear abq spc 2
send rear abq pres 1275 # kgf/cm^2
send front abq pres 1275 # kgf/cm^2
plot f rear g
plus f front r

file 4 beam-kgf-cm.inp

*HEADING
Model: CalculiX Beam Input File for welding experiment
*INCLUDE,INPUT=beam.msh
*BOUNDARY
*INCLUDE,INPUT=rear_2.bou
*MATERIAL,NAME=EL
*ELASTIC
2039400.0,0.3
*SOLID SECTION,ELSET=Ebeam,MATERIAL=EL
*STEP
*STATIC
*DLOAD
*INCLUDE,INPUT=front.dlo
** *NODE PRINT
** U
*NODE FILE ** It adds to Datasets → 1 DISP
U
*EL FILE ** It adds to Datasets → 2 STRESS
S
*END STEP

I don’t use GraphiX. What to do with those .fbl and .inp file to get a full input deck ? What are the commands ?

cgx -b beam-?-?.fbl
ccx beam-?-?
cgx -v beam-?-?.frd

Dataset->ALL and there is no expected 8 mm displacement.

Aren’t some additional files needed here ? Because the first command returns:

 beam-N-mm.fbl opened

 reading file
 key:ONT from string Ont p0 0 0 0 not known
ERROR: point p0 of Line l0 not defined
 Set (ses0) is undefined
 WARNING(comp): set 'rear' does not exist
ERROR: Set:[rear] in command:|rep rear| does not exist
...

Oops, it is strange enough. I cannot tell why is that so. I wrote that .fbl and .inp files some time ago and they work just fine for me. There is no additional files. My cgx and ccx are 2.17 version.

Can you share the complete .inp file ? I suppose it should be generated after this procedure.

Inp file I wrote myself. And the one is shared already.

Ont is a typo, replace it by pnt (1st line)

My suggestion would be to stick to the SI base units for finite element analysis. Using that minimizes the amount of conversion errors since you don’t end up with weird units.

all files here ready to run…I can’t understand the issue in a quick glimpse so I share the file so anyone else can contribute: beam_weld - Google Drive

There is an remarkable issue though.
cgx -v beam-?-?.frd

Then go DATASET → DISP
STRESS
ERROR <-------why?

This is just a type of default output, estimating error in stress results.

Funny thing! How to do that? I am lost.

This table can be very helpful when it comes to ensuring unit consistency:

table

1 Like

There are some issues with your model.

First, he8 are first order elements. Those are not the best for this kind of analysis. It is much better to use second order elements here. Change he8 to he20r. See the section “Golden rules” in the manual for the solver (ccx).

Second, you only have a small number of elements over the length. That is not accurate, especially with first order elements.

I like to define lengths and line divisions as values, making the model parametric. Typically, you want to increase the number of divisions until the stresses/deflections do not change significantly.

So here’s your fbd file in SI units with improvements;

valu Etyp he20r

# Length of the beam in meters, converted from mm
valu L / 1065 1000
valu divL 80
# Width of the beam in meters, converted from mm
valu B / 5 1000
valu divB 4
# first partial height in meters, converted from mm
valu H1 / 38.2 1000
valu divH1 8
# Second partial height in meters, converted from mm
valu H2 / 9.8 1000
valu divH2 4
# Pressure in Pa (N/m2), coverted from MPa (N/mm2)
valu P * 127.5 1e6

seto beam
pnt p0 0 0 0
pnt p1 0 L 0

line l0 p0 p1 divL
seta se0 l l0

swep se0 se1 tra B 0 0 divB
seta ses0 A001

swep ses0 ses1 tra 0 0 H1 divH1

seta rear A005
seta front A006
comp rear e
rep rear
comp rear f
rep rear

comp front e
rep front
comp front f
rep front

seta extend A002
swep extend extended tra 0 0 H2 divH2

setc beam

elty beam Etyp
mesh beam
send beam abq

send rear abq surf
send front abq surf
send rear abq spc 2
send rear abq pres P
send front abq pres P
plot f rear g
plus f front r


In the inp-file, you only need to change the modulus to 200e9 (200 GPa).
(I copied it and renamed it beam-SI.inp).

I also like to create defined viewer files for the results. For example for stresses;

# file: view-stress.fbd

# Define the view.
rot y
rot r 135
rot u 30

# Read result data
read beam-SI.frd
frame

capt beam-SI
ulin Worst principal stress

# Stress
cmap coolwarm
mm 2e8 el
ds 2 e 23
view disp
view sh off
view elem
scal d 10

hcpy png stress-SI

Invoke it like this cgx -b view-stress.fbd.
The result is:

2 Likes

Thank you very much for your answer, now I know how to do things in SI. Would you be so kind to me as to tell me what exactly is plate deflection? As well as how to read the scale on the left. Stupid question of mine as you provided `view-stress.fbd.

The model is underconstrained. There’s only U2=0 boundary condition on part of one end. You should make sure that BCs are properly defined - corresponding to real-life supports and eliminating rigid body motions.

That’s a bit hard to tell because the model is underconstrained.
The largest displacement is D3, which ranges from +2 mm to -5.3 mm.

Since we’re using SI units, stress is in force/(length^2), i.e. N/m2 or Pa.
When using the “coolwarm” color scheme as shown above, I like to set the min and max stress to the same absolute value using cgx’s mm command. That leaves the area without stress in a neutral gray.

This is also one of the reasons for using the “worst principal stress” instead of e.g. “von Mises stress”; the worst principal stress can be both positive and negative, while von Mises is always reported as a positive number in CalculiX.

In real life I put the plate on a table welded plate edge and when it cooled down. It got bended and that’s it, I did not hold it anyhow. That is why I have a problematic constrain. I would like to hear any ideas on it.

An isostatic support has to be defined. In real world contact and friction materialise your boundary conditions. It can be very well approximated in linear analysis by isostatic support blocking all rigid body modes.