Bridge Model (Model Definition)
This page shows how to define the bridge model with COSSAN-X.
- 1 Problem Definition in COSSAN-X
- 1.1 Create a new Project
- 1.2 Import predefined Tutorial
- 1.3 Inputs
- 1.4 Evaluator
- 1.5 Model
- 1.6 Verified the model
- 1.7 See Also
Problem Definition in COSSAN-X
Create a new Project
In a first step a new project named 'BridgeModel' is created: This can be done by pressing the 'new' icon, or from the menu File->New->Project.
After the project has been created, the project name 'BridgeModel' appears in the workspace. All the subfolder are empty
Import predefined Tutorial
In this session the inputs factor required for evaluating the model are defined.
In a next step, the constant input parameters, i.e. the Harmonic load frequency, the material density rho and the beam width are specified. Clicking with the right button at the folder 'parameter' and selecting 'Add parameter' the following wizard appear on the screen (see also Parameter (wizard)):
After pressing finish, a Parameter object is created and it propertis can edited (see also Parameter (editor)):
The same procedure is repeated to define the other parameters.
In a next step, a probability distribution is associated to each uncertain quantity.
For defining new random variables, right click on the sub-folder "Random Variables" and select "Add Random Variable". Then, the following input mask will pop up, which allows you to define the name and a description of the uncertain quantity:
After pressing "Finish" the editor for Random Variable appears, where the distribution type can be selected from a list. In the following, the "Normal" distribution has been selected for the variable height h, and the mean of 0.001 and standard deviation of 5e-05 have been inserted.
Additional 19 random variable for modelling the height of other beams are created.
The random variables for the E modulus, length, support stiffness, support rotation stiffness, support damping are created:
Beams E modulus
Supports rotation stiffness
A total number of 123 random variable must be created.
Random Variable Set
Since all the random variables are independent it is not necessary to define the RandomVariableSet.
An evaluator is used in a definition of a bridge model. If a model could be seen as a black box that returns output values given the input values, an evaluator is actually the content of such a black box. Thus, an evaluator is a low-level definition of the functional relation between the inputs and outputs of a model.
See also Category:Evaluators
A Matlab script (also called MIO "Matlab Input Output") is used to calculate the quantity of interest. See Mio (wizard)
First at all it is necessary to define the Input factors required to compute the bridge displacement. In this examples all the defined random variables and parameters are required. Hence, pressing the plus button in Input windows of the Matlab script it is possible to add all the required inputs. Then, it is necessary to define a name of the computed quantity called maxDisplacement.
. In order to edit the script, please select the tab script from the Matlab script editor. The script required to compute the maximum displacement of the bridge structure is reported here:
%% bridgeModel.m % This script is used to compute the maximum displacement of a mathematical % model of a bridge under harmonic load. % % The input values are passes in the matrix Minput and returned in a matrix % called Moutput % % % $Copyright~1993-2011,~COSSAN~Working~Group,~University~of~Innsbruck,~Austria$ % $Author: Edoardo-Patelli~and~Helmut~Pradlwarter % %% Define some constants Nbays= 20; % number of bays freq_range = Minput(1,124); rho = Minput(1,125); beamDimension=Minput(1,126); %% % 1 2 3 4 5 6 % E h l s w c % 2.1e+11 0.001 0.36 50.0 0 0.01 % 0.03 0.05 0.05 0.10 0.16 0.35 % 1 n_span+1 2*n_span+1 3*nspan+1 4*n_span+2 5*n_span+3 % n_span 2*n_span 3*n_span 4*nspan+1 5*n_span+2 6*n_span+3 % % Compute variables that do not depends on the samples indexC = transpose(1:4:1+4*Nbays); % compute total number of points nnz = (4^2)*2*Nbays+2*(Nbays+1); i_K = zeros(nnz,1); j_K = zeros(nnz,1); s_K = zeros(nnz,1); nnz = (4^2)*2*Nbays; i_M = zeros(nnz,1); j_M = zeros(nnz,1); s_M = zeros(nnz,1); % compute total number of points nza = 32*Nbays; dof_unit_load = 3+4*2; %index of the applied force dof_response = 3+4*2; %index of the response of interest % Preallocate memory Moutput=zeros(size(Minput,1),1); for isample=1:size(Minput,1) %% sparse damping matrix C sparse_C = sparse(indexC,indexC,Minput(isample,Nbays*5+3:Nbays*6+3)); %% sparse mass and stiffness matrix M and K for n=1:Nbays % compute current values l=Minput(isample,Nbays+n)/2; % l length current bay E=Minput(isample,Nbays*2+n); % E Youngs modulo A=Minput(isample,n)*beamDimension; % cross section area I=beamDimension*Minput(isample,n).^3/12; % geometric moment of inertia %stiffness matrix eK = E/l*[ 12*I/l^2 6*I/l -12*I/l^2 6*I/l ; ... 6*I/l 4*I -6*I/l 2*I ; ... -12*I/l^2 -6*I/l 12*I/l^2 -6*I/l ; ... 6*I/l 2*I -6*I/l 4*I ]; % consistent matrix eM = rho*A*l/420* ... [ 156 22*l 54 -13*l ; ... 22*l 4*l^2 13*l -3*l^2 ; ... 54 13*l 156 -22*l ; ... -13*l -3*l^2 -22*l 4*l^2 ]; [i0_K,j0_K,s0_K] = find(eK); [~,~,s0_M] = find(eM); i0_K = i0_K+(n-1)*4; j0_K = j0_K+(n-1)*4; ka = 1+(n-1)*32; ke = 16+(n-1)*32; i_K(ka:ke) = i0_K; j_K(ka:ke) = j0_K; s_K(ka:ke) = s0_K; i_M(ka:ke) = i0_K; j_M(ka:ke) = j0_K; s_M(ka:ke) = s0_M; i0_K = i0_K+2; j0_K = j0_K+2; ka = 17+(n-1)*32; ke = 32+(n-1)*32; i_K(ka:ke) = i0_K; j_K(ka:ke) = j0_K; s_K(ka:ke) = s0_K; i_M(ka:ke) = i0_K; j_M(ka:ke) = j0_K; s_M(ka:ke) = s0_M; end for n=1:Nbays+1 i_K(nza+2*n-1:nza+2*n) = [4*n-3,4*n-2]'; j_K(nza+2*n-1:nza+2*n) = [4*n-3,4*n-2]'; s_K(nza+2*n-1:nza+2*n) = [Minput(isample,Nbays*3+n),Minput(isample,Nbays*4+1+n)]'; end sparse_K = sparse(i_K,j_K,s_K); sparse_M = sparse(i_M,j_M,s_M); %% Compute response [i_K,j_K,v_K] = find(sparse_K); [i_C,j_C,v_C] = find(sparse_C); [i_M,j_M,v_M] = find(sparse_M); [m,~] = size(sparse_K); load_vector = zeros(m,1); load_vector(dof_unit_load) = 1; n_freq = numel(freq_range); fr_ampl = zeros(m,n_freq); % Process frequences for k=1:numel(freq_range) om = 2*pi*freq_range(k); sp_dyn_stiff = sparse([i_K;i_C;i_M],[j_K;j_C;j_M],[v_K;v_C*1i*om;-v_M*om^2]); ampl = sp_dyn_stiff\load_vector; fr_ampl(:,k) = ampl; end dis_amplitudes = abs(fr_ampl(1:2:end)); dis_response = dis_amplitudes(fix((dof_response+1)/2)); Moutput(isample)=max(dis_amplitudes); end
The above script can be copy and paste inside the script tab of the Mio object as shown in the following figure:
For more information about the Matlab script please refer to the following page: Mio (editor)
The cossan object model for the bridge model is created by moving the mouse pointer to "Physical Model" and clicking the right mouse button and selecting "Add Physical Model":
A wizard pops up showing default names which can be modified. In the following the default values are accepted by pressing the 'Finish' button.
Then, the editor appears, in which Evaluators and the Random Variable Sets can be added. The error message in red at the top indicate that the input is at the present state insufficient to perform an simulation analysis.
Clicking at the '+' of the evaluator (top left , the following window pops up, showing the available options. In this example, only the option "DisplacementBeam" is available and selected by pressing 'OK'.
Then the input and output associated with the evaluator are shown at the right in the windows 'Inputs' and 'Outputs' as shown in the following:
Saving the object, the error message on the top disapper and the Model is ready to be analyzed.
Verified the model
The above defined model can be verified performing a deterministic analysis. In order to do that it is necessary to start the analysis from the physical model defined by clicking on the greed arrow on the right top corner of the editor.