Summary
Section 7.125 (*STEP) of the 2.23 manual:
Once the NLGEOM parameter has been selected, it remains active in all subsequent static calculations. With NLGEOM=NO the inclusion of geometrically nonlinear effects can be turned off.
Between two *STATIC steps ccx does this: a *STEP card without NLGEOM after a *STEP, NLGEOM step runs geometrically nonlinear. When a plain *FREQUENCY or *BUCKLE step comes in between, the next *STATIC step runs linear instead. There is no message about it, and the exit status is 0.
In the deck below, step 1 selects NLGEOM and step 3 pulls a unit cube by 100 (E = 1000, nu = 0). ccx gives u_x = 0.1, the linear answer. Without the frequency step, or with NLGEOM repeated on the third *STEP card, it gives 0.08803396, the geometrically nonlinear answer. A *BUCKLE step in place of the frequency step gives 0.1 as well. So does a preload in step 1.
Version
ccx 2.23 (macOS arm64) and current master (537aa81, 2 Nov 2026): the same numbers.
Already reported or fixed?
Not reported: I found no matching GitHub issue (open or closed) or pull request in Dhondtguido/CalculiX, and no calculix.discourse.group topic (searched 3 Nov 2026). Not fixed: frequencys.f, buckles.f, steps.f and the iperturb[1]=0 line in arpack.c are unchanged on master (537aa81).
Related:
- Plastic, creep or user material: segfault in *NO ANALYSIS, *BUCKLE, *COMPLEX FREQUENCY, a linear *STATIC after *FREQUENCY, and modal steps with S/RF output · Issue #285 · Dhondtguido/CalculiX · GitHub (open) mentions the same reset of
iperturb(1)as the route by which a*STATICstep after*FREQUENCYreacheslinstatic(). That issue is about segfaults with plastic, creep and user materials; its workaround is to repeat NLGEOM, and its fix section notes that after its fix such a step would still be solved in one linear solve. This report is about the reset itself, for NLGEOM, which section 7.125 says stays active: with an elastic material there is no crash, just a linear answer. - *FREQUENCY with previous *STEP,NLGEOM=YES (2023) asked about the “Nonlinear geometric effects are taken into account” line in a PERTURBATION
*FREQUENCYstep after an NLGEOM step. It was explained there as the preload’s nonlinearity; the step after the frequency step was not discussed.
Minimal input
nlgeom_freq.inp:
** Unit cube, E = 1000, nu = 0, pulled in x by 100 (25 per node) in step 3.
** Linear: u_x = 0.1. NLGEOM: u_x = 0.088034, from lambda*(lambda^2-1)/2*E = 100.
** Step 1 selects NLGEOM; step 2 is a plain *FREQUENCY step.
*NODE
1, 0., 0., 0.
2, 1., 0., 0.
3, 1., 1., 0.
4, 0., 1., 0.
5, 0., 0., 1.
6, 1., 0., 1.
7, 1., 1., 1.
8, 0., 1., 1.
*ELEMENT, TYPE=C3D8, ELSET=EALL
1, 1, 2, 3, 4, 5, 6, 7, 8
*NSET, NSET=XMAX
2, 3, 6, 7
*MATERIAL, NAME=MAT
*ELASTIC
1000., 0.
*DENSITY
1.
*SOLID SECTION, ELSET=EALL, MATERIAL=MAT
*BOUNDARY
1, 1, 3
4, 1, 1
4, 3, 3
5, 1, 2
8, 1, 1
*STEP, NLGEOM
*STATIC
1., 1., 1.e-5, 1.
*END STEP
*STEP
*FREQUENCY
2
*END STEP
*STEP
*STATIC
1., 1., 1.e-5, 1.
*CLOAD
XMAX, 1, 25.
*NODE PRINT, NSET=XMAX
U
*END STEP
Variants (each changes only the lines named):
nlgeom_nofreq.inp: the four lines*STEP/*FREQUENCY/2/*END STEP(step 2) deleted;nlgeom_freq_restated.inp:*STEP, NLGEOMinstead of*STEPon the last step;nlgeom_buckle.inp:*BUCKLE/1/*CLOAD/XMAX, 1, -1.instead of*FREQUENCY/2;pre_freq.inp:*CLOAD/XMAX, 1, 12.5added to step 1, after its time line (a preload of half the final load).
How to run
ccx nlgeom_freq
Expected
The uniaxial pull of a St. Venant-Kirchhoff cube: with nu = 0 the cross-section stays 1 x 1, so the nominal stress is lambda S = 100, with S = E (lambda^2 - 1)/2. This gives lambda^3 - lambda = 0.2, so lambda = 1.088034 and u_x = 0.088034 at nodes 2, 3, 6 and 7. That is what ccx gives when the frequency step is left out.
Actual
Node 7, last step:
| deck | u_x | stdout of the last step |
|---|---|---|
nlgeom_freq |
1.000000E-01 | no “Newton-Raphson iterative procedure is active”, no “Nonlinear geometric effects are taken into account” |
nlgeom_buckle |
1.000000E-01 | the same |
pre_freq |
1.000000E-01 | the same |
nlgeom_nofreq |
8.803396E-02 | both lines; “increment 1 attempt 1” |
nlgeom_freq_restated |
8.803396E-02 | both lines |
pre_freq without its frequency step gives 8.803391E-02. Every run exits with status 0, and none prints a warning. ccx 2.23 and master 537aa81 print the same numbers.
The frequency step itself (step 2 of nlgeom_freq) prints “Nonlinear geometric effects are taken into account”, although a frequency step is linear. The last step, which section 7.125 says is still geometrically nonlinear, does not print it; by the same section (“To check whether geometric nonlinearity was taken into account in a specific step, look for the message …”) that means it was not.
Where it goes wrong
Between steps, steps.f (line 50) keeps an active Newton-Raphson flag:
if(iperturb(1).lt.2) iperturb(1)=0
so NLGEOM (iperturb(1)=2, iperturb(2)=1) carries over from one *STATIC step to the next. The linear procedures overwrite both flags and nothing restores them:
frequencys.flines 165-166:if(iperturb(1).gt.1) iperturb(1)=0, followed by the commented-out linec iperturb(2)=0. So the reader itself keepsiperturb(2). Butarpack.cline 494 (line 488 in 2.23) then sets it to 0 for the eigenvalue problem, under the comment “for the frequency analysis linear strain and elastic properties are used”, and never sets it back.buckles.flines 117-118:if(iperturb(1).gt.1) iperturb(1)=0andiperturb(2)=0.
The next *STATIC step therefore starts with iperturb(1)=0, and CalculiX.c (lines 1249-1251) sends it to linstatic(). Other readers reset the same flags (not tested separately): complexfrequencys.f lines 94-95 reset both, greens.f line 121 resets iperturb(1), and modaldynamics.f line 45 and steadystatedynamicss.f line 44 reset iperturb(2).
The commented-out reset in frequencys.f suggests that NLGEOM was meant to survive a frequency step.
Fix
Store the NLGEOM selection separately from iperturb. Only *STEP, NLGEOM and *STEP, NLGEOM=NO should change it. Then let steps.f restore iperturb(1)=2 and iperturb(2)=1 from it for the next step that has no PERTURBATION, in the way that line 50 already keeps the flag between two static steps. The procedures can then keep switching to linear for their own eigenvalue problem.
Workaround: repeat NLGEOM on the *STEP card of every static step that follows a *FREQUENCY or *BUCKLE step.