a b/Application/Examples/BikeModel/BikeModel-FullBody.main.any
1
#include "../libdef.any"
2
3
/** --------------------------------------------------------------------------------
4
This is a bicyling model. It illustrates several important topics in model 
5
construction:
6
- Block building techniques
7
- Include files
8
- Structuring of models using directories
9
- Modeling of an environment as a mechanism, in this case the bicycle
10
11
The human model is included as a block from the Body (BodyRepository) directory. 
12
13
The model of the bike including bike frame, crank, wheels, definition of 
14
crank moment etc. can be found in the include file "BikeFrameAndWheels.any".
15
16
The connections between the "human model" and the bicycle are defined in 
17
BikeLegConnection.any.
18
19
The model can run in two configurations FullBodyModel and LowerExtremityModel this 
20
can be changed in the "Config.any" file
21
22
---------------------------------------------------------------------------------- */
23
Main = {
24
  
25
  // ----------------------------------------------------------
26
  // Bike parameters 
27
  // ----------------------------------------------------------
28
  #include "Model/BikeParameters.any"
29
30
  // ----------------------------------------------------------
31
  // Path to draw settings
32
  // ----------------------------------------------------------
33
  #include "Model/DrawSettings.any"
34
  
35
  // ----------------------------------------------------------
36
  // Model configuration:
37
  // For more info on body model configuration options please
38
  // load the model and double click on: 
39
  #include "BodyModelConfiguration.any"
40
  // ----------------------------------------------------------
41
  
42
  // The Mannequin file specifies load-time positions for all the segments
43
  // in the HumanModel. This is important for the model's ablity to resolve
44
  // all the kinematic constraints when the model is analyzed.
45
  // The mannequin file also drives those degrees of freedom of the human 
46
  // model that are not governed by problem-specific drivers at run time.    
47
  #include "Model/Mannequin.any" 
48
  
49
  // Model of the human body to be used for the analysis
50
  #include "<ANYBODY_PATH_BODY>/HumanModel.any"
51
52
  /// This folder collects the elements of the model. It is referred by the
53
  /// study section below as the target of the analyses.
54
  AnyFolder Model = {
55
    /// Body model without default drivers
56
    AnyFolder &BodyModel=.HumanModel.BodyModel;
57
    /// Reference to the mannequin folder (used by drivers)
58
    AnyFolder &Mannequin =.HumanModel.Mannequin;
59
    
60
    #include  "Model/BikeFrameAndWheels.any"    
61
    
62
    AnyFolder BikeLegConnection = {
63
      
64
      AnyFolder &ModelFolder = .BodyModel;
65
      
66
      AnyFolder JointsAndDrivers = {
67
        #include "Model/JointsAndDrivers.any"
68
        
69
      };
70
    };
71
    
72
    #include  "Model/SeatSupport.any"
73
    AnyRefNode& GroundNode = .GlobalRef.Bike3DGround;
74
    
75
    #include  "Model/BikeFrameGroundConnection.any"
76
    
77
    #include "Model/InitialPositionsBike.any"
78
  };
79
  
80
  /// The study: Operations to be performed on the model
81
  AnyBodyStudy Study = {
82
    AnyFolder &Model = .Model;      
83
    
84
    Gravity = {0.0, -9.81, 0.0};
85
    tStart = 0;
86
    tEnd = .BikeParameters.T;
87
    nStep = 51;
88
    
89
    // Include functions to generate a video:
90
    // -> Run `Study.VideoTool.Preview` to preview the camera view.
91
    // -> Run `Study.VideoTool.Create_Video` to generate video from the analysis.
92
    #include "Model/CreateVideo.any"
93
    
94
  };
95
96
  // Include an operation sequence to run all required steps of your application (see Operations tab)
97
    #include "<ANYBODY_PATH_MODELUTILS>\Operations\RunAppSequence.any"
98
  
99
}; // Main