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

FileNotFoundError: [WinError 3] The system cannot find the path specified: 'workplace\\wp001' #4

Open
altaflone opened this issue Jan 26, 2025 · 16 comments

Comments

@altaflone
Copy link

This is the error I get when I try to execute the preprocessor.py

can anyone help

@RitioL
Copy link
Owner

RitioL commented Jan 26, 2025

Hi, @altaflone,

You can update the 'root_path' in your config.json file to match your absolute path.

For reference, here’s mine: "root_path": "C:/Users/73668/Desktop/test/PolyFatigueCrackSim-main/workplace".

@altaflone
Copy link
Author

Thank you for your response. i am stuck on this since few days.

so the preprocessor file has to be copied to the workplace folder? do i have to run it through ABAQUS CAE using the "run script" option?

@RitioL
Copy link
Owner

RitioL commented Jan 26, 2025

1."the preprocessor file has to be copied to the workplace folder?": No, you don't have to. Just make sure you specifiying the 'root_path' in config.json.

2."do i have to run it through ABAQUS CAE using the "run script" option?": I usually run these scripts using a Python code editor like VS Code. A Python package Abqpy is reqiured to run them. You can check it out here: https://hailin.wang/abqpy/en/2022/ or https://pypi.org/project/abqpy/

@altaflone
Copy link
Author

So, i set my config.jason file like this ..

{
"root_path": "C:/PolyFatigueCrackSim-main/workplace",
"smooth_grain_boundary": false,
"ori_seed": 1
}

  1. i went to simulation_utils folder to run the scriptGenerator file.

i got the error that config.jason file is not available

so, i copied the config.jason file to the simulation_utils folder and the scriptGenerator.py worked fine using Spyder editor.

  1. then i used Ubuntu command line to locate the neper.sh

command ./neper.sh also worked fine.

  1. then i executed editInp1.py from simulation_utils folder using spyder and it also worked fine.

  2. then i executed preprocessor.py from simulation_utils folder using spyder. their was one error that "their is no module named anaqus"

so i exected through ABAQUS and i got the error as i have attached below.

kindly help to resolve this eror.

Image

Thank you

Altaf

@RitioL
Copy link
Owner

RitioL commented Jan 26, 2025

“4.then i executed preprocessor.py from simulation_utils folder using spyder. their was one error that "their is no module named anaqus"”: It looks like Abqpy isn’t installed in your Python environment. You can install the Python packages listed in requirements.txt. Google this might help: "how to install python packages in spyder"

@altaflone
Copy link
Author

Thank You for valuable advise and direction.

I installed AbqPy and also set its environment. the spyder recognized the abaqus command.

however after executing the preprocessor.py file from the simulation_utils folder using the spyder , i got the following error.

runfile('C:/PolyFatigueCrackSim-main/simulation_utils/preprocessor.py', wdir='C:/PolyFatigueCrackSim-main/simulation_utils')
Traceback (most recent call last):

File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\polyfatiguecracksim-main\simulation_utils\preprocessor.py:182
main(wp_path, model_name)

File c:\polyfatiguecracksim-main\simulation_utils\preprocessor.py:41 in main
mdb.ModelFromInputFile(name=modelName, inputFileName=inputFileName)

AttributeError: 'Mdb' object has no attribute 'ModelFromInputFile'

kindly do help with this issue, sir

regards

altaf

@RitioL
Copy link
Owner

RitioL commented Jan 26, 2025

I noticed that you’re using Abaqus 2021, while I’m on 2022. This might help: pip install abqpy==2021.*

@altaflone
Copy link
Author

i am using the compatible abqpy version that is 2021. still i am getting this error when i run preprocessor.py file using spyder.

kindly help resoving this issue.

i have attached the error below.

runfile('C:/PolyFatigueCrackSim-main/simulation_utils/preprocessor.py', wdir='C:/PolyFatigueCrackSim-main/simulation_utils')
Traceback (most recent call last):

File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\polyfatiguecracksim-main\simulation_utils\preprocessor.py:182
main(wp_path, model_name)

File c:\polyfatiguecracksim-main\simulation_utils\preprocessor.py:41 in main
mdb.ModelFromInputFile(name=modelName, inputFileName=inputFileName)

AttributeError: 'Mdb' object has no attribute 'ModelFromInputFile'

@altaflone
Copy link
Author

i have checked all the requirements. all the requirements are already installed.

when i try to execute the preprocessor.py command through spyder in the simulation_util folder i get the following error.

runfile('C:/PolyFatigueCrackSim-main/simulation_utils/preprocessor.py', wdir='C:/PolyFatigueCrackSim-main/simulation_utils')
Traceback (most recent call last):

File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\polyfatiguecracksim-main\simulation_utils\preprocessor.py:182
main(wp_path, model_name)

File c:\polyfatiguecracksim-main\simulation_utils\preprocessor.py:41 in main
mdb.ModelFromInputFile(name=modelName, inputFileName=inputFileName)

AttributeError: 'Mdb' object has no attribute 'ModelFromInputFile'

kindly guide as to what could be the reasons for this error and how to handle this error.

regards

altaf

@RitioL
Copy link
Owner

RitioL commented Jan 27, 2025

Hi, @altaflone ,

I tried the Abqpy package (2021) with my Abaqus (2022), and it worked fine. I'm not sure if this is due to Abaqus itself. If possible, you could try updating your Abaqus to version 2022 and see if that helps.

@altaflone
Copy link
Author

i was able to execute preprocessor.py in ABAQUS environment. however, i had to delete the "numThreadsPerMpiProcess" (line 154).

I will also try to run from VS or Pycharm and see if that works instead of Spyder.

Thank You

altaf

@altaflone
Copy link
Author

Hello Sir

I am trying to insert cohesive elements across the grains of polycrystal obtained.

However, it is much easier with triangular elements.

Can the type of elements be changed from CPE4 (Default) to CPS3?

Thank You

altaf

@RitioL
Copy link
Owner

RitioL commented Jan 30, 2025

Try this, and "-cl" needs to be modified. You can check other hyperparameters on Neper's official website.
Image

@altaflone
Copy link
Author

altaflone commented Jan 31, 2025

i used the elttype as tri and repleaced -cl with -rcl

i got the following error when i executed the editInp1.inp command.

runfile('C:/PolyFatigueCrackSim-main/simulation_utils/editInp1.py', wdir='C:/PolyFatigueCrackSim-main/simulation_utils')
Num of Grains: -1
Traceback (most recent call last):

File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\polyfatiguecracksim-main\simulation_utils\editinp1.py:21
inpModifier(src, new, part_name="Notched", ori_seed=ori_seed)

File C:\PolyFatigueCrackSim-main\simulation_utils\inpEditor.py:277 in inpModifier
ori = getRandomOrientation(grainN, ori_seed)

File C:\PolyFatigueCrackSim-main\simulation_utils\inpEditor.py:117 in getRandomOrientation
phi1 = np.random.uniform(0, 360, size=(grainN, 1))

File numpy\random\mtrand.pyx:1158 in numpy.random.mtrand.RandomState.uniform

File _common.pyx:636 in numpy.random._common.cont

ValueError: negative dimensions are not allowed

@altaflone
Copy link
Author

Also, the time taken to execute the ./neper.sh command for one polycrystal increased may folds. i had to stop the programme after writing the first input file only.

also, the size of input file generated was very large, 61,00,000 kb.

Thank You Sir

Altaf

@RitioL
Copy link
Owner

RitioL commented Jan 31, 2025

1.You can create only one RVE for testing. Make sure that the numbers in all scripts remain consistent. Or you can use the config.json file to manage it.
Image

2.The error is due to the current grain number calculation logic being unsuitable. You can check getGrainInfo in inpEditor.py. This function extracts the grain number by matching content in poly_quad.inp.
Image

3.There may be other places in the script that need modification later.

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

No branches or pull requests

2 participants