Here I attached the error with 0.19, After clicking ok, workbench is not active and its menu doesn't show up.josegegas wrote: ↑Sat Jan 23, 2021 4:42 am It does not work well on 0.18. All the examples were created and tested on 0.19. I have just tried on a fresh Ubuntu 20.04 installation with the FreeCAD 0.19 AppImage and it worked. Same on Windows (FreeCAD_0.19.23578-Win-Conda_vc14.x-x86_64). On Windows is easier because one does not need to install MBDyn. Just download FreeCAD 0.19 and paste the workbench into the Mod folder.
I am still curious what may be happening. Do you mind trying with 0.19 and letting me know?
FreeCAD as pre-post processor for MBDyn
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: FreeCAD as pre-post processor for MBDyn
- Attachments
-
- 0.19.jpg (18.64 KiB) Viewed 2236 times
Re: FreeCAD as pre-post processor for MBDyn
First of all,thank you josegegas.
I'm using Linux Mint 20.1 and i had some errors because mbdyn is installed in /usr/local/mbdyn .
With a symlink like
the errors are gone,in case anyone is worth.
And now,a petition.Jose,can you write something about the workflow?I can run the examples,but i don't know how are they made.
I'm using Linux Mint 20.1 and i had some errors because mbdyn is installed in /usr/local/mbdyn .
With a symlink like
Code: Select all
sudo ln -s /usr/local/mbdyn /usr/bin
And now,a petition.Jose,can you write something about the workflow?I can run the examples,but i don't know how are they made.
Re: FreeCAD as pre-post processor for MBDyn
I´m glad you were able to run the examples. Yes, I am working on a quick tutorial on how to perform the "free-falling body" simulation first. I think it will be a video tutorial, because it is way easier than a written document and because I am sure the workflow will change quickly as the workbench evolves...stanislau wrote: ↑Sat Jan 23, 2021 5:36 pm First of all,thank you josegegas.
I'm using Linux Mint 20.1 and i had some errors because mbdyn is installed in /usr/local/mbdyn .
With a symlink likethe errors are gone,in case anyone is worth.Code: Select all
sudo ln -s /usr/local/mbdyn /usr/bin
And now,a petition.Jose,can you write something about the workflow?I can run the examples,but i don't know how are they made.
Re: FreeCAD as pre-post processor for MBDyn
Sorry, I am not sure what may be happening. After searching for that error, it seems it has something to do with Matplotlib. I use Matplitlib to plot the simulation results, so it must work well for the workbench to work too.abghrnjd wrote: ↑Sat Jan 23, 2021 4:50 pmHere I attached the error with 0.19, After clicking ok, workbench is not active and its menu doesn't show up.josegegas wrote: ↑Sat Jan 23, 2021 4:42 am It does not work well on 0.18. All the examples were created and tested on 0.19. I have just tried on a fresh Ubuntu 20.04 installation with the FreeCAD 0.19 AppImage and it worked. Same on Windows (FreeCAD_0.19.23578-Win-Conda_vc14.x-x86_64). On Windows is easier because one does not need to install MBDyn. Just download FreeCAD 0.19 and paste the workbench into the Mod folder.
I am still curious what may be happening. Do you mind trying with 0.19 and letting me know?
-
- Posts: 2
- Joined: Fri May 15, 2020 2:50 pm
Re: FreeCAD as pre-post processor for MBDyn
Hi,
I also installed mbdyn on Desktop under mbdyn folder. I did the same thing: sudo ln -s /usr/bin/mbdyn /home/anirudh/Desktop/mbdyn
However, when I try to use Dynamics module testcases, i get the following error:
Running the Python command 'MBdyn_Run' failed:
Traceback (most recent call last):
File "/home/anirudh/.FreeCAD/Mod/freecad-mbdyn-dynamics-workbench-master/MBdynGui.py", line 380, in Activated
dyn.Run()
File "/home/anirudh/.FreeCAD/Mod/freecad-mbdyn-dynamics-workbench-master/dynamics.py", line 389, in Run
process = subprocess.Popen(["mbdyn", "-f", __dir1__+"/MBDynCase.mbd"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/tmp/.mount_FreeCADRGnNt/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/tmp/.mount_FreeCADRGnNt/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
[Errno 13] Permission denied: 'mbdyn'
I have done sudo chmod 777 /home/anirudh/Desktop/mbdyn
many times and also tried changing permission manually of mbdyn folder as well as /usr/bin/mbdyn shortcut as root but does not work and I always get the same error. Please can someone tell what I am missing or why python cant seem to get permission.
I even tried modifying Dynamics.py line 389 from mbdyn to manually specify path to install location of mbdyn( /home/anirudh/Desktop/mbdyn) but get same error of permission denied)in module folder of this workbench in /home/anirudh/.FreeCAD folder.
Please help.
Thanks and Regards
Anirudh
I also installed mbdyn on Desktop under mbdyn folder. I did the same thing: sudo ln -s /usr/bin/mbdyn /home/anirudh/Desktop/mbdyn
However, when I try to use Dynamics module testcases, i get the following error:
Running the Python command 'MBdyn_Run' failed:
Traceback (most recent call last):
File "/home/anirudh/.FreeCAD/Mod/freecad-mbdyn-dynamics-workbench-master/MBdynGui.py", line 380, in Activated
dyn.Run()
File "/home/anirudh/.FreeCAD/Mod/freecad-mbdyn-dynamics-workbench-master/dynamics.py", line 389, in Run
process = subprocess.Popen(["mbdyn", "-f", __dir1__+"/MBDynCase.mbd"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/tmp/.mount_FreeCADRGnNt/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/tmp/.mount_FreeCADRGnNt/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
[Errno 13] Permission denied: 'mbdyn'
I have done sudo chmod 777 /home/anirudh/Desktop/mbdyn
many times and also tried changing permission manually of mbdyn folder as well as /usr/bin/mbdyn shortcut as root but does not work and I always get the same error. Please can someone tell what I am missing or why python cant seem to get permission.
I even tried modifying Dynamics.py line 389 from mbdyn to manually specify path to install location of mbdyn( /home/anirudh/Desktop/mbdyn) but get same error of permission denied)in module folder of this workbench in /home/anirudh/.FreeCAD folder.
Please help.
Thanks and Regards
Anirudh
Re: FreeCAD as pre-post processor for MBDyn
I think the order is wrong.If you installed mbdyn in /home/anirudh/Desktop/mbdyn you should do something like :anirudhnehra wrote: ↑Sun Jan 24, 2021 3:23 pm I also installed mbdyn on Desktop under mbdyn folder. I did the same thing: sudo ln -s /usr/bin/mbdyn /home/anirudh/Desktop/mbdyn
Code: Select all
sudo ln -s /home/anirudh/Desktop/mbdyn /usr/bin
Re: FreeCAD as pre-post processor for MBDyn
I guess It says just the version is not compatible! isn't it because I'm using 0.18 and 0.19 on the same computer?Sorry, I am not sure what may be happening. After searching for that error, it seems it has something to do with Matplotlib. I use Matplitlib to plot the simulation results, so it must work well for the workbench to work too.
I think this problem can be solved easily but it's not easy for me. I didn't know anything about matplotlib's backend before this!
Re: FreeCAD as pre-post processor for MBDyn
It may be easier to edit a written document than a video if things change.josegegas wrote: ↑Sat Jan 23, 2021 11:20 pm
I´m glad you were able to run the examples. Yes, I am working on a quick tutorial on how to perform the "free-falling body" simulation first. I think it will be a video tutorial, because it is way easier than a written document and because I am sure the workflow will change quickly as the workbench evolves...
I did not look at you code this weekend. I will look at it later this week.
Re: FreeCAD as pre-post processor for MBDyn
You may want to skip the animation algorithm (animation.py). I programmed it using python lists for the position and orintation data, as well as for the animation of the force vectors and the reaction forces. This works, but is too complicated. I am now migrating the animation.py file to numpy ndarrays instead of lists, so that I can use numpy methods. The code will be much shorter after I finish this...
Re: FreeCAD as pre-post processor for MBDyn
This is an idea I´ve had in mind for a while. I have seen people struggle to write an assembly workbench for FreeCAD for years. There is assembly 2, but it only works for assembies with few parts and it often cannot solve relatively complicated assembies. Assembly 4 is a nice tool, but the lack of a solver capable of telling you how your assembly will move is a limitation. I think the reason for FreeCAD lacking an assembly workbench with the capabilities of most commercial packages is that it is quite complex to program/solve the ODEs needed. MBDyn does exactly this, it solves the assembly before performing the dynamic simulation. I think it may be worth to explore the idea of using MBDyn, or parts of it, to program an assemby workbench for FreeCAD. This workbench would generate nodes for each bodies and apply some constraints, then pass an input file for MBDyn to solve the assemby and may be even return the kinematics, so that the user can see an animated assembly, not a full MBD simmulation, but just the motion of the bodies. What do you think?