Skip to content

Instantly share code, notes, and snippets.

@0x48piraj
Last active January 14, 2018 13:32
Show Gist options
  • Select an option

  • Save 0x48piraj/bb436bc8f9333c50aa6f9aa432edbf41 to your computer and use it in GitHub Desktop.

Select an option

Save 0x48piraj/bb436bc8f9333c50aa6f9aa432edbf41 to your computer and use it in GitHub Desktop.
Installing MBDyn on any Ubuntu Bases
Installing MBDyn on any Ubuntu Bases
1- Download and Install any Ubuntu Base.
2- After Installing, run `apt-get update`
3- Install the latest updates for gfortran and C++.
4- Download the MBDyn latest release from. https://www.mbdyn.org/?Software_Download
5- Untar the downloaded file.
6- In the directory of mbdyn[$version], configure the source code by writing the command `./configure --prefix=/usr/local`
7- Make it by writing this command In the directory of mbdyn[$version] `make`
8- Install it by writing this command In the directory of mbdyn[$version] `sudo make install`
9- Up till Step No. 8, the software is compiled and installed.
Now, you need to run an MBDyn script. Put the following code in a file say (0x48piraj)
begin: data;
problem: initial value;
end: data;
begin: initial value;
initial time: 0.;
final time: 1;
time step: 1.e-3;
max iterations: 10;
tolerance: 1.e-6;
end: initial value;
begin: control data;
structural nodes:
1
+1 ;
rigid bodies:
1 ;
joints:
1
+1;
gravity;
end: control data;
set: integer Pendulum = 1;
set: integer Mass = 2;
set: real M = 1.;
set: real L = .5;
set: real Omega0 = 1;
set: real Node1 = 1;
set: real Node2 = 2;
set: real body = 1;
set: real joint1 = 1;
set: real joint2 = 2;
reference: Pendulum,
reference, global, null,
reference, global, eye,
reference, global, null,
reference, global, 0., Omega0, 0.;
reference: Mass,
reference, Pendulum, 0., 0., -L,
reference, Pendulum, eye,
reference, Pendulum, null,
reference, Pendulum, null;
begin: nodes;
structural: Node1, dynamic,
reference, global, null,
reference, global, eye,
reference, global, null,
reference, global, null;
structural: Node2, dynamic,
reference, Mass, null,
reference, Mass, eye,
reference, Mass, null,
reference, Mass, null;
end: nodes;
begin: elements;
body: body , Node2,
M,
reference, Mass, null,
null;
joint: joint1, clamp,
Node1, node, node;
joint: joint2 , revolute hinge,
Node1,
reference, Pendulum, null,
hinge, reference, Pendulum,
1, 1.,0.,0., 3, 0.,1.,0.,
Node2,
reference, Pendulum, null,
hinge, reference, Pendulum,
1, 1.,0.,0., 3, 0.,1.,0.;
gravity: 0., 0., -1., const, 9.81;
end: elements;
10- In the terminal, invoke MBDyn to run the code by writing the following command `mbdyn –f 0x48piraj`
11- After MBDyn complete running, the output files with different extensions will be generated.
References :
- http://www.ubuntu.com/desktop/get-ubuntu/download
Best Regards,
Piyush Raj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment