29.03.2015 Views

Modern Programming Concepts in Engineering - Vietnamese ...

Modern Programming Concepts in Engineering - Vietnamese ...

Modern Programming Concepts in Engineering - Vietnamese ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

import i n f . m i n i f e . f e . Node ;<br />

import i n f . m i n i f e . f e . e l e m e n t s . e1d . Truss2D ;<br />

import i n f . m i n i f e . f e . s c t . C i r c l e S ;<br />

import i n f . m i n i f e . f e . u t i l . A n a l y s i s T y p e s ;<br />

import i n f . m i n i f e . view2 . Viewer2 ;<br />

p u b l i c c l a s s PendulumProgram {<br />

p u b l i c s t a t i c void ma<strong>in</strong> ( S t r i n g [ ] a r g s ) {<br />

Model m = new Model ( ) ;<br />

Node n1 = m. createNode ( 0 . 0 , 0 . 0 ) ;<br />

Node n2 = m. createNode ( 2 . 5 , 2 . 5 ) ;<br />

Node n3 = m. createNode ( 0 . 0 , 2 . 5 ) ;<br />

C o n s t r a i n t c = new C o n s t r a i n t ( f a l s e , f a l s e , true ) ;<br />

M a t e r i a l mat = m. c r e a t e M a t e r i a l ( 5 0 0 0 0 0 . 0 , 1 0 . 0 ) ;<br />

C i r c l e S s c t = m. c r e a t e S e c t i o n ( C i r c l e S . TYPE ) ;<br />

n1 . s e t C o n s t r a i n t ( c ) ;<br />

s c t . s e t D i a m e t e r ( 0 . 1 ) ;<br />

m. c r e a t e E l e m e n t ( Truss2D . TYPE, mat , s ct , n1 , n2 ) ;<br />

m. c r e a t e E l e m e n t ( Truss2D . TYPE, mat , s ct , n2 , n3 ) ;<br />

m. g e t S e t t i n g s ( ) . s e t A c c e l e r a t i o n (DOF. T Y , 9 . 8 1 ) ;<br />

A n a l y s i s T y p e s . n o n l i n e a r T r a n s i e n t (m, 2 0 , 2 0 0 0 , 1 e − 6 , 0 . 7 ) ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!