Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when trying to run optimization error accures #26

Open
DrJohannessen opened this issue Jan 1, 2023 · 9 comments
Open

when trying to run optimization error accures #26

DrJohannessen opened this issue Jan 1, 2023 · 9 comments

Comments

@DrJohannessen
Copy link

DrJohannessen commented Jan 1, 2023

14:41:59 Traceback (most recent call last):
14:41:59 File "A:/beso-master\beso_lib.py", line 633, in import_FI_int_pt
14:41:59 f = open(file_nameW + ".dat", "r")
14:41:59 FileNotFoundError: [Errno 2] No such file or directory: 'A:/beso-master\file000.dat'
14:41:59
During handling of the above exception, another exception occurred:

14:41:59 Traceback (most recent call last):
14:41:59 File "A:/beso-master/beso_fc_gui.py", line 937, in on_click24
14:41:59 self.on_click23() # run optimization
14:41:59 File "A:/beso-master/beso_fc_gui.py", line 933, in on_click23
14:41:59 exec(open(os.path.join(beso_gui.beso_dir, "beso_main.py")).read())
14:41:59 File "", line 392, in
14:41:59 File "A:/beso-master\beso_lib.py", line 637, in import_FI_int_pt
14:41:59 assert False, msg
14:41:59 AssertionError: CalculiX result file not found, check your inputs

FreeCad Version: 0.20.1

@fandaL
Copy link
Collaborator

fandaL commented Jan 2, 2023 via email

@DrJohannessen
Copy link
Author

image
those are all the files in the working directory. I ran caluclix on the inp file after i wrote it to the directory, i did it in the freecad interface if that matters. im not shure how i could run calculix on file000.inp, cause when i try to open the ccx.exe nothing happens.

@fandaL
Copy link
Collaborator

fandaL commented Jan 2, 2023 via email

@DrJohannessen
Copy link
Author

i ran it with the freecad method and everything worked without error or any warnings.

@fandaL
Copy link
Collaborator

fandaL commented Jan 4, 2023

i ran it with the freecad method and everything worked without error or any warnings.

If it ran without errors (FreeCAD prints in the side panel CalculiX done without error!), there should be results imported to FreeCAD.

Did you follow some example? I mean, beso does not work on your computer at all?

@fandaL fandaL closed this as completed Jan 4, 2023
@fandaL fandaL reopened this Jan 4, 2023
@DrJohannessen
Copy link
Author

nah, i put the the file000 content into free cad inp file and run calilux, that worked, but with beso i still get the same errors

@fandaL
Copy link
Collaborator

fandaL commented Jan 5, 2023

This is the code which is inside beso to run CalculiX. You can try to run it in the FreeCAD python console.

path_calculix = 'C:/Program Files/FreeCAD 0.20/bin/ccx.exe'
path = 'C:/workfolder'

import os
import subprocess
i = 0
file_nameW = os.path.join(path, "file" + str(i).zfill(3))
subprocess.call([os.path.normpath(path_calculix), file_nameW], cwd=path, shell=True)

I took the first two lines from my beso_conf.py file. path should be the path to the folder with the calculix input file000.inp

If you replace the last line by this
subprocess.run([os.path.normpath(path_calculix), file_nameW], cwd=path, shell=True, capture_output=True)
it should print CalculiX report.

Does it make something in the working folder?

@DrJohannessen
Copy link
Author

image
thats the error i get.

running it with the last line replace results in this
image

@sebastianmaklary
Copy link

sebastianmaklary commented Mar 7, 2023

Edit because I was perhaps unclear: I experience the same if I use the files found in example 2 but it works if I use the files found in the main folder.

Original message:
I'm eperiencing this issue too when trying to run beso on 3D part using the files in example 2 or 3 regardless of whether it is the examples downloaded from here, where I've only changed the calculix folder path or if it is an inp file that I've exported using Mecway. 2D analysis works both on example 1 and when I export an inp file from Meway when I copy the main folder files into those folders and run.
If it matters: I'm running CalculiX version 2.19 i8.

I thus believe that I've found a solution. I noticed a difference in the file size between the files that are in the example 1 folder and in the other folders. By copying the files from the main folder, I can now run beso on 3D parts as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants