ADDED mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_input.txt Index: mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_input.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_input.txt @@ -0,0 +1,16 @@ +# Numerical parameter file (BouncingRod_input.txt) +# Generated by MTT at Fri Jul 4 14:09:14 BST 1997 + +# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +# %% Version control history +# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +# %% $Id$ +# %% $Log$ +# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +# Set the inputs +u(1) = 1.0; # gravity (Default value) + +# Set the switches +bouncingrod_groundl= (x[3]<=0); +bouncingrod_groundr= (x[4]<=0); ADDED mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_lbl.txt Index: mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_lbl.txt @@ -0,0 +1,38 @@ +%SUMMARY BouncingRod: +%DESCRIPTION +%% Label file for system BouncingRod (BouncingRod_lbl.txt) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Each line should be of one of the following forms: +% a comment (ie starting with %) +% Component-name CR_name arg1,arg2,..argn +% blank + + + +% Component type CSW + groundL lin effort,epsilon + groundR lin effort,epsilon + +% Component type INTF + intfL + intfR + +% Component type ROD + rod none l;l;j;m + +% Component type SS + aL 0 internal + aR 0 internal + gravity external internal + hL external 0 + hR external 0 + xC 0 internal + xL 0 internal + xR 0 internal ADDED mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_numpar.txt Index: mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_numpar.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_numpar.txt @@ -0,0 +1,33 @@ +# Numerical parameter file (BouncingRod_numpar.txt) +# Generated by MTT at Fri Jul 4 14:09:11 BST 1997 + +# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +# %% Version control history +# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +# %% $Id$ +# %% $Log$ +# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +float theta,height; + +# Parameters +epsilon = 0.1; +l = 1.0; # Default value +m = 1.0; # Default value +j = l*l*m/3; + + +theta = 3.1416/4; +height = 10.0; + +# Initial states +x(1) = 0.0; # Initial state for BouncingRod_groundL (MTT_SWITCH) +x(2) = 0.0; # Initial state for BouncingRod_groundR (MTT_SWITCH) +x(3) = height+l*cos(theta); # Initial state for BouncingRod_intfL (3) +x(4) = height-l*cos(theta); # Initial state for BouncingRod_intfR (3) +x(5) = 0.0; # Initial state for BouncingRod_rod (J) +x(6) = 0.0; # Initial state for BouncingRod_rod (m_x) +x(7) = 0.0; # Initial state for BouncingRod_rod (m_y) +x(8) = theta; # Initial state for BouncingRod_rod_th (3) + + ADDED mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_odes.h Index: mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_odes.h ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_odes.h @@ -0,0 +1,7 @@ +/* +%% Parameter file for system BouncingRod (BouncingRod_odes.h) +%% This file provides the params for simulation: +*/ +#define DT 0.1 /* Time step (for printing) */ +#define LAST 99.9 /* Last time */ +#define STEPFACTOR 1000 /* Integration steps per time step */ ADDED mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_rep.txt Index: mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_rep.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Hybrid/BouncingRod/BouncingRod_rep.txt @@ -0,0 +1,18 @@ +# Outline report file for system BouncingRod (BouncingRod_rep.txt) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +mtt -s -o -c BouncingRod abg tex +mtt -s -o -c BouncingRod struc tex +mtt -s -o -c BouncingRod ode tex +mtt -s -o -c BouncingRod odes h +mtt -s -o -c BouncingRod numpar txt +mtt -s -o -c BouncingRod input txt +mtt -s -o -c BouncingRod odeso ps + +