This thesis is devoted to the study of two different problems arising from the numerical simulation of physical phenomena. However, the motivation, the method followed and the goals pursued are the same. As I hope to have exhaustively demonstrated in the following pages, my belief is that variational techniques can be the appropriate bridge between theory and experiment, between mathematical modeling and numerical simulation....