!
!-------------------------- Default Units for Model ---------------------------!
!
!
defaults units  &
   length = inch  &
   angle = deg  &
   force = pound_force  &
   mass = pound_mass  &
   time = sec
!
defaults units  &
   coordinate_system_type = cartesian  &
   orientation_type = body313
!
!------------------------ Default Attributes for Model ------------------------!
!
!
defaults attributes  &
   inheritance = bottom_up  &
   icon_visibility = on  &
   grid_visibility = off  &
   size_of_icons = 1.968503937  &
   spacing_for_grid = 39.3700787402
!
!------------------------------ Adams/View Model ------------------------------!
!
!
model create  &
   model_name = prob9
!
view erase
!
!--------------------------------- Materials ----------------------------------!
!
!
material create  &
   material_name = .prob9.steel  &
   adams_id = 1  &
   youngs_modulus = 3.002281171E+007  &
   poissons_ratio = 0.29  &
   density = 0.2818290049
!
!-------------------------------- Rigid Parts ---------------------------------!
!
! Create parts and their dependent markers and graphics
!
!----------------------------------- ground -----------------------------------!
!
!
! ****** Ground Part ******
!
defaults model  &
   part_name = ground
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.ground
!
! ****** Markers for current part ******
!
marker create  &
   marker_name = .prob9.ground.point_A_fixed  &
   adams_id = 18  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.ground.MARKER_11  &
   adams_id = 11  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.ground.MARKER_17  &
   adams_id = 17  &
   location = 10.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.ground.MARKER_21  &
   adams_id = 21  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.ground.MARKER_22  &
   adams_id = 22  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.ground.MARKER_23  &
   adams_id = 23  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.ground.MARKER_25  &
   adams_id = 25  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
part create rigid_body mass_properties  &
   part_name = .prob9.ground  &
   material_type = .prob9.steel
!
part attributes  &
   part_name = .prob9.ground  &
   name_visibility = off
!
!----------------------------------- body_2 -----------------------------------!
!
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.ground
!
part create rigid_body name_and_position  &
   part_name = .prob9.body_2  &
   adams_id = 2  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.body_2
!
! ****** Markers for current part ******
!
marker create  &
   marker_name = .prob9.body_2.MARKER_19  &
   adams_id = 19  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.point_O2  &
   adams_id = 1  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.pointA  &
   adams_id = 2  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.cm  &
   adams_id = 7  &
   location = 2.0, 0.0, 0.0  &
   orientation = 270.0d, 90.0d, 90.0d
!
marker create  &
   marker_name = .prob9.body_2.MARKER_10  &
   adams_id = 10  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.MARKER_12  &
   adams_id = 12  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.MARKER_20  &
   adams_id = 20  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.MARKER_24  &
   adams_id = 24  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.MARKER_26  &
   adams_id = 26  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_2.MARKER_27  &
   adams_id = 27  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
part create rigid_body mass_properties  &
   part_name = .prob9.body_2  &
   material_type = .prob9.steel
!
! ****** Graphics for current part ******
!
geometry create shape link  &
   link_name = .prob9.body_2.LINK_1  &
   i_marker = .prob9.body_2.point_O2  &
   j_marker = .prob9.body_2.pointA  &
   width = 1.0  &
   depth = 0.5
!
part attributes  &
   part_name = .prob9.body_2  &
   color = RED  &
   name_visibility = off
!
!----------------------------------- body_3 -----------------------------------!
!
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.ground
!
part create rigid_body name_and_position  &
   part_name = .prob9.body_3  &
   adams_id = 3  &
   location = 4.2666698898, -3.9911009972, 0.0  &
   orientation = 93.8226d, 0.0d, 0.0d
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.body_3
!
! ****** Markers for current part ******
!
marker create  &
   marker_name = .prob9.body_3.MARKER_3  &
   adams_id = 3  &
   location = 4.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_3.pointB  &
   adams_id = 4  &
   location = 14.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_3.cm  &
   adams_id = 8  &
   location = 9.0, 0.0, 0.0  &
   orientation = 270.0d, 90.0d, 90.0d
!
marker create  &
   marker_name = .prob9.body_3.MARKER_13  &
   adams_id = 13  &
   location = 4.0, 0.0, 0.0  &
   orientation = 266.1774d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_3.MARKER_14  &
   adams_id = 14  &
   location = 14.0, 3.5144678069E-011, 0.0  &
   orientation = 266.1774d, 0.0d, 0.0d
!
part create rigid_body mass_properties  &
   part_name = .prob9.body_3  &
   material_type = .prob9.steel
!
! ****** Graphics for current part ******
!
geometry create shape link  &
   link_name = .prob9.body_3.LINK_2  &
   i_marker = .prob9.body_3.MARKER_3  &
   j_marker = .prob9.body_3.pointB  &
   width = 1.0  &
   depth = 0.5
!
part attributes  &
   part_name = .prob9.body_3  &
   color = GREEN  &
   name_visibility = off
!
!----------------------------------- body_4 -----------------------------------!
!
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.ground
!
part create rigid_body name_and_position  &
   part_name = .prob9.body_4  &
   adams_id = 4  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.body_4
!
! ****** Markers for current part ******
!
marker create  &
   marker_name = .prob9.body_4.MARKER_5  &
   adams_id = 5  &
   location = 3.3333252755, 9.977752493, 0.0  &
   orientation = 303.7490220136d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_4.MARKER_6  &
   adams_id = 6  &
   location = 10.0, 0.0, 0.0  &
   orientation = 303.7490220136d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_4.cm  &
   adams_id = 9  &
   location = 6.6666626378, 4.9888762465, 0.0  &
   orientation = 213.7490220138d, 90.0000000064d, 90.0000000419d
!
marker create  &
   marker_name = .prob9.body_4.MARKER_15  &
   adams_id = 15  &
   location = 3.3333252755, 9.977752493, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
marker create  &
   marker_name = .prob9.body_4.MARKER_16  &
   adams_id = 16  &
   location = 10.0, 0.0, 0.0  &
   orientation = 0.0d, 0.0d, 0.0d
!
part create rigid_body mass_properties  &
   part_name = .prob9.body_4  &
   material_type = .prob9.steel
!
! ****** Graphics for current part ******
!
geometry create shape link  &
   link_name = .prob9.body_4.LINK_3  &
   i_marker = .prob9.body_4.MARKER_5  &
   j_marker = .prob9.body_4.MARKER_6  &
   width = 1.0  &
   depth = 0.5
!
part attributes  &
   part_name = .prob9.body_4  &
   color = MAIZE  &
   name_visibility = off
!
!----------------------------------- Joints -----------------------------------!
!
!
constraint create joint revolute  &
   joint_name = .prob9.joint_21  &
   adams_id = 1  &
   i_marker_name = .prob9.body_2.MARKER_10  &
   j_marker_name = .prob9.ground.MARKER_11
!
constraint attributes  &
   constraint_name = .prob9.joint_21  &
   name_visibility = off
!
constraint create joint revolute  &
   joint_name = .prob9.joint_32  &
   adams_id = 2  &
   i_marker_name = .prob9.body_2.MARKER_12  &
   j_marker_name = .prob9.body_3.MARKER_13
!
constraint attributes  &
   constraint_name = .prob9.joint_32  &
   name_visibility = off
!
constraint create joint revolute  &
   joint_name = .prob9.joint_34  &
   adams_id = 3  &
   i_marker_name = .prob9.body_3.MARKER_14  &
   j_marker_name = .prob9.body_4.MARKER_15
!
constraint attributes  &
   constraint_name = .prob9.joint_34  &
   name_visibility = off
!
constraint create joint revolute  &
   joint_name = .prob9.joint_41  &
   adams_id = 4  &
   i_marker_name = .prob9.body_4.MARKER_16  &
   j_marker_name = .prob9.ground.MARKER_17
!
constraint attributes  &
   constraint_name = .prob9.joint_41  &
   name_visibility = off
!
!----------------------------------- Forces -----------------------------------!
!
!
!----------------------------- Simulation Scripts -----------------------------!
!
!
simulation script create  &
   sim_script_name = .prob9.Last_Sim  &
   commands =   &
              "simulation single_run transient type=auto_select end_time=( 2*pi/45 ) number_of_steps=360 model_name=.prob9 initial_static=no"
!
!-------------------------- Adams/View UDE Instances --------------------------!
!
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.ground
!
undo begin_block suppress = yes
!
ude create instance  &
   instance_name = .prob9.omega_2  &
   definition_name = .MDI.Constraints.general_motion  &
   location = 0.0, 0.0, 0.0  &
   orientation = 0.0, 0.0, 0.0
!
!-------------------------- Adams/View UDE Instance ---------------------------!
!
!
variable modify  &
   variable_name = .prob9.omega_2.i_marker  &
   object_value = (.prob9.body_2.MARKER_10)
!
variable modify  &
   variable_name = .prob9.omega_2.j_marker  &
   object_value = (.prob9.ground.MARKER_11)
!
variable modify  &
   variable_name = .prob9.omega_2.constraint  &
   object_value = (.prob9.joint_21)
!
variable modify  &
   variable_name = .prob9.omega_2.t1_type  &
   integer_value = 0
!
variable modify  &
   variable_name = .prob9.omega_2.t2_type  &
   integer_value = 0
!
variable modify  &
   variable_name = .prob9.omega_2.t3_type  &
   integer_value = 0
!
variable modify  &
   variable_name = .prob9.omega_2.r1_type  &
   integer_value = 0
!
variable modify  &
   variable_name = .prob9.omega_2.r2_type  &
   integer_value = 0
!
variable modify  &
   variable_name = .prob9.omega_2.r3_type  &
   integer_value = 2
!
variable modify  &
   variable_name = .prob9.omega_2.t1_func  &
   string_value = "0 * time"
!
variable modify  &
   variable_name = .prob9.omega_2.t2_func  &
   string_value = "0 * time"
!
variable modify  &
   variable_name = .prob9.omega_2.t3_func  &
   string_value = "0 * time"
!
variable modify  &
   variable_name = .prob9.omega_2.r1_func  &
   string_value = "0 * time"
!
variable modify  &
   variable_name = .prob9.omega_2.r2_func  &
   string_value = "0 * time"
!
variable modify  &
   variable_name = .prob9.omega_2.r3_func  &
   string_value = "45"
!
variable modify  &
   variable_name = .prob9.omega_2.t1_ic_disp  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.t2_ic_disp  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.t3_ic_disp  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.r1_ic_disp  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.r2_ic_disp  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.r3_ic_disp  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.t1_ic_velo  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.t2_ic_velo  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.t3_ic_velo  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.r1_ic_velo  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.r2_ic_velo  &
   real_value = 0.0
!
variable modify  &
   variable_name = .prob9.omega_2.r3_ic_velo  &
   real_value = 0.0
!
ude modify instance  &
   instance_name = .prob9.omega_2
!
undo end_block
!
!---------------------------------- Accgrav -----------------------------------!
!
!
force create body gravitational  &
   gravity_field_name = gravity  &
   x_component_gravity = 0.0  &
   y_component_gravity = -386.0885826772  &
   z_component_gravity = 0.0
!
!----------------------------- Analysis settings ------------------------------!
!
!
executive_control set solver_parameters  &
   model_name = prob9  &
   solver_type = calahan
!
!---------------------------------- Measures ----------------------------------!
!
!
measure create angle  &
   measure_name = .prob9.Theta_2  &
   first_point = .prob9.ground.MARKER_25  &
   middle_point = .prob9.body_2.MARKER_26  &
   last_point = .prob9.body_2.MARKER_27  &
   create_measure_display = no
!
data_element attributes  &
   data_element_name = .prob9.Theta_2  &
   color = WHITE
!
!---------------------------- Function definitions ----------------------------!
!
!
!-------------------------- Adams/View UDE Instance ---------------------------!
!
!
ude modify instance  &
   instance_name = .prob9.omega_2
!
!--------------------------- Expression definitions ---------------------------!
!
!
defaults coordinate_system  &
   default_coordinate_system = ground
!
marker modify  &
   marker_name = .prob9.body_2.pointA  &
   location =   &
      (LOC_RELATIVE_TO({4, 0.0, 0.0}, .prob9.body_2.point_O2))  &
   relative_to = .prob9.body_2
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.ground
!
marker modify  &
   marker_name = .prob9.body_3.pointB  &
   location =   &
      (LOC_RELATIVE_TO({10, 0.0, 0.0}, .prob9.body_3.MARKER_3))  &
   relative_to = .prob9.body_3
!
defaults coordinate_system  &
   default_coordinate_system = .prob9.ground
!
material modify  &
   material_name = .prob9.steel  &
   youngs_modulus = (2.07E+011(Newton/meter**2))  &
   density = (7801.0(kg/meter**3))
!
model display  &
   model_name = prob9
