An error occurred in reading the cdb file of the model with cracks
Opened this issue · 12 comments
🔍 Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
🐞 Description of the bug
I used archive=pymapdl_reader.Archive('static.cdb')
command to read elements and nodes informations from the cdb file,where "static.cdb" is a file produced by software FRANC3D,an error occurred as
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\31142\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\ansys\mapdl\reader\archive.py", line 124, in __init__
self._raw = _reader.read(
^^^^^^^^^^^^^
File "ansys\\mapdl\\reader\\cython\\_reader.pyx", line 375, in ansys.mapdl.reader._reader.read
ValueError: invalid literal for int() with base 10: b'SOLID'
If I use this command read other uncracked models' cdb file it worked.
📝 Steps to reproduce
Creat a uncracked model and caculate with ANSYS and import it into FRANC3D,then introduce a crack to the model and save the file,there will be a cdb file generated.Next,read this cdb file with pymapdl_reaader.Archive
command,the error will occur.
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
19.2
🐍 Which Python version are you using?
3.11
📦 Installed packages
ansys-api-mapdl==0.5.1
ansys-api-platform-instancemanagement==1.0.0
ansys-corba==0.1.1
ansys-mapdl-core==0.67.0
ansys-mapdl-reader==0.53.0
ansys-math-core==0.1.3
ansys-platform-instancemanagement==1.1.2
ansys-tools-path==0.5.1
appdirs==1.4.4
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.1.1
cycler==0.12.1
fonttools==4.50.0
geomdl==5.3.1
grpcio==1.62.1
idna==3.6
importlib-metadata==4.13.0
importlib_resources==6.4.0
kiwisolver==1.4.5
matplotlib==3.7.5
numpy==1.24.4
packaging==24.0
pandas==2.0.3
pillow==10.3.0
platformdirs==4.2.0
pooch==1.8.1
protobuf==3.20.3
psutil==5.9.8
pyansys-tools-versioning==0.4.0
pyiges==0.3.1
pyparsing==3.1.2
python-dateutil==2.9.0.post0
pytz==2024.1
pyvista==0.43.5
requests==2.31.0
scipy==1.10.1
scooby==0.9.2
six==1.16.0
tqdm==4.66.2
tzdata==2024.1
urllib3==2.2.1
vtk==9.3.0
zipp==3.18.1
@planestress
Can you share the static.cdb file?
@planestress Can you share the static.cdb file?
Of course,here it is.
static.zip
Hi @planestress @germa89
Thanks for sharing the cdb file. So there are a few things wrong with the file that the PyMAPDL Reader Archive reader expects. I don't have access to FRANC3D so I don't know if you can change the settings there to address these issues or not.
1 The file is not really a CDB file, it is an input file. I diffrentiate between an 'cdb' file and an 'input' file in the content. This cdb file has APDL to run a solution and post-processing. True cdb files have just the FEM. It should not make a difference to the PyMAPDL Reader but if you read the cdb into MAPDL then you need to know this...well if you don't want to do the solve etc.
If you do want to import into MAPDL you may want to edit out the commands that change the working directory and the filename in the cdb file.
2 PyMAPDL Reader expects the NBLOCK and EBLOCK commands to have the max entity number and the count on the lines. You can find the help on the cdb commands here.
3 The nodes in the NBLOCK should be in ascending order, for PyMAPDL Reader, but the last node defined in the file is not the node with the largest ID.
Mike
hello sir, I would like to ask how you simulate crack growth in ansys. If you have time, can you teach me. I would be very grateful.
Ok,thank you。Can you give me your email address so that we can contact each other via email? This will make communication more convenient.
@planestress
邮箱好像被屏蔽了大佬 请问你有做过ansys裂纹扩展的相关内容吗,我最近也要开展相关工作 ,但是组里其他人没有做的,我想问下大佬你有没有参考资料一类的 @planestress
The email address seems to be blocked. I can not see it. Have you done any work related to crack growth in ANSYS? I am also going to do related work recently, but no one else in the my group has done it. I would like to ask if you have any references. Thank you so much
@planestress
@Fatigerrr
我QQ
号是3114242284,你直接加我吧
hello sir, I would like to ask how you simulate crack growth in ansys. If you have time, can you teach me. I would be very grateful.
Hi @Fatigerrr
Please see the following MAPDL Help section for more information. There are several ways of modeling crack and crack growth depending on what question you are trying to answer. There are a lot of MAPDL examples that you can use as a basis for creating PyMAPDL examples.
Also search the word 'crack' in the MAPDL Verification Manual here; there are a few fully done models with references.
Mike
p.s. you may want to post this type of question to the PyMAPDL GitHub Discussion site instead of here at the PyMAPDL Reader. The Reader is for working with already created files (result, element matrix etc) while the PyMAPDL is for all aspects of FEA/FEM utilizing MAPDL.