# A case for Calculix 2.22

**URL:** <https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016>\
**Category:** General Questions\
**Created:** [September 16, 2024, 2:27pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016 "2024-09-16T14:27:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksa](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/aleksa/32/3305_2.png) [@aleksa](https://prepomax.discourse.group/u/aleksa)\
**Post date:** [September 16, 2024, 2:27pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/1 "2024-09-16T14:27:06Z")

</div>

Hello,

I have spent some time experimenting and refining my process for compound shell meshing and calculations after this post:

> [@Meshing complex shell models](https://prepomax.discourse.group/t/meshing-complex-shell-models/1750):
>
> Hello everyone, this is my first post, made in somewhat of a hurry. I have a task to calculate the stress in the fundament of a ship deckhouse. So far from the many posts I’ve read on the forum, and some research of PrePoMax functions I’ve gathered that I need a compound part to create a uniform quad mesh. Tied or tied constrained parts don’t work since the mesh nodes do not match between parts. Since there is more than 1000 shell elements I’ve created a single compound part in stages, since t…

There appears to be great inconsistency in the relation of PrePoMax and Calculix solver. To keep this as short as possible it comes down to these steps (after creating a good compound part):

1. Meshing the part with initial mesh sizing
2. Creating the case - BCs and Loads
3. Calculation - getting either no results (crashing) or horribly wrong results
4. Back to meshing - changing cell size
5. Calculation again - good results
6. Back to meshing - changing cell size
7. Calculation - no results or bad results.

The steps above are very simplified. For instance some calculations have only worked using meshes made by Gmsh using Frontal Delunay for quads and simple recombination (all other options set to No) with Mesh refine step. And only in one mesh size, coarser or finer meshes havent worked at all, same as any netgen meshes. Here are a few pictures from the latest PrePoMax v2.10.0:

 ![Loads&BCs-setup](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/8/82cc527068481b702bff196f3346fb47ddec4121.png)

 ![netgen-75mm-ccx221](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/b/bd73facfa7516677799230491c166499eb440c9b.png)

 ![gmsh-75mm-ccx221](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/7/7906f2923a459223499207ecf86bf33ed8d358f2.png)

The part on the pictures is a pontoon with internal frames and bulkheads, meshed pretty well and had no reason to give results like this. I’ll attach the files in the google drive link at the end.

Now for the main part. Without touching anything but switching the solver to Calculix 2.22 (apart from doing Save As… and changing the file name and analysis name) I get the following results after recalculation:

 ![netgen-75mm-ccx222](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/3/322826757fbbe8099f93b7c1c724cb261186807e.png)

 ![gmsh-75mm-ccx222](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/4/41540ca942c297001ed34f755892606e5a024dbc.jpeg)

These are expected results and they look textbook basically.

I have also tried previous PrePoMax versions going back to 1.3.5. All had the same problems as the above or even worse, not finishing the calculation. The first version that has worked at all was 2.1.0 and even then not consistent - sometimes changing to newer Calculix yielded no results or they were bad as well. The only version that consistently works well for me is the newest 2.1.10 and only with Calculix 2.22.

Currently the easy fix is just to download Calculix from here and point PrePoMax to it.

> <https://github.com/calculix/CalculiX-Windows/blob/master/releases/CalculiX-2.22.0-win-x64.zip>

Here are both good and bad files for testing:  
[https://drive.google.com/drive/folders/14qdzhNBNDBZXHkMHKwLu4hzCIqviTks2?usp=drive\_link](https://drive.google.com/drive/folders/14qdzhNBNDBZXHkMHKwLu4hzCIqviTks2?usp=drive_link)

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [September 16, 2024, 2:31pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/2 "2024-09-16T14:31:24Z")

</div>

> [@aleksa](#):
>
> Here are both good and bad files for testing:

Please set access to _Anyone with the link_ and then copy and share the link again.

---

<div class="post-metadata">

**Author:** ![aleksa](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/aleksa/32/3305_2.png) [@aleksa](https://prepomax.discourse.group/u/aleksa)\
**Post date:** [September 16, 2024, 2:32pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/3 "2024-09-16T14:32:56Z")

</div>

Yes I’ve seen it now. Its fixed, sorry.

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 16, 2024, 2:41pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/4 "2024-09-16T14:41:33Z")

</div>

i guessed inconsistency by PaStiX solver in shell element with thin part, but it’s a good news latest version gave consistent and expected results.

---

<div class="post-metadata">

**Author:** ![Trevor](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Trevor](https://prepomax.discourse.group/u/Trevor)\
**Post date:** [September 16, 2024, 4:27pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/5 "2024-09-16T16:27:46Z")

</div>

The calculix build you linked, compliled by Cesare Guardino only has the spooles solver in the build.  
If you have the default solver in PrePoMax chosen it will run successfully with the spooles solver in this ccx2.22 build. This is the reason you get correct results.  
If you choose PaStiX you’ll get “\*ERROR in linstatic: the PASTIX library is not linked”

The default is PaStiX in the PrePoMax ccx2.21 distribution.  
If you’re wanting to use this and have access to all the other solvers then set PASTIX\_MIXED\_PRECISION=0 in the enviroment variables in PrePoMax, this will then give you correct results. Mixed precision in PaStiX is the root cause I believe, it’s been like this for some time.

---

<div class="post-metadata">

**Author:** ![aleksa](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/aleksa/32/3305_2.png) [@aleksa](https://prepomax.discourse.group/u/aleksa)\
**Post date:** [September 16, 2024, 5:13pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/6 "2024-09-16T17:13:53Z")

</div>

Ok this might be a stupid question, but I’m more of a typical user so here goes:

> [@Trevor](#):
>
> PASTIX\_MIXED\_PRECISION=0 in the enviroment variables in PrePoMax

Where do I input this line? I tried to just switch the solvers and I’ve had the same bad results anyway.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [September 16, 2024, 5:20pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/7 "2024-09-16T17:20:51Z")

</div>

> [@aleksa](#):
>
> Where do I input this line?

Environment variables for CalculiX in PrePoMax can be set under Tools → Settings → CalculiX:

 ![env](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/a/afe0c9a75b0049f5c8166a9568c6e0e8d9fdc083.jpeg)

---

<div class="post-metadata">

**Author:** ![aleksa](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/aleksa/32/3305_2.png) [@aleksa](https://prepomax.discourse.group/u/aleksa)\
**Post date:** [September 16, 2024, 5:41pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/8 "2024-09-16T17:41:30Z")

</div>

Ah thank you, it has been a long day 😄

But unfortunately this fix seems to not work:

 ![pastix-fix-not_working](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/b/bb2ca4d22f532971ab7844b3667e3141f1cec26d.png)

Anyway thank you guys for your time and dedication, you’ve been a great help.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [September 16, 2024, 5:42pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/9 "2024-09-16T17:42:44Z")

</div>

> [@aleksa](#):
>
> But unfortunately this fix seems to not work:

Name should be PASTIX\_MIXED\_PRECISION while value should be 0.

---

<div class="post-metadata">

**Author:** ![aleksa](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/aleksa/32/3305_2.png) [@aleksa](https://prepomax.discourse.group/u/aleksa)\
**Post date:** [September 16, 2024, 5:51pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/10 "2024-09-16T17:51:47Z")

</div>

Thank you again, now it works. Seems I have a lot to learn apart from FE analysis…

 ![pastix-fix-working](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/e/e35fe99078f0f7de851f9ea6653a1acdd1e467af.jpeg)

Also now that I’ve known what to look for I found this:

> **[Problems with PaStiX solver and shell elements](https://calculix.discourse.group/t/problems-with-pastix-solver-and-shell-elements/1169)**
>
> I prepared a simple model to demonstrate the wrong results when using the PaStiX solver from the official CalculiX version 2.19 for Windows: file ccx\_static.exe (the same also goes for version 2.18). The model is a simple I-profile meshed using...

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 16, 2024, 6:26pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/11 "2024-09-16T18:26:05Z")

</div>

well that’s Spooles solver which has known reputable for so long, not from official distribution also. Regarding PaStiX solver and shell element, i have no luck even mixed precision has been set, still did not help for case of extreme thickness to spans ratio.

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 16, 2024, 6:59pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/12 "2024-09-16T18:59:38Z")

</div>

unfortunately the problem persist, probably PaStiX solver is working best at truly solid element.

![2024-09-17 01_54_26-PropertyGrid](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/7/7b74abdfc2783681c72ae339064ee016616d7baf.png)

 ![2024-09-17 01_53_10-](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/4/4016a4b0feb0b7db5141f484f9e5703a645121c5.png)

expected result by Spooles solver,

 ![2024-09-17 02_03_36-](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/d/df41162851d454c6772efc19f319b0fdf3b37504.png)

---

<div class="post-metadata">

**Author:** ![aleksa](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/aleksa/32/3305_2.png) [@aleksa](https://prepomax.discourse.group/u/aleksa)\
**Post date:** [September 16, 2024, 7:12pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/13 "2024-09-16T19:12:50Z")

</div>

Yes, seems like I just stumbled upon a solution by changing to ccx 2.22 without knowing what I actually did or what was changed.

Never knew what to look for, now I see its known for about two years 😅

But its not all bad, I’ve learned a lot of different things along the way.

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 16, 2024, 8:05pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/14 "2024-09-16T20:05:49Z")

</div>

that’s okay in reporting unexpected result since it will notify another user. Also, solver selection is an advanced one due to case dependent. Shell and beam element may be use Spooles or Pardiso as a solver, i guessed knot and/or MPC during expansion cause of problem in specific case of thickness to spans ratio.

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [September 17, 2024, 6:09am UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/15 "2024-09-17T06:09:49Z")

</div>

> [@Trevor](#):
>
> The default is PaStiX in the PrePoMax ccx2.21 distribution.  
> If you’re wanting to use this and have access to all the other solvers then set PASTIX\_MIXED\_PRECISION=0 in the enviroment variables in PrePoMax, this will then give you correct results. Mixed precision in PaStiX is the root cause I believe, it’s been like this for some time.

Would it make sense to include this environmental setting in the default setting in PrePoMax?

---

<div class="post-metadata">

**Author:** ![aleksa](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/aleksa/32/3305_2.png) [@aleksa](https://prepomax.discourse.group/u/aleksa)\
**Post date:** [September 17, 2024, 7:22am UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/16 "2024-09-17T07:22:15Z")

</div>

As far as I’m concerned, after spending months trying to figure this out before reaching out, I’d say no if it hurts calculations for solids.

Maybe an option is to put some sort of reminder or recommendation in the help section about solver uses for different analysis types. Short of a tutorial or manual but more than nothing for guys like me who are new to open source FEA.

If it doesn’t have any negative consequences then its worth including it in the release.

I’m preparing to write tips&tricks for global analysis of shell compound parts since now I have the workflow sorted out. I’ll include the lessons from here as well.

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 17, 2024, 10:04am UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/17 "2024-09-17T10:04:08Z")

</div>

that’s what i was thinking, similar to personal experiences of shell element in CalculiX. If i may contribute to discussion, setting mixed precision to zero can help in general case, but not always work for extremely large thickness to spans/length ratio (about 1:1000 and higher). Another consequences of these setting are in computational times become slower, but still good recommendation for default.

Some caution also can be useful, a solver selection message can be shown when the model contains shell element.

---

<div class="post-metadata">

**Author:** ![Trevor](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Trevor](https://prepomax.discourse.group/u/Trevor)\
**Post date:** [September 18, 2024, 8:53am UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/18 "2024-09-18T08:53:24Z")

</div>

I think it’s a better default option to switch off the mixed precision  
Maybe change the default solver

the solvers that work

- Single threaded Spooles (multithreaded \>2 delivers inconsistency in buckling)
- MKL Pardiso (have yet to find an issue)
- Pastix with mixed precision turned off by an environment variable (shell solution problem in mixed precision)

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [September 18, 2024, 12:26pm UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/19 "2024-09-18T12:26:35Z")

</div>

In my experience, the Pardiso solver also performed the best - consistently. So I think changing the default solver is a better idea for the future.

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 19, 2024, 11:53am UTC](https://prepomax.discourse.group/t/a-case-for-calculix-2-22/2016/20 "2024-09-19T11:53:08Z")

</div>

It seems Spooles solver from official distribution is not support multi-thread, it can be used as default in general and basic. However, the solver running slowly at large multipart contact analysis including plasticity. Just before PaStiX implementing, Pardiso is best at these cases but can not be better than PaStiX after at AMD processor. Maybe another Intel user have different experiences at this, since many issues reported Pardiso solver did not optimize for non Intel based processors, but result still gave consistency.
