import matplotlib.pyplot as plt
# Data for thermocouple positions and temperatures
thermocouple_positions = [1, 2, 3, 4, 5] # Positions of each thermocouple
temperatures = [75, 65, 55, 45, 35] # Temperature readings at each position in °C
# Plotting the temperature distribution
plt.figure(figsize=(8, 6))
plt.plot(thermocouple_positions, temperatures, marker='o', color='blue', linestyle='-', linewidth=2)
# Adding title and labels
plt.title("Temperature Distribution Across the Wall")
plt.xlabel("Thermocouple Position")
plt.ylabel("Temperature (°C)")
plt.xticks(thermocouple_positions)
plt.grid(True)
# Show the plot
plt.show()
Temperature Distribution Across the Wall
Temperature Distribution Across the Wall
Temperature Distribution Across the Radius of the Cylinder
var thermocouple_positions = [1, 2, 3, 4, 5]; // Positions of each thermocouple
var temperatures = [75, 65, 55, 45, 35]; // Temperature readings at each position in °C
// Creating the chart
var ctx = document.getElementById('temperatureChart').getContext('2d');
var temperatureChart = new Chart(ctx, {
type: 'line', // Define the chart type (line chart)
data: {
labels: thermocouple_positions, // X-axis data
datasets: [{
label: 'Temperature (°C)', // Label for the dataset
data: temperatures, // Y-axis data
borderColor: 'blue', // Line color
borderWidth: 2, // Line width
fill: false, // Don't fill the area under the line
tension: 0.1, // Smooth curve for the line
pointBackgroundColor: 'blue' // Color for the data points
}]
},
options: {
responsive: true,
scales: {
x: {
title: {
display: true,
text: 'Thermocouple Position'
}
},
y: {
title: {
display: true,
text: 'Temperature (°C)'
}
}
}
}
});