Dhondtguido / CalculiX

This repository contains the source files of CalculiX, a three-dimensional Finite Element Program (www.calculix.de).
GNU General Public License v2.0
72 stars 16 forks source link

Slender beams go wrong with Pastix #51

Open victorkemp opened 1 year ago

victorkemp commented 1 year ago

This works fine with SOLVER=SPOOLES but displacement is all wrong with the default PASTIX. All 3 beams should be bending the same as each other as cantilevers. Refining the mesh so each element is stockier leads to a more realistic-looking but still completely wrong solution.

b32r_pastix

*NODE
1,0,1,0
2,3,0,0
3,3,-1,0
4,3,1,0
5,0,0,0
6,0,-1,0
7,1.5,-1,0
8,1.5,0,0
9,1.5,1,0
*ELEMENT,TYPE=B32R,ELSET=EAll
1,6,7,3
2,5,8,2
3,1,9,4
*MATERIAL,NAME=Material
*ELASTIC,TYPE=ISOTROPIC
200000000000,0
*BEAM SECTION,ELSET=EAll,MATERIAL=Material,SECTION=RECT
0.005,0.005
0,1,0
*BOUNDARY
1,1,6,0
5,1,6,0
6,1,6,0
*STEP
*STATIC
*CLOAD
2,3,1.23
3,3,1.23
4,3,1.23
*NODE FILE
U
*END STEP
Dhondtguido commented 1 year ago

Hi Victor, the way PastiX is adressed in CalculiX it solves directly in single precision and iterates in double precision. Solving directly in double precision should solve the issue. Guido

victorkemp @.***> schrieb am Do., 3. Aug. 2023, 04:03:

This works fine with SOLVER=SPOOLES but displacement is all wrong with the default PASTIX. All 3 beams should be bending the same as each other as cantilevers. Refining the mesh so each element is stockier leads to a more realistic-looking but still completely wrong solution.

[image: b32r_pastix] https://user-images.githubusercontent.com/118495694/257980505-30139b82-7097-4275-bf53-615adceef7e0.png

NODE 1,0,1,0 2,3,0,0 3,3,-1,0 4,3,1,0 5,0,0,0 6,0,-1,0 7,1.5,-1,0 8,1.5,0,0 9,1.5,1,0 ELEMENT,TYPE=B32R,ELSET=EAll 1,6,7,3 2,5,8,2 3,1,9,4 MATERIAL,NAME=Material ELASTIC,TYPE=ISOTROPIC 200000000000,0 BEAM SECTION,ELSET=EAll,MATERIAL=Material,SECTION=RECT 0.005,0.005 0,1,0 BOUNDARY 1,1,6,0 5,1,6,0 6,1,6,0 STEP STATIC CLOAD 2,3,1.23 3,3,1.23 4,3,1.23 NODE FILE U *END STEP

— Reply to this email directly, view it on GitHub https://github.com/Dhondtguido/CalculiX/issues/51, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQMNEXAJK54Y7KR7SVHJ4WTXTMBGVANCNFSM6AAAAAA3CCGPOY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

victorkemp commented 1 year ago

I wonder if this also shows a problem with identifying convergence failure from Pastix? I'd expect the double precision iterations should fail to converge rather than ending up wrong. The output shows error being pretty big and barely reducing before it finishes "successfully". Normal good solves have tiny error like 1e-13.

 - iteration 1 :         error                                  3.4318
 - iteration 2 :         error                                  3.4317
...
- iteration 49 :         error                                  3.3754
- iteration 50 :         error                                  3.3721
victorkemp commented 7 months ago

Confirmed that the problem goes away by setting the environment variable PASTIX_MIXED_PRECISION = 0 which seems to force double-precision mode.