Inscription / Connexion Nouveau Sujet
Niveau Licence Maths 1e ann
Partager :

Matlab

Posté par
piero41
06-12-16 à 17:27

Bonsoir à tous,

J'ai des problèmes à modéliser mon problème sur matlab, donc je fais appel à vous tous.

% input:
%    N     = number of nodes (equally spaced)
%    param = parameter set of the problem
%    bc    = set of boundary conditions of the problem
%
% output:
%    x     = equidistant coordinates of the N nodes
%    U     = approximate solution
%
function [x,U] = beam_approx(N, param, bc)

    % vector of equidistant x coordinates
    x = % COMPLETE HERE...

    % system matrix and rhs vector
    K = zeros(% COMPLETE HERE,% COMPLETE HERE); % the coefficient matrix
    p = zeros(% COMPLETE HERE,1);   % the right hand side

    % assemble finite element contributions
    for ii = 1:N-1
        idx = 3*(ii-1)+[1:6];
        [Ke, pe] = beam_matrix_vector(x(ii),x(ii+1),param);
        K(idx,idx) = K(idx,idx) + Ke;
        p(idx)     = p(idx)     + pe;
    end

    % add static boundary conditions
    % horizontal force
    p(bc.F1_idx) = p(bc.F1_idx) + bc.F1_val;
    % vertical force
    p(bc.F3_idx) = p(bc.F3_idx) + bc.F3_val;
    % moment
    p(bc.M_idx)  = p(bc.M_idx)  + bc.M_val ;

    % impose kinematic boundary conditions
    % horizontal displacement
    K(bc.u_idx, = 0;
    K(bc.u_idx,bc.u_idx) = eye(length(bc.u_idx));
    p(bc.u_idx) = bc.u_val;
    % vertical displacement
    K(bc.w_idx, = 0;
    K(bc.w_idx,bc.w_idx) = eye(length(bc.w_idx));
    p(bc.w_idx) = bc.w_val;
    % rotation
    K(bc.phi_idx, = 0;
    K(bc.phi_idx,bc.phi_idx) = eye(length(bc.phi_idx));
    p(bc.phi_idx) = bc.phi_val;

    % solve the resulting system of equations
    u = K\p;

    % return solved degrees of freedom row-wise per type
    U = [ u(1:3:3*N)'; u(2:3:3*N)'; u(3:3:3*N)' ];
end

Le 1er code est pour la fonction approché du problème et le deuxième concernant la matrice raideur:

% input:
%    xA    = x coordinate of A
%    xB    = x coordinate of B
%    param = parameter set of the problem
%
% output:
%    Ke    = element stiffness matrix
%    pe    = element load vector
%
function [Ke,pe] = beam_matrix_vector(xA, xB, param)

    % COMPLETE HERE...

end

Donc il faut compléter le code, je vous laisse le sujet :
http://www.noelshack.com/2016-49-1481041525-ass3.png
http://www.noelshack.com/2016-49-1481041620-ass33.png

Merci si quelqu'un peut m'aider
Bonne soirée !

Posté par
piero41
re : Matlab 06-12-16 à 18:13

Y-a t'il quelqu'un pour m'aider svp ?



Vous devez être membre accéder à ce service...

Pas encore inscrit ?

1 compte par personne, multi-compte interdit !

Ou identifiez-vous :


Rester sur la page

Inscription gratuite

Fiches en rapport

parmi 1741 fiches de maths

Désolé, votre version d'Internet Explorer est plus que périmée ! Merci de le mettre à jour ou de télécharger Firefox ou Google Chrome pour utiliser le site. Votre ordinateur vous remerciera !