Question: clc clear all close all dt = 0 . 0 1 ; % timestep dx = 0 . 0 1 ; % mesh size n
clc
clear all
close all
dt ; timestep
dx ; mesh size
n ; number of node points
The size and the mesh of plate
Lx ndx; total length in X
Ly Lx; total length in y
xs :dx:Lx; vector of positions in x
ys xs; vector of positions in y
X Y meshgridxs ys; mesh
Ta ; k Temperture of the environment
dTmax ; max temp above the temp of environment
alpha e; thermal diffusivity of copper ms
intial condition
T onesnTa; uniform temperture
T:: Ta dTmax; the hop part temp
c ;
c stands for Periodic boundaries
c stands for Fixed temperature at the boundary
c stands for Insulated BC
c stands for Heat generation with fixed temp BC
q ; the power of the laser focusing on the center of the plate
cp ; heat capacity
rho ; density
for i:runnig thr simulation for cycles s
Tx circshiftT; T shifted to the left aka the right neghbor
Tx circshiftT; T shifted to the right aka the left neghbor
Ty circshiftT; T shifted upwards aka the below neghbor
Ty circshiftT; T shifted downwards aka the above neghbor
the main heat equations
Told T;
T T alphaTxTx TyTyTdxdt; this is all there to it
if cFixed temperature at the boundary
T: Ta;
Tn: Ta;
T: Ta;
T:n Ta;
elseif cinsulated BC
insulated edges
T: Told: alphaTx: Ty:Ty:
Told:dxdt;
left edge,heat flows from right, top, bottom
T:n Told:n alphaTx:n Ty:nTy:nTold:n
dxdt;
right edge,heat flows from left, top, bottom
T: Told: alphaTx: Ty:Tx:
Told:dxdt;
bottom,heat flows from right, top, left
Tn: Toldn: alphaTxn: Txn:Tyn:Toldn:
dxdt;
top edge,heat flows from right, left, bottom
insulated coreners
T Told alphaTx TyTolddxdt;
bottom left corner, heat flows from top and right
Tnn Toldnn alphaTxnn TynnToldnndxdt;
top right corner, heat flows from bottom and left
Tn Toldn alphaTxn TynToldndxdt;
bottom right corner, heat flows from top and left
Tn Toldn alphaTxn TynToldndxdt;
top corner, heat flows from bottom and right
elseif c
T: Ta;
Tn: Ta;
T: Ta;
T:n Ta;
Tn n Tn n qdxdxcprhodt;
end
if modiplotting every th interation
pcolorX Y T
caxisthis fixes the colorbar so that the colors slways
between k
shading interp
colorbar
alternative way to plot
surfX Y T;
axisLxLyTaTadTmax;
shading interp
title t numstrdti s
drawnow
end
end
Can you edit this given matlab code to meet the requirements!
The goal of this simulation is to figure out the intrinsic size of a point heat source and to practice mesh and
geometric convergence. Geometric convergence is defined as: "the smallest cell that you can use such that the
boundary conditions do not affect the thermal profile."
Start with the posted D MATLAB simulation from the tutorial and apply a W point source to the center
of the plate with K boundaries on all faces. From the results from this working D simulation. Calculate
the width of the hot spot in the thermal profile. The definition of width you will use is also up to you, some
common choices are RMS width, standard deviation, and FWHM dont forget to mention which one you
chose
The steps I recommend are:
Pick how long to run your simulation and a converged time step up to you, but include in deliverable
Pick a starting size of the plate also your choice
Start with the thermal diffusivity for copper : ems and converge the mesh, then the geometry.
As you change mesh, make sure you have defined your heat source in a way that scales with the mesh size
correctly!
Using the same mesh, use change the thermal diffusivity to that for acrylic ems and converge the
geometry.
For your deliverable, please include:
Proof of converged mesh for copper.
Proof of converged geometry for copper.
Proof of converged mesh for acrylic
Proof of converged geometry for acrylic.
Also include some short text comments on how you reasonably chose your timestep and total duration, as
well as why your plots make sense. hint: you can compare how mesh and geometry convergences differ
between the two materials
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
