Ccx writing .inp debugging
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Ccx writing .inp debugging
When using Calculix Solver in thermomechanical analysis the program completely freezes when I click write .inp file. I am assuming this could be because the mesh is big or the geometry has some error. What I want to know is there a way to know if it is still running or completely froze like a progress view or a log as I don't know if it will finish in a few minutes or a few hours or completely fail.
-
- Veteran
- Posts: 3158
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Ccx writing .inp debugging
Confirmed.
For ccx-solver and multimaterial. The inp-writing "hangs".
elmer solver: writing input files is 10-times faster.
See this thread, the "cup_FEM" file (last picture). I used elmer, ccx hangs.
https://forum.freecadweb.org/viewtopic.php?f=18&t=50543
At the moment we have solvers for mechanical, thermodynamic, cfd analysis.
Whats missing: a systematically comparison
I can do that in the next weeks.
Examples welcome.
For ccx-solver and multimaterial. The inp-writing "hangs".
elmer solver: writing input files is 10-times faster.
See this thread, the "cup_FEM" file (last picture). I used elmer, ccx hangs.
https://forum.freecadweb.org/viewtopic.php?f=18&t=50543
At the moment we have solvers for mechanical, thermodynamic, cfd analysis.
Whats missing: a systematically comparison
I can do that in the next weeks.
Examples welcome.
Re: Ccx writing .inp debugging
elmer uses mesh groups to write the input file. if you activate experimental feature for group meshing and remesh, inp file writing for ccx takes less than 10 seconds. Searching in 250000 elements takes time. ATM for me 15 minutes have passed, but it could take hours on huge meshes ...thschrader wrote: ↑Sat Oct 10, 2020 6:45 pm Confirmed.
For ccx-solver and multimaterial. The inp-writing "hangs".
elmer solver: writing input files is 10-times faster.
See this thread, the "cup_FEM" file (last picture). I used elmer, ccx hangs.
https://forum.freecadweb.org/viewtopic.php?f=18&t=50543
At the moment we have solvers for mechanical, thermodynamic, cfd analysis.
Whats missing: a systematically comparison
I can do that in the next weeks.
Examples welcome.
Re: Ccx writing .inp debugging
after 30 minuten ... but
means either the mesh is wrong or retrieving the elements has some problems.
Code: Select all
...
21:39:11 Count finite elements as sum of constraints: 147650
21:39:11 Count finite elements of the finite element mesh: 150176
21:39:11 ERROR: femelement_table != count_femelements
21:39:11 Error in get_femelement_sets -- > femelements_count_ok() failed!
...
-
- Veteran
- Posts: 3158
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Ccx writing .inp debugging
OK, how must I do that? Using the button?
In preferences it seems activated as default.
I run on
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22284 (Git)
Build type: Release
Branch: master
Hash: bf1e8e48389f5e9e25bd77b67fe98da4213e797c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Re: Ccx writing .inp debugging
I had a similar issue of FreeCAD hanging while writing .inp files for ccx (not just taking a long time).
Eventually tracked it down to a call to time.clock raising an AttributeError as this function is not in Python 3.
A workaround that seems to work, though I am not sure it has equivalent functionality, is to enter the following in the Python console prior to writing the .inp for the calculation:
import time
time.clock = time.process_time
For reference this is in Version 0.18 Rev 14555. Should be an easy bugfix if it hasn't already been done.
Eventually tracked it down to a call to time.clock raising an AttributeError as this function is not in Python 3.
A workaround that seems to work, though I am not sure it has equivalent functionality, is to enter the following in the Python console prior to writing the .inp for the calculation:
import time
time.clock = time.process_time
For reference this is in Version 0.18 Rev 14555. Should be an easy bugfix if it hasn't already been done.
Re: Ccx writing .inp debugging
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Ccx writing .inp debugging
Latest available release on flathub.org. Apologies if that is too far behind the curve.Kunda1 wrote: ↑Fri Oct 16, 2020 6:02 pmJFYI, https://forum.freecadweb.org/viewtopic.php?f=18&t=12212
Re: Ccx writing .inp debugging
The have a beta branch
https://github.com/flathub/org.freecadw ... 9973a6576f
So you should use that one
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Ccx writing .inp debugging
Hi!
I have the same problem with a complex compsolid.
(Sorry if I'm incompetent or hard to understand what I want to tell in details. I start use the FreeCAD nearly a week ago, and I have poor english knowledge.)
My sys info:
OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23074 (Git) AppImage
Build type: Release
Branch: master
Hash: 74b866ed3022fd1452c534dae31a721bcc668f2f
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Hungarian/Hungary (hu_HU)
Gmsh version: 3.0.6
Before I start to make the whole thing I tested the mesh and analysis on the part of it and it worked well:
This was a simplier model but it was a compsolid which built up from four body part with two different (light and normal) concrete material.
Later I build the complex model.
(This is a balcony node model)
(And I struggled a lot of with mesh generation that I found was caused by touching curved surfaces so I purged those and after of it I could make a G-mesh. I think the compsolid model have no problematic parts now.)
Gmsh mesh create raise only a warning: "Warning : Surface mesh: worst distortion = -0.118564 (avg = 0.999805, 2 elements with jac."
(Later to check what cause the main problem I run the gmsh (3.0.6) on the exported .brep and with gmsh run the defult 3D mesh generation on it without any problem [no errors, or warns] and then import the result mesh back into FreeCAD in .inp format but this not solved the main problem.)
And now when I try to write the Thermo mechanical .inp file I get nothing but a "freezed" rotating wheel mouse pointer and the above mentioned element count not equal error. (Precisely the Thermo mechanical .inp file created in the temporary dictionary but the process fails.)
Error output:
I'll be glad if you can give some advise how to solve this!
Thanks!
I have the same problem with a complex compsolid.
(Sorry if I'm incompetent or hard to understand what I want to tell in details. I start use the FreeCAD nearly a week ago, and I have poor english knowledge.)
My sys info:
OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23074 (Git) AppImage
Build type: Release
Branch: master
Hash: 74b866ed3022fd1452c534dae31a721bcc668f2f
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Hungarian/Hungary (hu_HU)
Gmsh version: 3.0.6
Before I start to make the whole thing I tested the mesh and analysis on the part of it and it worked well:
This was a simplier model but it was a compsolid which built up from four body part with two different (light and normal) concrete material.
Later I build the complex model.
(This is a balcony node model)
(And I struggled a lot of with mesh generation that I found was caused by touching curved surfaces so I purged those and after of it I could make a G-mesh. I think the compsolid model have no problematic parts now.)
Gmsh mesh create raise only a warning: "Warning : Surface mesh: worst distortion = -0.118564 (avg = 0.999805, 2 elements with jac."
(Later to check what cause the main problem I run the gmsh (3.0.6) on the exported .brep and with gmsh run the defult 3D mesh generation on it without any problem [no errors, or warns] and then import the result mesh back into FreeCAD in .inp format but this not solved the main problem.)
And now when I try to write the Thermo mechanical .inp file I get nothing but a "freezed" rotating wheel mouse pointer and the above mentioned element count not equal error. (Precisely the Thermo mechanical .inp file created in the temporary dictionary but the process fails.)
Error output:
Code: Select all
Count finite elements as sum of constraints: 36252
Count finite elements of the finite element mesh: 40434
ERROR: femelement_table != count_femelements
Error in get_femelement_sets -- > femelements_count_ok() failed!
Unexpected error when writing CalculiX input file: <class 'KeyError'>
Traceback (most recent call last):
File "/tmp/.mount_FreeCAsLJw4k/usr/Mod/Fem/femtaskpanels/task_solver_ccxtools.py", line 307, in write_input_file_handler
self.fea.write_inp_file()
File "/tmp/.mount_FreeCAsLJw4k/usr/Mod/Fem/femtools/ccxtools.py", line 379, in write_inp_file
self.inp_file_name = inp_writer.write_calculix_input_file()
File "/tmp/.mount_FreeCAsLJw4k/usr/Mod/Fem/femsolver/calculix/writer.py", line 126, in write_calculix_input_file
self.write_calculix_input()
File "/tmp/.mount_FreeCAsLJw4k/usr/Mod/Fem/femsolver/calculix/writer.py", line 152, in write_calculix_input
self.write_element_sets_material_and_femelement_type(inpfileMain)
File "/tmp/.mount_FreeCAsLJw4k/usr/Mod/Fem/femsolver/calculix/writer.py", line 1400, in write_element_sets_material_and_femelement_type
self.get_ccx_elsets_multiple_mat_solid()
File "/tmp/.mount_FreeCAsLJw4k/usr/Mod/Fem/femsolver/calculix/writer.py", line 1740, in get_ccx_elsets_multiple_mat_solid
ccx_elset["ccx_mat_name"] = mat_obj.Material["Name"]
KeyError: 'Name'
Thanks!
Last edited by froli78 on Wed Dec 09, 2020 10:11 am, edited 1 time in total.