Prescribed Displacement Testing and Advice
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: Prescribed Displacement Testing and Advice
I rebased it on master and included the way other objects are depelopt. It's not finished yet. On long term the file FemPrescribedDisplacement.py should be splitted. But is something Przemo introduces so his input is needed here.
FemPrescribedDisplacement.py
- _CommandPrescribedDisplacement.py
- _FemPrescribedDisplacement.py
- _ViewProviderFemPrescribedDisplacement.py
branch:
https://github.com/berndhahnebach/FreeC ... ormation01
It works great. It really makes fun to deform the structures ... But the workflow is different from the other constraints like fix and force. We should make them work the same way. In your object a shape has to be selected. In all other constraints and in shellthickness and in beamsection and in the multiple materials the object could be created without selecting a shape. In your object one has to select a shape at creation.
@sgrogan: would you provide win builts for makkemal to work with and for testing for others?
PS: You should really consider compiling FreeCAD yourself. It really is not a big deal and makes it much more easier ...
EDIT: phabricator for adding comments: http://pha.geofinder.eu/D27
FemPrescribedDisplacement.py
- _CommandPrescribedDisplacement.py
- _FemPrescribedDisplacement.py
- _ViewProviderFemPrescribedDisplacement.py
branch:
https://github.com/berndhahnebach/FreeC ... ormation01
It works great. It really makes fun to deform the structures ... But the workflow is different from the other constraints like fix and force. We should make them work the same way. In your object a shape has to be selected. In all other constraints and in shellthickness and in beamsection and in the multiple materials the object could be created without selecting a shape. In your object one has to select a shape at creation.
@sgrogan: would you provide win builts for makkemal to work with and for testing for others?
PS: You should really consider compiling FreeCAD yourself. It really is not a big deal and makes it much more easier ...
EDIT: phabricator for adding comments: http://pha.geofinder.eu/D27
Re: Prescribed Displacement Testing and Advice
Most certainly. I will need a few hours before I can get to it.bernd wrote:@sgrogan: would you provide win builts for makkemal to work with and for testing for others?
@makkemal
If you want we can find a time and I can walk you through step by step. Compiling on win is easier than git
"fight the good fight"
Re: Prescribed Displacement Testing and Advice
I'm looking at the code right now. I don't like some of the names, but that's a trivial fix. If it works (I didn't test it yet) we should get it in the master and split/rename/improve later. I can try to make a patch to split it/migrate to _FemCommand
It could be the next big thing in FEM wb after 2D structures
It could be the next big thing in FEM wb after 2D structures
Re: Prescribed Displacement Testing and Advice
makkemal wrote:Holding thumbs I got it right now, I redid everything about 10 times
win builds here:bernd wrote: @sgrogan: would you provide win builts for makkemal to work with and for testing for others?
https://github.com/sgrogan/FreeCAD/rele ... .16-femdev
@makkemal
Can you post a typical/example test file?
I get a FEM test error at comparing to .imp file (as expected)
"fight the good fight"
Re: Prescribed Displacement Testing and Advice
Thanks for everyone for helping em get this up to standard.
A test file attached that seems to work fine on compiled version. (@sprogan I don't know what error you are referring to )
Bernd I will look at what you did to fit into the standard and make sure I do it correctly next time.
I get what you are saying about consistency on how it works, now to git my git-hub onto your branch and fix it....
Thanks again
Michael
A test file attached that seems to work fine on compiled version. (@sprogan I don't know what error you are referring to )
Bernd I will look at what you did to fit into the standard and make sure I do it correctly next time.
I get what you are saying about consistency on how it works, now to git my git-hub onto your branch and fix it....
Thanks again
Michael
- Attachments
-
- test_disp.FCStd
- (54.77 KiB) Downloaded 51 times
Re: Prescribed Displacement Testing and Advice
@makkemal:
Ahh some more hints:
- you may have a look at Przemo's comments too. See http://pha.geofinder.eu/D27
- TestFem needs to be fixed
- we should allow to do an static calculation without force constraint if a prescribed constraint is in the analysis (FemTools.py)
I did not say thanks for the development you did already Michael
Ahh some more hints:
- you may have a look at Przemo's comments too. See http://pha.geofinder.eu/D27
- TestFem needs to be fixed
- we should allow to do an static calculation without force constraint if a prescribed constraint is in the analysis (FemTools.py)
I did not say thanks for the development you did already Michael
Re: Prescribed Displacement Testing and Advice
Thanks very helpful, but can you explain to me why is is better to split in three files ?- you may have a look at Przemo's comments too. See http://pha.geofinder.eu/D27
FemPrescribedDisplacement.py
- _CommandPrescribedDisplacement.py
- _FemPrescribedDisplacement.py
- _ViewProviderFemPrescribedDisplacement.py
I'm not sure which part should be in what file and why this is a better practise ?
I have no idea what need to be fixed here ?TestFem needs to be fixed
I think this should stay as is, with only a single prescribed displacement the fem model is not fully constrained, typical symmetry problemwe should allow to do an static calculation without force constraint if a prescribed constraint is in the analysis (FemTools.py)
Re: Prescribed Displacement Testing and Advice
The main reason for splitting is that we have 4-5 active developers in FEM wb code and keeping everything splitted makes it a bit easier for everybody to rebase theis current work on top of the master branch. Keeping one class per file makes it easier to work with the code especially if there are functions with the same names in different classes like "update" or "GetResources". When you search for "update" you don't have to check if that's the "update" you want - you just know it, because there is no other "update" in the file.
Use one file for one class unless there is good reason to keep 2 classes together. Name that file after the class name.
I guess that "TestFem needs to be fixed" means that your code changes introduce changes in the .inp file and it causes our internal tests to fail. The tests are designed to catch problems by comparing a generated .inp file with a template file. To run the tests start "FreeCAD -t 0" from command line or go to Test workbench and start them manually.
Edit: Updating test files: viewtopic.php?f=18&t=12552&p=100612
Use one file for one class unless there is good reason to keep 2 classes together. Name that file after the class name.
I guess that "TestFem needs to be fixed" means that your code changes introduce changes in the .inp file and it causes our internal tests to fail. The tests are designed to catch problems by comparing a generated .inp file with a template file. To run the tests start "FreeCAD -t 0" from command line or go to Test workbench and start them manually.
Edit: Updating test files: viewtopic.php?f=18&t=12552&p=100612
Re: Prescribed Displacement Testing and Advice
change to Workbench Test framework --> click on Self-test --> choose TestFem --> click on Start --> to see the errors in the *.inp filesmakkemal wrote:...I have no idea what need to be fixed here ?TestFem needs to be fixedPrzemoF wrote:I guess that "TestFem needs to be fixed" means that your code changes introduce changes in the .inp file and it causes our internal tests to fail. The tests are designed to catch problems by comparing a generated .inp file with a template file. To run the tests start "FreeCAD -t 0" from command line or go to Test workbench and start them manually.
EDIT: per python:
Code: Select all
import unittest
suite = unittest.TestSuite()
suite.addTest(unittest.defaultTestLoader.loadTestsFromName("TestFem"))
r = unittest.TextTestRunner()
r.run(suite)
Re: Prescribed Displacement Testing and Advice
Have a look at this commit in master https://github.com/FreeCAD/FreeCAD/comm ... diff=split This is how the file looked before https://github.com/FreeCAD/FreeCAD/blob ... ickness.pymakkemal wrote: Thanks very helpful, but can you explain to me why is is better to split in three files ?
FemPrescribedDisplacement.py
- _CommandPrescribedDisplacement.py
- _FemPrescribedDisplacement.py
- _ViewProviderFemPrescribedDisplacement.py
Or as przemo suggestet, leave all in one module and we split it later. What I saw is you only have a class MakePrescribedDisplacement. Would you splitt this class in class makePrescribedDisplacement and _PrescribedDisplacement. see https://github.com/FreeCAD/FreeCAD/blob ... ickness.py