Help Creating Global Stiffness Matrix
Afficher commentaires plus anciens
I need help assembling this stiffness matrix. This is a generic stiffness matrix where ho is the outside air and k1,k2,k3 is the conductivity and the n represent the number of nodes in the materials. This is for a 1D wall. Thank you!

5 commentaires
Andy L
le 7 Août 2014
Do you know the number of nodes, parameter values etc? Or are you expected to write generic code that will build this for any number of nodes?
Andy L
le 8 Août 2014
Can you confirm for me the difference between k(n-1) and k(N-1)? What size should the matrix should be for example, with 4 layers - conductivities k1 - k4?
Andy L
le 11 Août 2014
Thanks for clarifying.
Réponses (1)
Andy L
le 8 Août 2014
0 votes
First of all I would like to point out I don't know much about stiffness matrices - I've never had to use them before. There may well be an easier way to do this, however my approach would be as such.
I would start with making my .m file a function - if you set the input to varargin you can pass your function a variable vector of values. This would contain your h_oa, h_ia, k_n & T_n variables. You should then be able to determine the length of your stiffness and temperature matrix, which in turn gives you both dimensions (it is square). You can then initialise with zeros - this gives you a matrix of zeros of the appropriate dimensions.
Then you would need to use a for loop and indexing, placing the variables in as appropriate to build up the diagonal values of your stiffness matrix. As for the temperature matrix that could be made from the latter half of the varargin argument!
1 commentaire
Andy L
le 11 Août 2014
How are you getting on with solving this?
Catégories
En savoir plus sur Calculus dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
