How do I do that
fcFEM - FEA from start to finish
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: fcFEM - FEA from start to finish
basically what you did now(most often the text is removed and the word ping is added).
I have see some people who can ping people from a macro but i don't where that one is coming from...
I have see some people who can ping people from a macro but i don't where that one is coming from...
Re: fcFEM - FEA from start to finish
Edit: As on this edit, @yorik enabled phpbb 'mentions', so all you need to ping someone is to prepend an @ in front of their forum usename. No need for pinger macro anymore
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: fcFEM - FEA from start to finish
If Bernd has not been active on the forum for a month then he will have a very good reason for that. I therefore don't want to bother him and am trying to understand the new input writer code on my own.
Bernd committed a major change to the FemInputWriterCcx on 19 February last year:
https://github.com/FreeCAD/FreeCAD/comm ... b8ba22117c
This affected 6 files with 29 additions and 155 deletions.
I can now locate the material data, but not yet the elements that go with that. I wrote a CCX input file to see if I can trace back where the element data comes from and how it is linked to the material in FC.
Now here is my latest challenge: Object ccxwriter gets passed around more than 100 times in 23+ files, but I cannot find the Class definition or any other declaration related to it.
Can somebody help me find it and/or give me some tips on how to unpick this Russian doll?
Bernd committed a major change to the FemInputWriterCcx on 19 February last year:
https://github.com/FreeCAD/FreeCAD/comm ... b8ba22117c
This affected 6 files with 29 additions and 155 deletions.
I can now locate the material data, but not yet the elements that go with that. I wrote a CCX input file to see if I can trace back where the element data comes from and how it is linked to the material in FC.
Now here is my latest challenge: Object ccxwriter gets passed around more than 100 times in 23+ files, but I cannot find the Class definition or any other declaration related to it.
Can somebody help me find it and/or give me some tips on how to unpick this Russian doll?
Re: fcFEM - FEA from start to finish
I can't test that right now but git grep should get you to the definition quickly
Re: fcFEM - FEA from start to finish
Thanks, same search results as with PyCharm, but still no sign of an assignment or initiation of ccxwriter. I am at a loss how it is used everywhere without any import statements.
Re: fcFEM - FEA from start to finish
Check src/Mod/Fem/femsolver/calculix/writer.py
Edit ccxwriter is used as a local variable (TBC)
Edit ccxwriter is used as a local variable (TBC)
Re: fcFEM - FEA from start to finish
Sorry, but I don’t see ccxwriter anywhere in that file. Also … if it is a local variable how does it get used in 22 other files without import of the relevant module?
Re: fcFEM - FEA from start to finish
You won't see ccxwriter definition if it's used like that:
You have to check how to function is called:
ccxwriter is self. Silly question, but are you familiar with python self?
https://www.geeksforgeeks.org/self-in-python-class/
I'll be away for a while, but if you post the part of the ccx input file I or someone else might try to help you. Element data is generated from mesh IIRC and how it's linked with the material - I'd check the CalculiX docs.
https://web.mit.edu/calculix_v2.7/Calcu ... index.html
https://web.mit.edu/calculix_v2.7/Calcu ... de113.html
https://web.mit.edu/calculix_v2.7/Calcu ... node7.html <- an example
"material is assigned to the element set Eall by means of the keyword card *SOLID SECTION. "
P.S. I found your question now. You want to extract material parameters from a ccx input file?
Material para,enters are written in: src/Mod/Fem/femsolver/calculix/write_femelement_material.py
Then the definition is used for elements - name of the material is the handle.
Code: Select all
src/Mod/Fem/femsolver/calculix/write_constraint_fixed.py:def write_meshdata_constraint(f, femobj, fix_obj, ccxwriter):
Code: Select all
src/Mod/Fem/femsolver/writerbase.py: con_module.write_meshdata_constraint(the_file, femobj, the_obj, self)
https://www.geeksforgeeks.org/self-in-python-class/
I'll be away for a while, but if you post the part of the ccx input file I or someone else might try to help you. Element data is generated from mesh IIRC and how it's linked with the material - I'd check the CalculiX docs.
https://web.mit.edu/calculix_v2.7/Calcu ... index.html
https://web.mit.edu/calculix_v2.7/Calcu ... de113.html
https://web.mit.edu/calculix_v2.7/Calcu ... node7.html <- an example
"material is assigned to the element set Eall by means of the keyword card *SOLID SECTION. "
P.S. I found your question now. You want to extract material parameters from a ccx input file?
Material para,enters are written in: src/Mod/Fem/femsolver/calculix/write_femelement_material.py
Then the definition is used for elements - name of the material is the handle.
Re: fcFEM - FEA from start to finish
Thanks. That’s the bets Python tip so far.
Not so silly. I am a FORTRAN guy and it shows.
I wrote fcFEM in Python (the FORTRANIC way) carefully avoiding objects and classes, but using list comprehension and other nifty Python tricks.
I read several books about Python, but still fell in the OOP trap.