Is FEM Running?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
PrzemoF
Posts: 3076
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Is FEM Running?

Postby PrzemoF » Tue Aug 30, 2016 3:35 pm

cnirbhay wrote:[..]This thermo-mechanical version is having some problem, I guess. CCX input file writer gets stuck at 50%.
Any solutions?
Can you post the file, so we can try to replicate the problem? What version of FreeCAD do you use?
User avatar
cnirbhay
Posts: 116
Joined: Wed Aug 17, 2016 4:24 pm

Re: Is FEM Running?

Postby cnirbhay » Tue Aug 30, 2016 4:14 pm

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6704 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: 0c449d7e8f9b2b1fb93e3f8d1865e2f59d7ed253
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Above are the version details. But today I downloaded similar version with thermo-mechanical attributes in which I'm facing the problem.
Here is the file.
Attachments
simple_chip.fcstd
(550.06 KiB) Downloaded 20 times
ulrich1a
Posts: 1958
Joined: Sun Jul 07, 2013 12:08 pm

Re: Is FEM Running?

Postby ulrich1a » Tue Aug 30, 2016 9:12 pm

cnirbhay wrote:Above are the version details. But today I downloaded similar version with thermo-mechanical attributes in which I'm facing the problem.
The thermo-mechanical analysis is only available in the current development version, except you have a special patched version.
It could also be, that the windows version is packed with an older version of ccx or an 32-bit-version, which could suffer from a memory limit.
In the past I could calculate only small problems on a 32-bit windows-computer due to this problem.

You can identify the inp-file in the temporary folder and run the ccx.exe directly with this file in a command shell. It should give you more information about the problem. ccx needs the filename without the ".inp"

The attached document works on my system.

Ulrich

OS: Debian GNU/Linux 8.5 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8315 (Git)
Build type: Release
Branch: (losgelöst von d39bd49)
Hash: 77dec4b91dcf231e04ce428a90cf7ddff5fe085c
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
easyw-fc
Posts: 2927
Joined: Thu Jul 09, 2015 9:34 am

Re: Is FEM Running?

Postby easyw-fc » Tue Aug 30, 2016 10:30 pm

cnirbhay wrote:OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6704 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: 0c449d7e8f9b2b1fb93e3f8d1865e2f59d7ed253
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Above are the version details. But today I downloaded similar version with thermo-mechanical attributes in which I'm facing the problem.
Here is the file.
Hi,
you can try the files at this thread
viewtopic.php?f=18&t=17066&p=135918#p135836

I used FC 0.17 7745 win10-64b to mesh and FC 0.17 8318 win10-64b to running Calculix
Maurice
User avatar
sgrogan
Posts: 6205
Joined: Wed Oct 22, 2014 5:02 pm

Re: Is FEM Running?

Postby sgrogan » Tue Aug 30, 2016 11:16 pm

ulrich1a wrote:The thermo-mechanical analysis is only available in the current development version, except you have a special patched version.
It could also be, that the windows version is packed with an older version of ccx or an 32-bit-version, which could suffer from a memory limit.
In the past I could calculate only small problems on a 32-bit windows-computer due to this problem.
ulrich1a is very perceptive. The 32-bit windows version comes bundled with a 32-bit cygwin build of calculix 2.6.x (I think originally compiled by jreigel) I'm working how to properly package this, but in the interim it's easy to get a more recent version yourself, and use the FEM preferences to point to it.
@bernd has kept up with the advances (search bernd+calculix) He's kept up and posted links to more advance calculix versions on both Win and Debian :)
viewtopic.php?f=18&t=14404&start=30#p135874
"fight the good fight"
User avatar
easyw-fc
Posts: 2927
Joined: Thu Jul 09, 2015 9:34 am

Re: Is FEM Running?

Postby easyw-fc » Wed Aug 31, 2016 10:30 am

sgrogan wrote:
ulrich1a wrote:The thermo-mechanical analysis is only available in the current development version, except you have a special patched version.
It could also be, that the windows version is packed with an older version of ccx or an 32-bit-version, which could suffer from a memory limit.
In the past I could calculate only small problems on a 32-bit windows-computer due to this problem.
ulrich1a is very perceptive. The 32-bit windows version comes bundled with a 32-bit cygwin build of calculix 2.6.x (I think originally compiled by jreigel) I'm working how to properly package this, but in the interim it's easy to get a more recent version yourself, and use the FEM preferences to point to it.
@bernd has kept up with the advances (search bernd+calculix) He's kept up and posted links to more advance calculix versions on both Win and Debian :)
viewtopic.php?f=18&t=14404&start=30#p135874
Hi,
FC 0.17 8324 win10-64b is using CalculiX v2.8p2

Code: Select all

ccx -v
This is version version 2.8p2
I tried to download a more recent windows version of CCX here
http://www.bconverged.com/data/content/ ... in_002.zip
and here
https://github.com/GeneralElectric/Calc ... in-x64.zip
but with both I get some errors during thermo mechanical analysis i.e. on this file
fem-simplyfied-v6-c.FCStd
(note: it has to be edited .inp file changing the second *BOUNDARY parameter to *CFLUX)

Code: Select all

***********************************************************
** Fixed temperature constraint applied
** written by write_constraints_temperature function
*CFLUX
FemConstraintTemperature,11,110.0

Code: Select all

Using CalculiX binary path from FEM preferences: C:/CalculiX-GE-OSS-2.10-win-x64/bin/ccx.exe
FemTools.setup_working_dir()  -->  self.working_dir = c:/temp
FemTools.setup_working_dir()  -->  self.working_dir = c:/temp
FemInputWriterCcx --> self.dir_name  -->  c:/temp
FemInputWriterCcx --> self.file_name  -->  c:/temp/Fusion003001002_Mesh.inp
('  ReferenceShape : ', 'Solid', ', ', 'Fusion003001001_solid', ', ', u'Fusion005 (Solid)', ' --> ', '')
('  ReferenceShape : ', 'Vertex', ', ', 'Fusion003001002', ', ', u'FusionAll', ' --> ', 'Vertex3')
('  ReferenceShape : ', 'Vertex', ', ', 'Fusion003001002', ', ', u'FusionAll', ' --> ', 'Vertex17')
editCalculixInputFile c:/temp/Fusion003001002_Mesh.inp
runCalculix
run CalculiX at: C:/CalculiX-GE-OSS-2.10-win-x64/bin/ccx.exe with: c:/temp/Fusion003001002_Mesh
calculixStarted()
PySide.QtCore.QProcess.ProcessState.Running
calculixFinished() 0
PySide.QtCore.QProcess.ProcessState.NotRunning
FemTools.setup_working_dir()  -->  self.working_dir = c:/temp
Traceback (most recent call last):
  File "C:\FreeCAD_0.17\Mod\Fem\_TaskPanelFemSolverCalculix.py", line 148, in calculixFinished
    fea.load_results()
  File "C:\FreeCAD_0.17\Mod\Fem\FemToolsCcx.py", line 199, in load_results
    self.load_results_ccxfrd()
  File "C:\FreeCAD_0.17\Mod\Fem\FemToolsCcx.py", line 210, in load_results_ccxfrd
    ccxFrdReader.importFrd(frd_result_file, self.analysis, result_name_prefix)
  File "C:\FreeCAD_0.17\Mod\Fem\ccxFrdReader.py", line 364, in importFrd
    m = readResult(filename)
  File "C:\FreeCAD_0.17\Mod\Fem\ccxFrdReader.py", line 82, in readResult
    nodes_z = float(line[37:49])
ValueError: invalid literal for float(): 1-1.60000E+0
Am I missing something or downloaded wrong version of CCX?
(with the bundled version my simulation goes fine)
thanks
Maurice
User avatar
easyw-fc
Posts: 2927
Joined: Thu Jul 09, 2015 9:34 am

Re: Is FEM Running?

Postby easyw-fc » Wed Sep 14, 2016 9:59 pm

Ok,
I found a way to get the latest Calculix 2.11 for windows that will work with FEM inside FreeCAD.
There is a Calculix Launcher for Windows (https://sourceforge.net/projects/calculixforwin)
https://sourceforge.net/projects/calcul ... p/download
This zip file includes in the bin folder
ccx210.exe (latest stable) and ccx211.exe (latest build) and related dlls for 32bit
both are working fine with FreeCAD 0.17 (tested on release 8405-64b)

Code: Select all

CalculiX Launcher is the collection of portable software, that includes:
­ CalculiX CCX (finite element solver);
­ CalculiX CGX (pre­processor and post­processor for CCX);
­ GMSH (simple parametric 3d program and mesher);
­ Mesh converters from UNV, MSH, Abaqus INP, VOL formats to CCX INP format.
Most of programs are statically linked or require some common libraries (Open­GL and
GTK2).
There is no special installation procedure.
sgrogan wrote:The 32-bit windows version comes bundled with a 32-bit cygwin build of calculix 2.6.x (I think originally compiled by jreigel) I'm working how to properly package this, but in the interim it's easy to get a more recent version yourself, and use the FEM preferences to point to it.
May be it would be fine to update the old release of ccx for windows (ccx version 2.8p2) to this latest one in the FreeCAD dev packaging...
EDIT
Here there is also the source code that could be compiled in cygwin for 64bits
https://github.com/prool/ccx_prool/tree ... x_2.11/src

Maurice
User avatar
sgrogan
Posts: 6205
Joined: Wed Oct 22, 2014 5:02 pm

Re: Is FEM Running?

Postby sgrogan » Wed Sep 14, 2016 10:26 pm

easyw-fc wrote:May be it would be fine to update the old release of ccx for windows (ccx version 2.8p2) to this latest one in the FreeCAD dev packaging...
Maurice
Thanks for the link. See also here: viewtopic.php?f=18&t=17404#p137356
I very much want to improve the situation for the users, I also want to improve respect for the license. Your link gives me another example of how to bundle softwares with different licenses.
"fight the good fight"
User avatar
easyw-fc
Posts: 2927
Joined: Thu Jul 09, 2015 9:34 am

Re: Is FEM Running?

Postby easyw-fc » Thu Sep 15, 2016 10:27 am

sgrogan wrote:
easyw-fc wrote:May be it would be fine to update the old release of ccx for windows (ccx version 2.8p2) to this latest one in the FreeCAD dev packaging...
Maurice
Thanks for the link. See also here: viewtopic.php?f=18&t=17404#p137356
I very much want to improve the situation for the users, I also want to improve respect for the license. Your link gives me another example of how to bundle softwares with different licenses.
Hi @sgrogan
I managed to build cxx for 64bit in cygwin64
I did:

Code: Select all

userC@CAD ~
$ git clone git://github.com/prool/ccx_prool ../prool/PROJECTS/ccx_prool
$ cd ../prool/PROJECTS/ccx_prool
modified Makefile changing ccx_2.8p2 to ccx_2.11

Code: Select all

# Prool's makefile
all:
	cd ARPACK;sh ./fixhome.sh;make lib
	cd ..
	cd SPOOLES.2.2;make lib
	cd ..
	cd CalculiX/ccx_2.11/src;make
	cd ../../..
	cp CalculiX/ccx_2.11/src/ccx_2.11 ccx
clean:
	cd ARPACK;make clean
	cd ..
	cd SPOOLES.2.2;make clean
	cd ..
	cd CalculiX/ccx_2.11/src;make clean
	cd ../../..
	rm ccx
and then run

Code: Select all

userC@CAD /home/prool/PROJECTS/ccx_prool
$ make
added the required dlls

Code: Select all

 Directory of C:\Calculix-211-64

09/15/2016  12:21 PM    <DIR>          .
09/15/2016  12:21 PM    <DIR>          ..
09/15/2016  11:50 AM         6,450,816 ccx211-64.exe
06/13/2016  06:55 PM            71,187 cyggcc_s-seh-1.dll
06/13/2016  06:55 PM         1,185,299 cyggfortran-3.dll
06/13/2016  06:56 PM           107,539 cyggomp-1.dll
06/13/2016  06:56 PM           314,899 cygquadmath-0.dll
08/31/2016  02:32 PM         3,306,962 cygwin1.dll
09/15/2016  12:21 PM                 0 list.txt
               7 File(s)     11,436,702 bytes
               2 Dir(s)  366,546,243,584 bytes free
the result will be in

Code: Select all

\home\prool-ok\PROJECTS\ccx_prool\ccx
just renamed ccx to ccx211-64bin.exe;
tested Calculix cxx211-64bin.exe in FC 8434-64b and worked like a charm! :D
(and running much faster 62s vs 128s on my sample FC file)
User avatar
sgrogan
Posts: 6205
Joined: Wed Oct 22, 2014 5:02 pm

Re: Is FEM Running?

Postby sgrogan » Thu Sep 15, 2016 10:38 pm

easyw-fc wrote:tested Calculix cxx211-64bin.exe in FC 8434-64b and worked like a charm! :D
(and running much faster 62s vs 128s on my sample FC file)
Can you upload the binaries somewhere?
FreeCAD Window$ user compiling calculix :o Amazing :shock:
"fight the good fight"