USER element : 1D beam custom implementation

Dear community,

First a big thank to Guido Dhondt for such a beautiful software.

I have been working recently to add a U1 user beam element with standard section.
I ha seen that other user have started to work on this topic, and wanted to augment the current user element abilities.
i know other user are working i this topic, let’s work together: Using a custom user element (UEL)
NB: some IA agent have been used for this. The code has been reviewed, except for the “patch”.

Sources can be found here : GitHub - Raztua/CCX-UB21: CCX 2.23 patch to add UB21 1D ebam elements · GitHub

This patch introduces the UB21 element—a native 2-node 3D Timoshenko/Euler-Bernoulli beam element—along with expanded cross-section definition capabilities via a new *USER BEAM SECTION input syntax.

the following key feature are implemented

  • Native 2-Node 3D Beam (UB21): Full 6 DOFs per node (UXROTZ) supporting Timoshenko shear deformation, nodal offsets, and 3D orientation.

  • *USER BEAM SECTION Syntax: Parametric definitions for standard profiles (RECT, CIRC, PIPE, I, T, CHAN, L) with automatic principal axis rotation for asymmetric sections.

  • Member End Releases (Hinges): Built-in shortcodes (M1, M2, T, ALLM, etc.) or custom bitwise integer masks for individual nodal DOF releases at member ends.

  • Expanded Loading Support: Distributed loads (PX, P1, P2), trapezoidal/triangular loads, partial patch loads, gravity, and centrifugal fields.

  • Analysis Compatibility: Works with *STATIC, *FREQUENCY, *BUCKLE, and *DYNAMIC steps (with optional lumped mass matrices).

  • Enhanced Post-Processing: Standard .frd dataset outputs for cross-section stresses/forces, plus an automatic multi-station span evaluation CSV (ub21_beam_forces.csv).

next steps

  • validation : a validation suite is created, L shape to be improved. abaqus comparison ongoing.
    you can run run_global_verification.py to test on your computer
  • CGX the output are compatible with CGX, however i am unable to activate result on both “faces” of the line elements. please advise.

Thank you for reading,

Pierre

3 Likes

ciao Pierre and ciao everybody

wonderful! Thank you a lot. I’ll be in as soon as possible.

Meanwhile, I did this little tool just for personal using; but you’re very welcome if you will usit and compare it with ccX solutor.

You bypass every prepocessor. You get in from a dxf 2D directly.

Post processor is automatic with python functions and a userful EC3 SLE and SLU .cvs file.

P-delta is included.

Please use this version 16.3.1, is the one operative.

Kind regards

Bruno

Looks a very interesting implementing, do you have compiled for Windows to test it?

Regards

Sergio,

I only have linux on my computer,
So i would be glad if a window user can try it

Regards,

Pierre

I would really like to try it, I have Windows but I can´t compile

indeed, please consider this important feature of modern structural analysis of elastic frames for designing purposes.

1 Like

Hello Dr. Dhont, my little “all-rounder” tool, structDXF, is currently capable of performing P-Delta analysis (including buckling) and checks for serviceability and ultimate limit states (SLS/ULS). I am currently busy with non-destructive testing (NDT) work, but as soon as I have some free time, I will focus on pushover analysis. This python code might prove useful to those developing ccX. Thank you very much for your kind assistance. Best regards, Bruno.

hello Sergio, you need - Python 3.8 or later

  • Required packages:
    • ezdxf
    • numpy
    • matplotlib
    • Pynite
    • openpyxl
    • scipy

Please, let me know because you’re still on w. (??).

Set it free, throw w out of the door and install linux.

Any distro will be fine; the mine is ubuntu 24.04.

Kind Regards

Bruno

Could anyone try this new type of elements?

Dear Calculix team,

I am on holiday and therefore have bad internet access and no computer,
I’ll provide more context implementation and presence as soon as I am back.

Regards

I managed to compile the code for the above user element UB21. Then I modified the standard test ccx case b31.inp to the new element type to run a simple example:

**
** Structure: cantilever beam
** Test objective: B31 elements being changed to user element UB21.

** Original ccx test case file name: b31.inp
**
*NODE,NSET=Nall
1, 0, 0, 0
2, 0, 0, 1
3, 0, 0, 2
4, 0, 0, 3
5, 0, 0, 4
6, 0, 0, 5
7, 0, 0, 6
8, 0, 0, 7
9, 0, 0, 8
10, 0, 0, 9
11, 0, 0,10
*ELEMENT,TYPE=UB21,ELSET=EAll
1,1,2
2,2,3
3,3,4
4,4,5
5,5,6
6,6,7
7,7,8
8,8,9
9,9,10
10,10,11
*BOUNDARY
1,1,6
*MATERIAL,NAME=ALUM
*ELASTIC
1E7,.3
*BEAM SECTION,ELSET=EAll,MATERIAL=ALUM,SECTION=RECT
.25,.25
1.d0,0.d0,0.d0
*STEP
*STATIC
*CLOAD
11,1,1.
*EL PRINT,ELSET=Eall,FREQUENCY=100
S
*NODE FILE
U
*EL FILE
S,NOE
*END STEP

Then running the example I am getting the error:
*ERROR reading *ELEMENT
nonexistent element type:
UB21
*ERROR reading *ELEMENT. Card image:
*ELEMENT,TYPE=UB21,ELSET=EALL

So I am not sure what went wrong on my side, the new user element was not properly identified. Can you please share an example inp file which worked on your side to further investigate the issue with my compilation workflow? Thank you!

1 Like

Dear CCX,

i had forgotten to add the resultsmech_u file in github, it is now added.
@johanngil manage to build the user element on windows, and run the following code.

*HEADING
Batch 4 Concentrated Load (rect)
*NODE
1, 0.00, 0.0, 0.0
2, 0.25, 0.0, 0.0
3, 0.50, 0.0, 0.0
4, 0.75, 0.0, 0.0
5, 1.00, 0.0, 0.0
*USER ELEMENT, TYPE=UB21, NODES=2, MAXDOF=6, INTEGRATIONPOINTS=1
1,2,3,4,5,6
*ELEMENT, TYPE=UB21, ELSET=BEAM
1, 1, 2
2, 2, 3
3, 3, 4
4, 4, 5
*USER SECTION, ELSET=BEAM, MATERIAL=STEEL, CONSTANTS=19
1, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0, 0,
0.0, 1.0, 0.0
*MATERIAL, NAME=STEEL
*ELASTIC
2.1e11, 0.3
*DENSITY
7850
*NSET, NSET=ALLN
1, 5
*BOUNDARY
1, 1, 6, 0.0
*STEP
*STATIC
*CLOAD
5, 3, 1000.0
*NODE PRINT, NSET=ALLN
U, RF
*END STEP

Please note that the exemple cases in CCX-UB21/UB21_CCX223_Manual.md at main · Raztua/CCX-UB21 needs to be updated as they are not working with the latest modification of the code

however a full test suite can be launched with CCX-UB21/run_global_verification.py at main · Raztua/CCX-UB21

thanks

Pierre

Good news @p.viguier could you share the Windows executable?

1 Like

@SergioP
I am not the one who did the build,
@johanngil did it,

Next week I’ll be at home, and will try to make an executable for windows

regards

Pierre

Hello

The code, and manual has been updated,

I have compiled for windows and triend on my computer with wine, I ran fine.

The exe file can be found here: CCX-UB21/ccx_2.23.zip at main · Raztua/CCX-UB21 · GitHub

You can find input exemples in CCX-UB21/UB21_CCX223_Manual.md at main · Raztua/CCX-UB21 · GitHub

Regards

Pierre

Hi all,

Here is an overview of what is currently implemented and tested in the CalculiX 2.23 beam extension:

Features added

• Releases & Springs: End hinges (M1, M2, T, ALLM, bitmasks) and semi-rigid springs.
• 6-DOF Connector (UCONN6): Zero-length elements for discrete joint springs and nonlinear ASCE 41-17 plastic
hinges.
• Geometric Nonlinearity (P-Δ & P-δ): Full 3D geometric stiffness for second-order sway and curvature under *STEP, NLGEOM.
• Inelastic Pushover: ASCE 41-17 multilinear plastic hinges with automatic damage state tracking (IO, LS, CP, Failure)

CSV Output Generators:

  *USER BEAM OUTPUT: Exports intermediate stations along members 
  *USER CONNECTOR OUTPUT: Exports joint forces, relative rotations, yield ratios, and plastic hinge states.

Testing & Validation

All features are tested via with benchmarked against analytical solutions, OpenSees, PyNite, and Nastran 95 baselines. CCX-UB21/FULL85_report.md at main · Raztua/CCX-UB21 · GitHub

Windows executable updated in Github CCX-UB21/ccx_2.23.zip at main · Raztua/CCX-UB21 · GitHub

Thank you,

Regards,
Pierre

1 Like

I run some basic example yesterday in Windows and the solver finish ok, but for postprocessing a new version of CGX is also needed? Because I can´t post with the last CGX version.

Regards

Did you try Prepomax for postprocessing? I remember working with 1d user elements and it was possible to open it in ppm.

But I am not aware of the implementation of the frd files in this code.

Dear Stoli,

For now i will try to keep working on CCX/CGX, and not to be dispersed with many software.

Here my purpose is to reach a full working 1D beam implementation, with the possibilites to assess the results,

I can see the process as follow:

  • to have a good implementation of the 1D element ->USER element
  • to get a better understanding of whole CCX package to get a strong bonding with CCX and ensure all cases are covered, and that i didnt broke existing features
  • to stabilize the code and see, once ready, if it can be added to core
    then:
  • to see with prepomax team if they can add the feature.

For this anyone willing to code, or make some test is welcome.

ps: by curiosity, i may try to see how to do with prepomax, but do not expect something soon

Regards;

Pierre

hello Sergio,

I have not made modification to CGX, i use the latest version, i have tried to fit to CGX formulation.

Can you tell me whats happens when you try to open with CGX?
Could you try in the CGX terminal prompt to type:

plot e all       # Plots all elements in the model
frame            # Auto-fits and centers the model in the window

thank you