To Output Element Stiffness Matrix for 3D element

Dear Calculix Community,

I am reaching out to seek assistance regarding an issue I have encountered while attempting to output the element stiffness matrix for 3D element in Calculix using the substructure approach.

I have created a inputfile for a single hexahedral element 4 nodes are fixed and 4 opposite nodes are loaded along x.

I have defined this single element as a substructure and trying to output element stiffness, but getting a *WARNING: no degrees of freedom in the model (see attachments). I have also attached input file.

I appreciate your time and attention to this matter. Thank you in advance for your support.

Looking forward to your prompt response.

Thanks,
Anoop

**
** Heading +++++++++++++++++++++++++++++++++++++++++++++++++
**
*Heading
Hash: T8RZsaOT, Date: 01/08/2024, Unit system: MM_TON_S_C
**
** Nodes +++++++++++++++++++++++++++++++++++++++++++++++++++
**
*Node
1, 0.00000000E+000, 0.00000000E+000, 1.00000000E+000
2, 0.00000000E+000, 1.00000000E+000, 1.00000000E+000
3, 0.00000000E+000, 1.00000000E+000, 0.00000000E+000
4, 0.00000000E+000, 0.00000000E+000, 0.00000000E+000
5, 2.00000000E+000, 0.00000000E+000, 1.00000000E+000
6, 2.00000000E+000, 1.00000000E+000, 1.00000000E+000
7, 2.00000000E+000, 1.00000000E+000, 0.00000000E+000
8, 2.00000000E+000, 0.00000000E+000, 0.00000000E+000
**
** Elements ++++++++++++++++++++++++++++++++++++++++++++++++
**
*Element, Type=C3D8, Elset=Solid_part-1
1, 4, 3, 2, 1, 8, 7, 6, 5
*Nset, Nset=Internal_Selection-1_Fixed-1
1, 2, 3, 4
*Nset, Nset=Internal_Selection-1_Concentrated_Force-1
5, 6, 7, 8
*Elset, Elset=Internal_Selection-1_Solid_Section-1
Solid_part-1
*Material, Name=Steel
*Elastic
210000, 0.3
*Solid section, Elset=Internal_Selection-1_Solid_Section-1, Material=Steel
*Step
*Static
*Output, Frequency=1
*Boundary, op=New
** Name: Fixed-1
*Boundary
Internal_Selection-1_Fixed-1, 1, 6, 0
*Cload, op=New
*Dload, op=New
** Name: Concentrated_Force-1
*Cload
Internal_Selection-1_Concentrated_Force-1, 1, 1000

*Node file
RF, U
*El file
S, E
*End step

*NSET,NSET=NALL,GENERATE
1,8
*STEP
*SUBSTRUCTURE GENERATE
*RETAINED NODAL DOFS,SORTED=NO
NALL,1,3
*SUBSTRUCTURE MATRIX OUTPUT,STIFFNESS=YES,OUTPUT FILE=USER DEFINED,FILE NAME=Hexahedral_prepomax_substructure
*END STEP

Why do you stick to do substructure approach instead of matrix output from frequency step ? Substructures are quite specific, they require the definition of retained nodes (nodes that will be used to connect them to the rest of the model in a subsequent substructure usage analysis) among others.

1 Like

HI ,

I have been able to extract it with the substructure card but increasing the number of the nodes with a new element.
It wasn’t working if i started from 1 to 8. Maybe there is some counting issue in the loop or maybe it was just me writing wrong the card and puzzling ccx. Not sure.¿?¿
Is that your expected matrix?

** Generated by Mecway 23
*NODE
1,0,0,0
2,0.001,0,0
3,0.001,0.001,0
4,0,0.001,0
5,0,0,0.001
6,0.001,0,0.001
7,0.001,0.001,0.001
8,0,0.001,0.001
9,0,0.002,0
10,0.001,0.002,0
11,0.001,0.003,0
12,0,0.003,0
13,0,0.002,0.001
14,0.001,0.002,0.001
15,0.001,0.003,0.001
16,0,0.003,0.001
*ELEMENT,TYPE=C3D8
1,1,2,3,4,5,6,7,8
2,9,10,11,12,13,14,15,16
*NSET,NSET=Internal_Selection-1_Fixed-1
1
2
3
4
9
10
11
12
*NSET,NSET=Force
5
6
7
8
13
14
15
16
*NSET,NSET=NALL
9
10
11
12
*ELSET,ELSET=Solid_part-1
1
2
*MATERIAL,NAME=Steel
*ELASTIC,TYPE=ISOTROPIC
210000000000,0.3
*DENSITY
7850
*SOLID SECTION,ELSET=Solid_part-1,MATERIAL=Steel
*BOUNDARY
1,1,,0
1,2,,0
1,3,,0
2,3,,0
3,3,,0
4,3,,0
4,1,,0
9,1,,0
9,2,,0
9,3,,0
10,3,,0
11,3,,0
12,3,,0
12,1,,0
*STEP
*STATIC,SOLVER=PARDISO
*CLOAD
9,3,25000
10,3,25000
11,3,25000
12,3,25000
*NODE FILE,GLOBAL=YES
U,RF
*EL FILE
S,NOE
*END STEP

*NSET,NSET=NALL,GENERATE
9,16,1

*STEP
*SUBSTRUCTURE GENERATE
*RETAINED NODAL DOFS,SORTED=NO
9,1,3
10,1,3
11,1,3
12,1,3
13,1,3
14,1,3
15,1,3
16,1,3

*SUBSTRUCTURE MATRIX OUTPUT,STIFFNESS=YES,OUTPUT FILE=USER DEFINED,FILE NAME=Hexa
*END STEP

Updated Version with nodes from 1 to 8.

**
** Heading +++++++++++++++++++++++++++++++++++++++++++++++++
**
*Heading
Hash: T8RZsaOT, Date: 01/08/2024, Unit system: MM_TON_S_C
**
** Nodes +++++++++++++++++++++++++++++++++++++++++++++++++++
**
*Node
1, 0.00000000E+000, 0.00000000E+000, 1.00000000E+000
2, 0.00000000E+000, 1.00000000E+000, 1.00000000E+000
3, 0.00000000E+000, 1.00000000E+000, 0.00000000E+000
4, 0.00000000E+000, 0.00000000E+000, 0.00000000E+000
5, 2.00000000E+000, 0.00000000E+000, 1.00000000E+000
6, 2.00000000E+000, 1.00000000E+000, 1.00000000E+000
7, 2.00000000E+000, 1.00000000E+000, 0.00000000E+000
8, 2.00000000E+000, 0.00000000E+000, 0.00000000E+000
**
** Elements ++++++++++++++++++++++++++++++++++++++++++++++++
**
*Element, Type=C3D8, Elset=Solid_part-1
1, 4, 3, 2, 1, 8, 7, 6, 5
*Nset, Nset=Internal_Selection-1_Fixed-1
1, 2, 3, 4
*Nset, Nset=Internal_Selection-1_Concentrated_Force-1
5, 6, 7, 8
*Elset, Elset=Internal_Selection-1_Solid_Section-1
Solid_part-1
*Material, Name=Steel
*Elastic
210000, 0.3
*Solid section, Elset=Internal_Selection-1_Solid_Section-1, Material=Steel
*Step
*Static
*Output, Frequency=1
*Boundary, op=New
** Name: Fixed-1
*Boundary
Internal_Selection-1_Fixed-1, 1, 3, 0
*Cload, op=New
*Dload, op=New
** Name: Concentrated_Force-1
*Cload
Internal_Selection-1_Concentrated_Force-1, 1, 1000

*Node file
RF, U
*El file
S, E
*End step

*NSET,NSET=NEW,GENERATE
1,8,1
*STEP
*SUBSTRUCTURE GENERATE
*RETAINED NODAL DOFS,SORTED=NO
NEW,1,3
*SUBSTRUCTURE MATRIX OUTPUT,STIFFNESS=YES,OUTPUT FILE=USER DEFINED,FILE NAME=HexaOrigin
*END STEP

Hey @Calc_em,

I want to output the element stiffness matrix, since the * frequency step generates a global stiffness matrix, I want to output the element stiffness matrix for each element inside the domain. So I am using Substructure approach

Hey! @Disla,

I will compare the results with mine. Thanks for the support!!!

Ok, you have a single element for now so global matrix should also be fine. But if you want to use it for larger models then indeed it can be an issue.