# USER element : 1D beam custom implementation

**URL:** <https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079>\
**Category:** Code development\
**Created:** [July 30, 2026, 8:23am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079 "2026-07-30T08:23:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [July 30, 2026, 8:23am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/1 "2026-07-30T08:23:41Z")

</div>

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)](https://calculix.discourse.group/t/using-a-custom-user-element-uel/3848)  
_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](https://github.com/Raztua/CCX-UB21)

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 (`UX`–`ROTZ`) 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

---

<div class="post-metadata">

**Author:** ![bruno.zilli](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bruno.zilli](https://calculix.discourse.group/u/bruno.zilli)\
**Post date:** [July 30, 2026, 9:19am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/2 "2026-07-30T09:19:54Z")

</div>

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.

> **[GitHub - brunozilli/structDXF](https://github.com/brunozilli/structDXF)**
>
> Contribute to brunozilli/structDXF development by creating an account on GitHub.

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

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [July 30, 2026, 2:28pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/3 "2026-07-30T14:28:00Z")

</div>

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

Regards

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [July 30, 2026, 3:26pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/4 "2026-07-30T15:26:10Z")

</div>

Sergio,

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

Regards,

Pierre

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [July 30, 2026, 3:40pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/5 "2026-07-30T15:40:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [July 30, 2026, 8:58pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/6 "2026-07-30T20:58:26Z")

</div>

> [@bruno.zilli](#):
>
> P-delta is included

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

---

<div class="post-metadata">

**Author:** ![bruno.zilli](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bruno.zilli](https://calculix.discourse.group/u/bruno.zilli)\
**Post date:** [July 31, 2026, 5:27am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/7 "2026-07-31T05:27:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bruno.zilli](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@bruno.zilli](https://calculix.discourse.group/u/bruno.zilli)\
**Post date:** [July 31, 2026, 5:31am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/8 "2026-07-31T05:31:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [August 12, 2026, 2:29am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/9 "2026-08-12T02:29:15Z")

</div>

Could anyone try this new type of elements?

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [August 12, 2026, 9:24am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/10 "2026-08-12T09:24:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![johanngil](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@johanngil](https://calculix.discourse.group/u/johanngil)\
**Post date:** [August 13, 2026, 9:37am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/11 "2026-08-13T09:37:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [August 14, 2026, 1:58pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/12 "2026-08-14T13:58:13Z")

</div>

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.

```auto
*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](https://github.com/Raztua/CCX-UB21/blob/main/UB21_CCX223_Manual.md) 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](https://github.com/Raztua/CCX-UB21/blob/main/run_global_verification.py)

thanks

Pierre

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [August 14, 2026, 5:02pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/14 "2026-08-14T17:02:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [August 16, 2026, 2:34pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/15 "2026-08-16T14:34:43Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [August 17, 2026, 6:07am UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/16 "2026-08-17T06:07:18Z")

</div>

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](https://github.com/Raztua/CCX-UB21/blob/main/ccx_2.23.zip)

You can find input exemples in [CCX-UB21/UB21\_CCX223\_Manual.md at main · Raztua/CCX-UB21 · GitHub](https://github.com/Raztua/CCX-UB21/blob/main/UB21_CCX223_Manual.md)

Regards

Pierre

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [August 18, 2026, 1:51pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/17 "2026-08-18T13:51:51Z")

</div>

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](https://github.com/Raztua/CCX-UB21/blob/main/FULL85_report.md)

Windows executable updated in Github [CCX-UB21/ccx\_2.23.zip at main · Raztua/CCX-UB21 · GitHub](https://github.com/Raztua/CCX-UB21/blob/main/ccx_2.23.zip)

Thank you,

Regards,  
Pierre

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [August 18, 2026, 3:16pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/18 "2026-08-18T15:16:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stoli](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@stoli](https://calculix.discourse.group/u/stoli)\
**Post date:** [August 18, 2026, 3:34pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/19 "2026-08-18T15:34:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [August 18, 2026, 4:15pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/20 "2026-08-18T16:15:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![p.viguier](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@p.viguier](https://calculix.discourse.group/u/p.viguier)\
**Post date:** [August 18, 2026, 4:16pm UTC](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079/21 "2026-08-18T16:16:32Z")

</div>

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

[Next page](https://calculix.discourse.group/t/user-element-1d-beam-custom-implementation/4079.md?page=2)
