OpenSCAD(En)

Edit:20 nov. 2019, Cre:10 nov. 2019

Recumbent cycle simulator "BentSim'

3D simulation of recumbent cycles and drawing of steering blueprint

This application can design the geometry of a recumbent bicycle, tricycle or quadricycle and in particular its steering design.
It simply generates the blueprint and does not make any calculations (except for the trail and “wheel flop”). The steering blueprint can be exported in ‘DXF’ format.
All types of recumbent cycles are possible, except direct-drive cycles. You can create a Tadpole or Delta tricycle, a quadricycle or a SWB (short wheelbase) or LWB (long wheelbase) bicycle.
The steering is designed according pure Ackermann principle.

It is also possible to make a relatively complete visual model with a rider, a single tube frame, a transmission and a direction above or below the seat. A ‘mesh’ seat is available.
Once completed, the model can be exported as a simple volume (without colors) in stl format.
It is also possible to project all or part of the model in 2D and export these 2D views in DXF format. Typically, we will make a projection of the frame.

The size of the rider’s model can vary and for the same size, the proportion between the length of the legs and the length of the torso is adjustable.
Two riders of different sizes can be displayed simultaneously on the model.

After defining the geometry, you must project the recumbent model to be able to export it in DXF format, which can be used in any CAD software.

Install the application

This application uses OpenSCAD as its engine, which is a programmable 3D modeler.
You must install OpenSCAD on your machine and install the BentSim application in a directory of your choice. BentSim is available here:
https://github.com/PRouzeau/BentSim
The procedure for installing an OpenSCAD application is described here:
http://rouzeau.net/OpenSCADEn/Applications

Model a recumbent

To model a recumbent, it is recommended to start from one of the examples.
Once you have chosen your preferred example, create a new dataset by pressing the [+] button on the customization panel (top). Give your model a name (you can change it at any time).
Then you can change all the settings, don’t forget to save them from time to time with [Save Preset] Nothing prevents you from changing the examples but the original values will then be lost. Before saving, you can return to the settings of the previous recording with [Reset]. Once recorded, the new data becomes the starting point. Attention, an update of the application will delete your data, which is saved in the file “BentSim.json” that you should save before an update.

The main data

The main dimensions are in the [Dimensions] tab. It should be noted that the size of the tires is taken into account in the height of the wheel axle and that changing the size of the tire changes the geometry of the cycle. You can define a maximum tire size that does not affect geometry but will be displayed with the control surfaces. Wheels are defined according ETRTO standards. A bike is defined by setting the tracks to 0 (and also the camber angle). There is not (yet) in OpenSCAD the possibility to remove or gray unused parameters.

The rider(s)

The dimensions of the rider and his position are defined in the tab [Rider].
The two main dimensions are the angle of the back which defines the angle of the seat and the angle of the legs (you cannot adjust the angle of one leg with respect to the other, you have to turn the cranks). The fold of the folded leg can be modified to fit the upper pedal. The height position of the arms and the pinching of the arms and forearms define the handlebar grip.

It is possible to define a second rider who can be displayed at the same time as the first one. Depending on the type of recumbent, you choose either to move the second rider along a “seat slide” or to deploy a boom and a second crankset will be displayed in addition to the first.
These two actions can be simultaneous. The boom deployment angle is that of the beam behind the bottom bracket defined in the [Tube Frame] tab.

What can be displayed?

The [Display] tab allows you to select the parts you want to display. In addition to the mechanical elements and the rider, the blueprint lines can be displayed. The display of the control surfaces traces surfaces to validate the geometry (plane in the steering axis, volume occupied by the wheel when the handlebar is turned, maximum size tires and mudguards, cylinder showing the position of the V-brake joints).

The angle of view

The [Camera] tab allows you to force the display to a pre-recorded perspective or axis. Disable this option immediately after use, otherwise each preview will return to the same view.

The tube frame

The [Tube frame] tab is used to define a single tube frame (circular or rectangular). A rectangular tube is selected by giving it a height (otherwise it is a round tube). The frame have four straight sections behind the bottom bracket (T1 to T4) and one section forward (T0).
On a circular tube frame, the straight sections are joined by a bend whose radius is a parameter. The rectangular tubes are cut at the corner without elbows.

The whole frame is positioned relatively to the Bottom Bracket (defined in [Transmission] tab), so moving bottom bracket move the frame. If bottom bracket is on a boom, you can define a second bottom bracket position in the [Rider] tab on the 2nd rider parameters.
Tube segments and angles/bends are referenced as Tn and An.
T0 and T1 tubes angle from horizontal is given by A0 angle.
If there is no section at the front of the bottom bracket (T0=0), the section just behind the bottom bracket is considered to be an adjustable boom.
Changing the length of a straight section to 0 removes it and the angle to 0 removes the bend. Often the last back section (A3 and T4) is non-existent.
Angles could be positive or negative to bend in one direction or the other.
There is the possibility of adding a reinforcement tube that starts from the second section behind the bottom bracket (T2).
A reinforcement at the head tube is available as an option.

Rear wheel support

There is a dedicated tab to defined rear wheel support
You can have a fixed rear wheel (‘hardtail’) or a suspended one.
For a fixed one, you only have to define the chain and seat stays.
After defining a stay tube diameter, you defines stays angles, in y axis (horizontal) or z axis (vertical) and lengths.
Note that if you don’t have seat stays (say the wheel is supported only by strong chain stay), a length of 0 will remove the seat stays.
To define a suspended rear wheel, you simply have to position its articulation axis. An horizontal position equal to zero remove the rear suspension frame.
Note that the angling of the suspension is based upon the axis position and wheel vertical travel. This means that if the axis is unproperly positioned, the calculation might be impossible, which will be signalled in the console window.
The rear suspension frame starts by a central tube articulated on the main frame. It will be angled as desired.
The stays will be then independantly defined to reach the rear frame main tube.
A shock is positioned along the rear frame central tube (approximately between 150 to 200mm from articulation axis) then rotated to an adequate position to be connected to the main frame.
The rear frame articulation bracket and the main frame shock bracket shall be rotated to align with the main frame tubes and connect properly. Remember that on the main frame, you can have a reinforcement tube connected to the third segment which can be used to connect a shock.
The shock displayed length is its unloaded length minus the sag. The sag is the compression of the shock due to bike and rider weight. Typically sag is 20% for a mountain bike but will be higher for an utility bike (say the shock is adjusted to be more ‘soft’). Typically for a 190mm air shock with a travel of 50mm, the sag for a mountain bike is 10mm. This means that the remaining operating travel is 40mm. Note that the shock approximate travel is displayed in the console window and you shall adjust your geometry and shock position to get the aimed value. For a 50mm travel shock with a sag of 13mm, the geometry and wheel travel shall be adjusted to have a shock travel of 37mm (this is the value of the examples, but note that the wheel travel are different in these two examples).

You can view the position of the wheel in the maximum ‘up’ position (according defined vertical travel) in [Display] tab by selecting [Display rear wheel up]. Note that this will also be displayed when asking to display the checking surfaces. The difference is that when displaying the checking surfaces the tire (and fender) used are the maximum tire size as defined in the [Dimensions] tab, not the current one.

It will be quite useful to have a look to the two recumbent examples with a rear suspension, notably because they are build quite differently (one with a traditional rear cage frame, the other with a single strong arm and strong chain stays).

Transmission

The [Transmission] tab allows you to define the position of the bottom bracket as well as the size of the cranks and their angular positioning to place them facing the cyclist’s feet.
It is recalled that short cranks should be preferred for a recumbent bike.
We also give the number of teeth of the chainring (there is only one) and we define the chain line. The chains are oriented from the front chainring and from the rear sprocket. There are idlers associated with the chains starting from the chainring.
These idlers can be on a common axis and the chain can pass over or underneath. The chains from the rear are manually adjusted to join the idlers. If you want to make a direct chain line, give a length of zero to the front chains, which will remove the idlers and then extend the rear chains to the chainring.

Steering

The [Steering] tab allows you to define the type of handlebars, their dimensions and those of the stem and steerer tube.
The handlebar can be positioned on the steering stem or under the seat. The angle of the steering pivot under the seat can be adjusted (it is desirable that the hands are in the plane of the steering pivot to be neutral when pulling or pushing the handlebar).
There are four types of handlebars:

  • The tadpole trike “direct” handlebars connected to steerer tubes
  • The “Cruiser handlebar” which evolves from a practically flat handlebar to a long “chopper” handlebar according to the height given to it.
  • The “Hamster” handlebar, a small narrow vee handlebar with very close hands (hence its name). The height of the handlebar itself is not adjustable (but the stem and head tube can be adjusted)
  • The “U-bar” handlebar, originally designed to wrap the knees but which can also be positioned under the seat (by reorienting it). When adjusting its height, only the first segment is changed, the length of the segment carrying the handles remains constant.

The width of these handlebars is not adjustable. Minimum height 270mm for a correct display.

Descriptive text

A text can be written in the [Description Text] tab that will be displayed in full in the blueprint projection and the first four lines in the 3D view.

Visual aspect

The [Cosmetic and accessories] tab allows you to give your model a more realistic look by indicating the presence of a flag, a headlight and by choosing the number of spokes of each wheel, adjusting their position.
A zero adjustment angle induces radial radiation.
The starting angle and the fender area are defined.

Choice of colours

the [Colors] tab allows you to define the colors of the elements of the recumbent and riders. The name of the colors is the same as the HTML web colors that can be found here: https://en.wikipedia.org/wiki/Web_colors
Be careful, the colors of the riders are defined in a table, it is necessary to respect quotation marks, commas and brackets.

Selection of some elements

Many elements are only displayed if they have a dimension (tube at the front of the bottom bracket, frame reinforcement tube, mudguards, chain idlers) and the lights are only displayed if they have a color.

Export to an external file

In the [Display] tab you can choose the projections that you want to export to other software. The projection of the blueprint does not take into account the elements selected for display except for the display of shafts, which you will often prefer to disable for better readability.
However, the other projections take into account everything that is displayed. As the calculation of these projections takes some time, only the most important elements (frame) may be selected. The calculation of the wheels in particular takes a little time.
The preview that is made after any modification of the variable does not allow to export a file, it is first necessary to perform a “rendering calculation” by pressing [F6] or the dedicated button. It is highly recommended to save the data with [Save Preset] before render calculation, which allows you to exit the program safely if the calculation lasts too long or if you have changed your mind. The data is NEVER automatically saved.
Once the rendering calculation has been performed, it is possible to export a 2D file in the’DXF’ format (AutoCAD export format) which is accepted by almost all CAD software.
This is done with [File][Export][Export as DXF].
It is also possible to export the 3D model (without the colors) in the ‘STL’ format after having previously rendered the 3D view. There is a theoretical possibility to export the 3D model to FREECAD with the file format ‘CSG’ but currently FREECAD has various problems with management of this format (but this could evolve).

About the examples

The examples are adapted to a medium-sized rider, except for the high racer where the 700 wheels are only accessible to people of sufficient height.
None of the examples correspond to a real recumbent even if they are inspired by existing ones.

The ‘mesh’ seat model is modelled after a RANS seat (the Stratus seat).

About the rider model

The proportion between leg length and torso length varies significantly from person to person and in general women have proportionately longer legs than men. The rider’s model is not very sophisticated but the hip joint has been modified to be upwards because a joint in the middle as too often modelled is completely unrealistic and led to errors in the sizing of recumbents. I have not modified the knee joint (which is in the middle instead of on the front of the knee) so the bending angles are not realistic. I based the design data on my own proportions so the generalization is to be taken with a little hindsight. The confidence you can place in this model is limited, further biomechanical studies should be carried out. The length of the inseam is displayed in the console window.

Credits and links

© Pierre ROUZEAU CC BY-SA 4.0
Descriptive page and use
http://rouzeau.net/OpenSCADEn/BentSim
Installation manual
http://rouzeau.net/OpenSCADEn/Applications
Download and source files
https://github.com/PRouzeau/BentSim

(c) Pierre ROUZEAU
Privacy - Vie privée - Imprimable - Rechercher
Page mise à jour le 20/11/2019 12:44