Diferencia entre revisiones de «Mallado Arco 1 (grupo 59)»
De MateWiki
| Línea 7: | Línea 7: | ||
[[Categoría:Teoría de Campos]] | [[Categoría:Teoría de Campos]] | ||
[[Categoría:TC25/26]] | [[Categoría:TC25/26]] | ||
| − | == | + | == Mallado del arco == |
| + | {{matlab|codigo= | ||
| + | % Mallado del arco | ||
| + | % ---------------------------------------------------- | ||
| + | |||
| + | % Elegimos divisiones que garanticen que: | ||
| + | % θ = 0, pi/2, pi están incluidos → eje y coincide | ||
| + | % r incluye exactamente 1 y 2 → bases coinciden | ||
| + | |||
| + | theta = linspace(0, pi, 20); % mallado moderado, incluye 0, pi/2 y pi | ||
| + | r = linspace(1, 2, 15); % radios exactos 1 y 2 | ||
| + | |||
| + | [R, TH] = meshgrid(r, theta); | ||
| + | |||
| + | % Convertir a coordenadas cartesianas | ||
| + | X = R .* cos(TH); | ||
| + | Y = R .* sin(TH); | ||
| + | |||
| + | figure; | ||
| + | hold on; | ||
| + | |||
| + | col = [0.3 0.6 1]; % azul clarito | ||
| + | |||
| + | % ----- Mallado tipo red (más grueso) ----- | ||
| + | plot(X, Y, 'Color', col, 'LineWidth', 1.1); % líneas en theta | ||
| + | plot(X', Y', 'Color', col, 'LineWidth', 1.1); % líneas en r | ||
| + | |||
| + | % ----- Contornos superior interior y exterior ----- | ||
| + | theta_cont = linspace(0, pi, 400); | ||
| + | |||
| + | plot(1*cos(theta_cont), 1*sin(theta_cont), 'Color', col, 'LineWidth', 2); | ||
| + | plot(2*cos(theta_cont), 2*sin(theta_cont), 'Color', col, 'LineWidth', 2); | ||
| + | |||
| + | % ----- Bases ----- | ||
| + | plot([-1 -2], [0 0], 'Color', col, 'LineWidth', 2); % base izquierda | ||
| + | plot([ 1 2], [0 0], 'Color', col, 'LineWidth', 2); % base derecha | ||
| + | |||
| + | |||
| + | % Ajustes | ||
| + | axis equal | ||
| + | grid on | ||
| + | title('Mallado del arco') | ||
| + | xlabel('x') | ||
| + | ylabel('y') | ||
| + | hold off; | ||
| + | }} | ||
== To go further == | == To go further == | ||
== Tensiones tangenciales == | == Tensiones tangenciales == | ||
Revisión del 11:41 1 dic 2025
| Trabajo realizado por estudiantes | |
|---|---|
| Título | Arco1. Grupo 59 |
| Asignatura | Teoría de Campos |
| Curso | 2025-26 |
| Autores |
|
| Este artículo ha sido escrito por estudiantes como parte de su evaluación en la asignatura | |
1 Mallado del arco
% Mallado del arco
% ----------------------------------------------------
% Elegimos divisiones que garanticen que:
% θ = 0, pi/2, pi están incluidos → eje y coincide
% r incluye exactamente 1 y 2 → bases coinciden
theta = linspace(0, pi, 20); % mallado moderado, incluye 0, pi/2 y pi
r = linspace(1, 2, 15); % radios exactos 1 y 2
[R, TH] = meshgrid(r, theta);
% Convertir a coordenadas cartesianas
X = R .* cos(TH);
Y = R .* sin(TH);
figure;
hold on;
col = [0.3 0.6 1]; % azul clarito
% ----- Mallado tipo red (más grueso) -----
plot(X, Y, 'Color', col, 'LineWidth', 1.1); % líneas en theta
plot(X', Y', 'Color', col, 'LineWidth', 1.1); % líneas en r
% ----- Contornos superior interior y exterior -----
theta_cont = linspace(0, pi, 400);
plot(1*cos(theta_cont), 1*sin(theta_cont), 'Color', col, 'LineWidth', 2);
plot(2*cos(theta_cont), 2*sin(theta_cont), 'Color', col, 'LineWidth', 2);
% ----- Bases -----
plot([-1 -2], [0 0], 'Color', col, 'LineWidth', 2); % base izquierda
plot([ 1 2], [0 0], 'Color', col, 'LineWidth', 2); % base derecha
% Ajustes
axis equal
grid on
title('Mallado del arco')
xlabel('x')
ylabel('y')
hold off;2 To go further
3 Tensiones tangenciales
%% TENSIONES TANGENCIALES
clear; clc; close all;
% --- 1. GEOMETRÍA ---
rho_vec = 1:0.01:2;
theta_vec = [0:0.01:pi, pi];
[R, Th] = meshgrid(rho_vec, theta_vec);
X = R .* cos(Th);
Y = R .* sin(Th);
% --- 2. CÁLCULO DE LA TENSIÓN (Tau) ---
% Fórmula derivada: (1/5) * (2*rho^2 - rho) * sin(theta)
Tau = (1/5) * (2*R.^2 - R) .* sin(Th);
% Calculamos el valor absoluto
Tau_Mag = abs(Tau);
% --- 3. VISUALIZACIÓN ---
figure(9); clf; hold on; axis equal;
set(gcf, 'Color', 'w');
title('Tensión Tangencial (\tau_{\rho\theta})');
xlabel('x'); ylabel('y');
Visualization of a scalar field in a solid