spacether / pycalculix

Python 3 library to automate and build finite element analysis (FEA) models in Calculix. Meshing uses Calculix or GMSH.
http://justinablack.com/pycalculix/
Apache License 2.0
170 stars 56 forks source link

getting ERROR: results .frd file was not written! #15

Closed jnschilling closed 7 years ago

jnschilling commented 7 years ago

for the hole in plate full, I am getting this message. Running it in Anaconda/Jupiter: image Do you have an idea to solve this ?

spacether commented 7 years ago

I'm not sure why that would happen. What operating system and version of python are you using? Did you install pycalculix from pip or github?

jnschilling commented 7 years ago

not working on W7x64 - python3.6 (anaconda) , I installed pycalculix with pip. It works on this configuration (@home) : W10x64, python 3.5.2, installed pycalculix with pip. I will be checking this further, keep you posted

spacether commented 7 years ago

This is because the solver is writing the file into a directory different than the one that you are in. In the latest version of pycalculix, 0.9.4 this should be fixed. Please install the library from this repository and try it again.

pp4 commented 6 years ago

Hi! Many thanks for keeping pycalculix going.

I am experiencing the same "ERROR: results .frd file was not written!" problem in Windows 7 x64, Python3.6 (Anaconda). I have two probably very idiotic questions:

All the best! pp

spacether commented 6 years ago

Hi PP,

Please install pycalculix v0.9.4 and it should fix your problems. You can do that with the following steps: 1) Download the zip file here https://github.com/spacether/pycalculix/archive/master.zip 2) unzip it 3) go into the unzipped folder 'pycalculix-master' using your terminal/command line program 4) run these command in the terminal: pip install . pycalculix-add-feaprograms 5) close your terminal window and delete the unzipped folder and the zip file

Now you should be able to import pycalculix in python and run the examples here: https://github.com/spacether/pycalculix/tree/master/examples Let me know if you have any more questions.

Best, Justin Black

On Fri, Jan 12, 2018 at 6:30 AM, pp4 notifications@github.com wrote:

Hi! Many thanks for keeping pycalculix going.

I am experiencing the same "ERROR: results .frd file was not written!" problem in Windows 7 x64, Python3.6 (Anaconda). I have two probably very idiotic questions:

  • how can I update to 0.94?
  • how can I "install the library from this repository"?

All the best! pp

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/spacether/pycalculix/issues/15#issuecomment-357252674, or mute the thread https://github.com/notifications/unsubscribe-auth/AB0s3H6Y2j24ddhtWTU3znk-Hxxacmblks5tJ2yCgaJpZM4OeHO4 .

pp4 commented 6 years ago

Thank you very much, Justin.

I followed your instructions (in Anaconda Prompt), but 'pycalculix-add-feaprograms' gave the following error messages:

(python3) D:\pycalculix-master>pycalculix-add-feaprograms Detected Windows 64 bit Installing gmsh Downloading gmsh from http://gmsh.info/bin/Windows/gmsh-git-Windows64.zip Unzipping gmsh Removing gmsh zipfile Installing gmsh to c:\users\ppe\appdata\local\continuum\anaconda2\envs\python3\Scripts\gmsh-git-Windows64 Access is denied. 0 dir(s) moved. Traceback (most recent call last): File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\python3\lib\runpy.py ", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\python3\lib\runpy.py ", line 85, in _run_code exec(code, run_globals) File "C:\Users\ppe\AppData\Local\Continuum\anaconda2\envs\python3\Scripts\pyca lculix-add-feaprograms.exe__main__.py", line 9, in File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\python3\lib\site-pac kages\pycalculix\installer.py", line 31, in add windows_add(bitsize) File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\python3\lib\site-pac kages\pycalculix\installer.py", line 162, in windows_add win_add_from_url(bitsize, 'http://gmsh.info/bin/Windows/', 'gmsh') File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\python3\lib\site-pac kages\pycalculix\installer.py", line 244, in win_add_from_url subprocess.check_call(command_line, shell=True) File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\python3\lib\subproce ss.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'move gmsh-git-Windows64 c:\users\ppe\app data\local\continuum\anaconda2\envs\python3\Scripts\gmsh-git-Windows64' returned non-zero exit status 1.

The directory c:\users\ppe\app data\local\continuum\anaconda2\envs\python3\Scripts\gmsh-git-Windows64 was not created.

I afterwards tried running the example "hole-in-plate-full.py" and execution stopped when trying to write the 'hole-in-plate-full.inp' file

File: hole-in-plate-full.geo was written gmsh hole-in-plate-full.geo -2 -o hole-in-plate-full.inp File: hole-in-plate-full.inp was written Meshing done! File: hole-in-plate-full.msh was written Traceback (most recent call last): File "", line 1, in runfile('D:/hole-in-plate-full.py', wdir='D:') File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\python3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace) File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\python3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "D:/hole-in-plate-full.py", line 43, in model.mesh(1.0, 'gmsh') # mesh 1.0 fineness, smaller is finer File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\python3\lib\site-packages\pycalculix\feamodel.py", line 1634, in mesh self.mesh_gmsh(size, meshmode) File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\python3\lib\site-packages\pycalculix\feamodel.py", line 1814, in __mesh_gmsh self.read_inp(self.fname+'.inp') File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\python3\lib\site-packages\pycalculix\feamodel.py", line 1415, in __read_inp f = open(fname, 'r') FileNotFoundError: [Errno 2] No such file or directory: 'hole-in-plate-full.inp'

Before, with pycalculix 0.93, I could also not run 'pycalculix-add-feaprograms' successfully, the pycalculix crashed later, when trying to write the results .frd file.

spacether commented 6 years ago

PP,

It looks like you down't have permission to move or copy files in the Anaconda folder. Can you try running your terminal as an administrator: Run CMD.exe under admin rights (right click on cmd.exe and choose Run As Administrator). Then please run: pycalculix-add-feaprograms

Please also open an issue describing your problem here: https://github.com/spacether/pycalculix/issues

This way others can see the solution when we find it. Best, Justin Black

On Mon, Jan 15, 2018 at 12:13 AM, pp4 notifications@github.com wrote:

Thank you very much, Justin.

I followed your instructions (in Anaconda Prompt), but 'pycalculix-add-feaprograms' gave the following error messages:

(python3) D:\pycalculix-master>pycalculix-add-feaprograms Detected Windows 64 bit Installing gmsh Downloading gmsh from http://gmsh.info/bin/Windows/gmsh-git-Windows64.zip Unzipping gmsh Removing gmsh zipfile Installing gmsh to c:\users\ppe\appdata\local\continuum\anaconda2\envs\ python3\Scripts\gmsh-git-Windows64 Access is denied. 0 dir(s) moved. Traceback (most recent call last): File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\ python3\lib\runpy.py ", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\ python3\lib\runpy.py ", line 85, in

run_code exec(code, run_globals) File "C:\Users\ppe\AppData\Local\Continuum\anaconda2\envs\python3\Scripts\pyca lculix-add-feaprograms.exe_main.py", line 9, in File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\ python3\lib\site-pac kages\pycalculix\installer.py", line 31, in add windows_add(bitsize) File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\ python3\lib\site-pac kages\pycalculix\installer.py", line 162, in windows_add win_add_from_url(bitsize, 'http://gmsh.info/bin/Windows/', 'gmsh') File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\ python3\lib\site-pac kages\pycalculix\installer.py", line 244, in win_add_from_url subprocess.check_call(command_line, shell=True) File "c:\users\ppe\appdata\local\continuum\anaconda2\envs\ python3\lib\subproce ss.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'move gmsh-git-Windows64 c:\users\ppe\app data\local\continuum\anaconda2\envs\python3\Scripts\gmsh-git-Windows64' returned non-zero exit status 1.

The directory c:\users\ppe\app data\local\continuum\ anaconda2\envs\python3\Scripts\gmsh-git-Windows64 was not created.

I afterwards tried running the example "hole-in-plate-full.py" and execution stopped when trying to write the 'hole-in-plate-full.inp' file

File: hole-in-plate-full.geo was written gmsh hole-in-plate-full.geo -2 -o hole-in-plate-full.inp File: hole-in-plate-full.inp was written Meshing done! File: hole-in-plate-full.msh was written Traceback (most recent call last): File "", line 1, in runfile('D:/hole-in-plate-full.py', wdir='D:') File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\ python3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace) File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\ python3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "D:/hole-in-plate-full.py", line 43, in model.mesh(1.0, 'gmsh') # mesh 1.0 fineness, smaller is finer File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\ python3\lib\site-packages\pycalculix\feamodel.py", line 1634, in mesh self.mesh_gmsh(size, meshmode) File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\ python3\lib\site-packages\pycalculix\feamodel.py", line 1814, in __mesh_gmsh self.read_inp(self.fname+'.inp') File "C:\Users\ppe\AppData\Local\Continuum\Anaconda2\envs\ python3\lib\site-packages\pycalculix\feamodel.py", line 1415, in __read_inp f = open(fname, 'r') FileNotFoundError: [Errno 2] No such file or directory: 'hole-in-plate-full.inp'

Before, with pycalculix 0.93, I could also not run 'pycalculix-add-feaprograms' successfully, the pycalculix crashed later, when trying to write the results .frd file.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/spacether/pycalculix/issues/15#issuecomment-357609971, or mute the thread https://github.com/notifications/unsubscribe-auth/AB0s3DzyFXfy1P2czUOG_1lube34X-kRks5tKwiYgaJpZM4OeHO4 .