Closed jchkoch closed 4 years ago
I can definitely add a python test loading in a results file. I will have to find some time to do this. To give some background, I simply was trying to get started using the pycalculix and was working on getting the hole-in-plate-full.py
example to run fully and I needed to add this. From what I can tell this was necessary since I installed ccx-2.16 (under opensuse leap 15.1).
I think that the error is the strain percent but I will have another look at ccx documentation.
For your second question/ask regarding what "STR(%)" refers to, according to the documentation of ccx-2.16, the error that is calculated is:
ERR [ERROR (real), ERRORI (imaginary)]: error estimator for struc- tural calculations (cf. Section 6.12). Notice that ERR and ZZS are mutu- ally exclusive.
And further information from Section 6.12 of ccx-2.16 docs:
The Zienkiewicz-Zhu error estimator [93], [94] tries to estimate the error made by the finite element discretization. To do so, it calculates for each node an improved stress and defines the error as the difference between this stress and the one calculated by the standard finite element procedure.
I have updated the documentation string at the top of base_classes.py
to explain what the field is with a more descriptive explanation. Additionally, I have changed the code to read as you suggested RESFIELDS['error'] = ['STR(%)']
.
Then to address your first ask about adding a results file and python test for loading it, I can definitely do that although I am not sure it is strictly necessary. I ran the existing unittests which ran calling version 2.16 of ccx which creates the "error" result block in the results file and they all run successfully (I did have to specify the full path to the example python files in the function example_tester
). Please advise @spacether if you would still like me to include in a commit the results frd file (it is quite a large file).
The OS that I am using is openSUSE Leap 15.1
and I installed calculix from the openSUSE repository science
Let me know if you need anything further from me.
just added a test to prove that loading the results file I get using ccx version 2.16 works on my opensuse leap 15.1 setup. The results file is examples/hole-in-plate-full-from-ccx-ver2-16.frd
. Added the test in the file testsamples.py as it seemed logical to include it in that file (i.e. not create a new test*.py file).
Thank you for the PR! Looks good.
This PR solves the issue #56 by adding a new result data field. ccx solves for the error from each node and captures this in the results file (i.e. .frd file) which pycalculix
solve
function inproblem.py
would not understand. Therefore, I added a new mode and mode name with associated functions to make the results from the new mode be accessible.