Evaluating solidification time of a cast component
Aim:-
Calculating the time required for a molten element to get solidified in an casting process.
Background:-
Casting is one of the widely used manufacturing process world wide. Casting is a process in which usually a molten liquid material is poured into a mold, into which the material gets solidified after some time while acquring the shape of the mold. The material is then removed from the mold in solid form.
If the material is removed from the mold befour it is solidified then the shape of the final product will not be as desired while if it is removed after some time after it is solidified, it will decrease the efficiency of the whole process.
Therefour we can say that the efficiency of the process mainly depends on the time required to remove the material from mold after it is poured. This program is handy in calculating the total time after which the material can be removed from the mold after pouring it into the mold.
Casting process:-
Method used:-
- Chvorinov's rule:- Defined by Nicolas Chvorinov's which gives us a relationship of solidification time of cast component with respect to its area and volume.
- Equation given:-
t(s)=k*(V/A)^2
Here, t(s)= solidification time (sec)
V= volume of cast component (mm^3)
A= surface area of cast component (mm^2)
k= solidification factor (sec/mm^2)
- Volume and surface area of the component is different for different shapes of the component.
Algorithm of program:-
- Take inputs from user.
- Calculate solidification time using above formula.
- Plot a graph showing the solidification of component w.r.t time and temperature.
Example problem:-
A cylindrical-shaped part is to be cast out of aluminum. The radius of the cylinder r= 250 mm and its thickness h= 20 mm.
If the mold constant Cm = 2.0 sec/mm^2 in Chvorinov's Rule, how long will it take the casting to solidify?
Program:-
clear;
close all;
clc;
format compact;
% Program to calculate the solidification time of an 'cast' component.
%% User inputs
fprintf('Select geometry of cast\n ') %Describe the inputs to take
fprintf(' -------------------\n');
fprintf(' For | Press \n');
fprintf(' ----------|--------\n');
fprintf(' Cube | 1 \n');
fprintf(' Sphere | 2 \n');
fprintf(' Cylinder | 3 \n');
fprintf(' Slab | 4 \n');
fprintf(' -------------------\n');
type=input('Your choice '); %Stores the type of casting used
if type==1 %conditional statement for cube
a=input('Enter side length (mm) '); %take side length as input
va=a/6; %calculate volume/area
elseif type==2 %conditional statement for sphere
r=input('Enter the radius (mm) '); %take radius as input
va=r/3; %calculate volume/area
elseif type==3 %conditional statement for cylinder
d=input('Enter cylinder diameter (mm) '); %take diameter as input
h=input('Enter cylinder length (mm) '); %take height as input
va=((pi/4)*d*d*h)/((0.5*pi*d*d)+pi*d*h); %calculate volume/area
elseif type==4 %conditional statement for slab
l=input('Enter length of slab (mm) '); %take length as input
b=input('Enter bredth of slab (mm) '); %take bredth as input
h=input('Enter height of slab (mm) '); %take height as input
va=(l*b*h)/((2*l*b)+(2*b*h)+(2*h*l)); %calculate volume/area
end %end of conditional statement
k=input('Enter solidification factor (sec/mm^2) '); %solidification factor as input
%% Calculations
time=k*va*va; %Calculate solidification time
%% Plotin solidification plot
templiq=linspace(100,70,11); %liquid cooling temperatures (assumed)
tempfr=linspace(70,60,51); %frezing temperatures (assumed)
tempsol=linspace(60,10,41); %solid cooling temperatures (assumed)
tliq=linspace(0,10,11); %liquid cooling time (assumed)
tfr=linspace(10,60,51); %freezing time (assumed)
tsol=linspace(60,100,41); %solid cooling time (assumed)
cout=1; %variable to count row no.
for i=linspace(1,0.9,10) %loop to store liquid cooling color
coliq{cout,1}=[i 0 0]; %store color in coliq
cout=cout+1; %go to next row
end %end of loop
cout=1; %variable to count row no.
for i=linspace(0.9,0.4,50); %loop to store freezing color
cofr{cout,1}=[i 0 0]; %store color into cofr
cout=cout+1; %go to next row
end %end of loop
cout=1; %variable to count row no.
for i=linspace(0.4,0,40); %loop to store solid cooling color
cosol{cout,1}=[i 0 0]; %store color into cosol
cout=cout+1; %go to next row
end %end of loop
a=1; %variable to count frame number
for i=1:10 %loop to plot liquid cooling plot
plot([tliq(i) tliq(i+1)],[templiq(i) templiq(i+1)],'color',coliq{i},'linewidth',1.5);
axis([0 110 0 110]); %limit the axis
xlabel('Time'); %x axis label
ylabel('Temperature'); %y axis label
set(gca,'xtick',[]); %disable x axis values as not required
set(gca,'ytick',[]); %disable y axis values as not required
title('Solidification graph'); %title of plot
hold on %hold plot to take next argument
Frame(a)=getframe(gcf); %store frames to 'Frame'
a=a+1; %go to next frame
end %end of loop
for i=1:50 %loop to plot freezing line
plot([tfr(i) tfr(i+1)],[tempfr(i) tempfr(i+1)],'color',cofr{i},'linewidth',1.5);
hold on %hold plot for next argument
Frame(a)=getframe(gcf); %store each frame to 'Frame'
a=a+1; %go to next frame
end %end of loop
for i=1:40 %loop to plot solid cooling line
plot([tsol(i) tsol(i+1)],[tempsol(i) tempsol(i+1)],'color',cosol{i},'linewidth',1.5);
hold on %hold plot for next argument
Frame(a)=getframe(gcf); %Store each frame into 'Frame'
a=a+1; %go to next frame
end %end of loop
%% Displaying total tile required
if time<=60 %To check time is less than 1 minute
fprintf('\n Time required for solidification %f sec',time); %Print time required
end %End of condition
if time>60 %Check if tme is more than 1 minute
timemin=time/60; %Time required in minutes
timesec=rem(time,60); %time required in secounds
fprintf('\n Time required for solidification %.0f min %.0f sec\n',timemin,timesec);
end %end of conditional statement
%% Storing plot animation
videofile=VideoWriter('solidification_time.avi','Uncompressed AVI'); %create file
open(videofile); %open file
writeVideo(videofile,Frame); %write frames
close(videofile); %close file
Outputs:-
- We get a plot showing the solidification of material w.r.t temperature and tim
- You can view the solidication plotting animation which is stored in the current folder. Name of animation being 'solidification_time.avi'.
- Animation link https://youtu.be/VVM0ZDTZu7Y
- Total time required for solidification can be seen in command window.
- We get a solidification time of 3 min 51 sec
Conclusion:-
- The program make calculating the solidification time a easy task.
- With the help of same program we can calculate solidification time for different shapes, which makes it versatile and convinent to handel.
- The output solidification graph is just to give an idea of how the temeprature of material changes w.r.t time in the mold and is just an approximate graph.
References:-
- Skill-lync.com
- https://en.wikipedia.org/wiki/Chvorinov%27s_rule (Wekepedia page)