Beam 3-point bending (Matlab script)

From COSSAN Wiki
Jump to: navigation, search

To start with, a Matlab script to calculate the displacement is created.

The input of the script contains namely all the inputs, which have been defined in preparation of the input section.

The output of the script is named u_y.

The input-output type is Matlab script (it is the most general kind). Structures are used for the inputs and outputs.

Creation of the script, metadata tab.


The syntax of the (predefined loop of the) script is the following:

 %% 1. retrieving inputs
 % applied strength
 f = Tinput(i).f;
 
 % Young modulus
 E =  Tinput(i).E
 
 % Inertia moment
 Inertia = Tinput(i).Inertia1;
 
 %% 2. computation of the vertical displacement
 VerticalDisplacement = -11*f*100^3  / (768 * E * Inertia);
 
 %% 3. preparation of outputs
 Toutput(i).u_y = VerticalDisplacement;


During the execution of the script, the following operations are performed:

  • 1 The inputs are retrieved and put inside a temporary variable. This operation is performed for the readability of the script.
  • 2 The vertical displacement at the mid-point of the beam is computed, using the formula presented in Simple Example (Presentation). The result are assigned to a temporary variable for readability.
  • 3 The vertical displacement is assigned to the output of the script. The name assigned in the output of the script (u_y in this case) must be the same as the one defined in the metadata tab.
Creation of the script, script tab.


See also

Beam 3-point bending (overview)

Beam 3-point bending (Evaluator)