0% found this document useful (0 votes)
57 views14 pages

User (COMPANY NAME) (Company Address)

The document describes two computational fluid dynamics tasks analyzing a system of mass, spring, and damper placed in flowing water. Task 1 models the system under forced vibration, with the force provided by drag and inertia of the water flow. The governing equation is converted to numerical form and solved in MATLAB. Task 2 also analyzes the system numerically but with a different set of parameters and conditions. Results are presented for power output across various flow velocities and damping coefficients.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views14 pages

User (COMPANY NAME) (Company Address)

The document describes two computational fluid dynamics tasks analyzing a system of mass, spring, and damper placed in flowing water. Task 1 models the system under forced vibration, with the force provided by drag and inertia of the water flow. The governing equation is converted to numerical form and solved in MATLAB. Task 2 also analyzes the system numerically but with a different set of parameters and conditions. Results are presented for power output across various flow velocities and damping coefficients.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

user

[COMPANY NAME]  [Company address]


Contents

Computational fluid dynamics...................................................................................................1

Description of Task 1.................................................................................................................2

Result..........................................................................................................................................6

Description of Task 2.................................................................................................................8

Result........................................................................................................................................10

References................................................................................................................................11

List of figures

Figure 1: One dimensional meshing.....................................................................2


Figure 2: power developed at KC = 10 c = 100Ns/m...........................................7
Figure 3: Power with KC number.........................................................................8
Figure 4: Power with damping coefficient...........................................................9
Figure 5: Time variation with thermal diffusivity..............................................12
Computational fluid dynamics
Computational fluid dynamics (CFD) is a technique to solve fluid or heat transfer problems.
In this technique complex, fluid dynamics equations are solved with the help of software. The
governing equations are used to analyze the system. The advantage of CFD techniques are to
finish the analysis in a short time compared to manual analysis, and error obtained in the
CFD techniques are controllable. The error can be further reduced by changing the error
limit. The basis of computational fluid dynamics is converting the governing equations into
the form of codes which can be easily understood by software programs. Some software
needs direct coding of the system and some software needs direct modeling of the system.
Programs with coding need special attention as it may give the wrong solution if the codes
are used improperly. There are many mathematical techniques available to use CFD in
software programs. It is important to use the proper mathematical code so that the solution
may be obtained in a short time. Numerical methods are one of the mathematical techniques
using finite element analysis. In this method, the analysis field is converted into nodes. The
governing equations are applied to each node and solved using a computer. It is also called
meshing. It is also important to keep a proper distance between node as it may affect the
solution to get converged. A one-dimensional mesh filed is shown in the image below.

Figure 1: One-dimensional meshing


At a time one node is analyzed and the analysis is completed for the entire nodes. This entire
iteration is repeated until the solution get converged. In this report, the analysis of the one-
dimensional system is performed by MATLAB. Loop system is used to iterate the codes until
the solution get converged. The time for each iterative is in the order of 0.001 to 0.01. it
means the time used in each loop is 0.001s. The iteration is analyzed precisely. The more
precise analysis the less error will be obtained. To get the precise result the time andspace
between the nodes must be small.

In all governing equation, differential equations are used to represent the properties. Using
the numerical techniques, the differential formulas are converted to numerical forms. Rather
than using the direct differential forms in MATLAB, it is recommended to use the numerical
form to simplify the solution. The numerical form of differential equations is shown below.

dx x i+1 −x dx x−x i−1 dx x i+1 −xi −1


= , = , =
dy Δy dy Δy dy 2 Δy

The first order differential forms can be expressed in three forms. One is the forward
difference approach, backward difference approach and central difference approach. It is
found that the central difference approach is having less error than the other two methods.
The idea behind the numerical form is to find the slope of dependent variable with respect to
an independent variable at a location. To find the slope very close nodes are used. If the nodal
difference is more the solution will get diverged and the error will repeat or get multiplied in
each iteration. The second order differential equation is expressed in the centre difference
method.

d2 x x i+1−2 x+ x i−1
=
d y2 Δ y2

Two nodes used in first-order differential term and three nodes are used in the second order
differential term. If the order of differential terms is three there will be five nodes in the
numerical form. These nodes are derived from Taylor series expansion or the addition of
Taylor series expansion of two different terms. There are chances that the truncation error is
present in each term. The order of truncation error is always less than 0.01. In this report,
there are two task t be completed and the governing equation I each task are converted into
numerical form and it needs to be solved using MATLAB.

Description of Task 1
It is a simple initial value problem in which the initial conditions have to be specified. It
consists of an electric generator which produces power when it is moved. The system is
placed in moving water and the water is moving the system which creates the movement and
then power is produced. The system is a combination of damper, mass, and spring. The
damper is connected with the generator. Whatever the damping energy produced will be
converted to power. The working of the system is explained below. The system consisting of
mass, damper, and spring is placed in flowing water. Water is allowed to move in a specified
speed. When the water is flowing over the mass causes the movement of mass in the direction
of flow. The movement of the mass is first allowed and then restricted by the damper. The
spring of the system allows the continuous movement of mass but the damper is stopping the
movement of the mass. The presence of flowing water continues the cycle and the system
continuously generating power.

The water is flowing with velocity is described in the problem as

2∗pi∗t
U =U 0 +U m sin(¿ )¿
T

The equation shows that the velocity is not constant and is a function of time. ‘T’ is given as
the time for the oscillatory flow field. Thus, the velocity is a function of sine and the velocity
increases and decreases with time. The term ‘T’ is related to the KC number and is given as

T Um
KC = . Substituting the T in the velocity
D

2∗pi∗t∗Um
U =U 0 +U m sin(¿ )¿
KC D

U0 is the steady part of the velocity and is constant. The second part in the velocity term
varies with time and KC number. KC number is the term relates the drag force of water with
respect to its inertia force applied on an object in the flow field. As based on the velocity
term, when KC number increases since value decreases and the velocity is also decreased.
For a small KC number, the flow field will be more fluctuating in nature.

The system consists of a mass, spring, and damper. The governing equation to solve the
mass, spring damper system under free vibration is given below.

d 2 x dx
m 2 +c +k x=0
dt dt

And if a continuous force acting one it rather than short excitation the equation becomes

d2 x dx
m 2
+c +k x=F
dt dt

In free vibration, the power produced will reduce and ends after some cycle. If the damping
coefficient is critically damped it will not undergo any cyclic movement. There are cases that
the vibration can be stopped based on the damping coefficient. If the damping coefficient is
underdamped the system will vibrate and ends after some cycles, If the system is critically
damped or overdamped the vibration will end even without completing a cycle. If the system
is undergoing forced vibration, vibration will continuous but the amplitude of vibration will
be controlled. The more the damping the vibration amplitude will be less and it undergoes
more time to finish one cycle.

The force acting on the system in this problem is drag force due to water and inertia force due
to water. The total force is the summation of drag force and inertia force. Force term is
expressed as

d Vr 1
F = C A md + ρ C D A |V r|V r
dt 2

CA is the added mass coefficient, and is the mass of the water, rho is the density of water, Cd
is the drag coefficient, A is the projected area against the flow direction and Vr is the relative
velocity between water and the mass. Adding the force in the governing equation

d2 x dx d Vr 1
m +c +k x = C A m d + ρ C D A |V r|V r
dt 2
dt dt 2

Now the system is balanced and the system will have controlled vibration based on the force
acting on it. Applying the numerical term in the governing equation

x i+1−2 x + x i−1 x i+1−x i−1 d Vr 1


m +c + k x = C A md + ρ C D A |V r|V r
Δt 2
2 Δt dt 2

Matlab codes are generated based on this governing equation and is shown below

close all
clear all
clc
c = 100 ; % dampinf coefficient
k = 200 ; % thermal conductivity
Ca = 1 ; % added mass coefficient
Cd = 1.8 ; % drag coefficient
m = 50 ; % mass of cylinder in the vibratory system
L = 1 ; % kength of cylinder
d = 1024 ; % density of water
LD = 8 ;
time = 50 ; % total time taken for the analysis
n = 10000 ; % Number of divitions in the total time
total_time = linspace(0,time,n);
Um = 1+LD/10 ; % steady velocity of water
U0 = 0.1*Um ;
D = (10+LD)/100; % Diameter of the cylinder
A = L*D ; % projected area of cylinder
m1 = d*pi/4*(D^2); % mass of water
[x_location,P] = analysis1a(LD, time, n, total_time, Ca, Cd,
k, c, A, D, U0, Um, d, L, m, m1);
[x_location,P] = analysis1b(LD, time, n, total_time, Ca, Cd,
k, c, A, D, U0, Um, d, L, m, m1);

function [x_location,P] = analysis1a(LD, time, n, total_time,


Ca, Cd, k, c, A, D, U0, Um, d, L, m, m1) ;
for KC = 2:2:20
dt = total_time(2)-total_time(1);
T = KC *D/Um ; x_location(1) = 0 ;
U = U0 + Um*sin(2*pi*total_time/T);
i=1; V(i)= 0; Vr = U(i)-V(i);P(1) = 0 ;
x_location(i+1) =
((2*m*x_location(i)+2*m*dt*U0)/(dt^2)+c*U0+k*x_location(i)
+Ca*m1*(U(i+1)-U(i))/dt+Ca*m1*(2*x_location(i)
+2*dt*U0)/dt^2+0.5*d*A*abs(Vr)*Vr)/(2/dt^2)/(m+Ca*m1);
for i = 2:n-1
V(i) = (x_location(i)-x_location(i-1))/dt ;
Vr = U(i)-V(i);
x_location(i+1) = (1/((m/dt^2)-(c/2/dt)+
(Ca*m1/dt^2)))*(m*(2*x_location(i)-x_location(i-1))/dt^2-
c*x_location(i-1)/2/dt-k*x_location(i)+Ca*m1*(U(i+1)-U(i))/dt-
Ca*m1*(x_location(i-1)-
2*x_location(i))/dt^2+0.5*d*Cd*A*abs(Vr)*Vr);
P(i) = c*(V(i)^2);
end
figure(1)
plot(total_time(1:end-1),P)
xlabel("Time in seconds")
ylabel("Power developed (W)")
title("effect of KC number")
hold on
end

KC = 10 ;
dt = total_time(2)-total_time(1);
T = KC *D/Um; x_location(1) = 0;
U = U0 + Um*sin(2*pi*total_time/T);
i=1; V(i)= 0; Vr = U(i)-V(i);P(1) = 0;
x_location(i+1) =
((2*m*x_location(i)+2*m*dt*U0)/(dt^2)+c*U0+k*x_location(i)
+Ca*m1*(U(i+1)-U(i))/dt+Ca*m1*(2*x_location(i)
+2*dt*U0)/dt^2+0.5*d*A*abs(Vr)*Vr)/(2/dt^2)/(m+Ca*m1);
for i = 2:n-1
V(i) = (x_location(i)-x_location(i-1))/dt;
Vr = U(i)-V(i);
x_location(i+1) = (1/((m/dt^2)-(c/2/dt)+
(Ca*m1/dt^2)))*(m*(2*x_location(i)-x_location(i-1))/dt^2-
c*x_location(i-1)/2/dt-k*x_location(i)+Ca*m1*(U(i+1)-U(i))/dt-
Ca*m1*(x_location(i-1)-
2*x_location(i))/dt^2+0.5*d*Cd*A*abs(Vr)*Vr);
P(i) = c*(V(i)^2);
end
figure(3)
plot(total_time(1:end-1),P)
xlabel("Time in seconds")
ylabel("Power developed (W)")
hold on

function [x_location,P] = analysis1b(LD, time, n, total_time,


Ca, Cd, k, c, A, D, U0, Um, d, L, m, m1);
for c = 0:50:2000
KC = 10;
total_time = linspace(0,time,n);
dt = total_time(2)-total_time(1); m1 = d*pi/4*(D^2);
T = KC *D/Um; x_location(1) = 0;
U = U0 + Um*sin(2*pi*total_time/T);
i=1; V (i) = 0; Vr = U(i)-V(i);
x_location(i+1) =
((2*m*x_location(i)+2*m*dt*U0)/(dt^2)+c*U0+k*x_location(i)
+Ca*m1*(U(i+1)-U(i))/dt+Ca*m1*(2*x_location(i)
+2*dt*U0)/dt^2+0.5*d*A*abs(Vr)*Vr)/(2/dt^2)/(m+Ca*m1);
for i = 2:n-1
V(i) = (x_location(i)-x_location(i-1))/dt ;
Vr = U(i)-V(i);
x_location(i+1) = (m*(2*x_location(i)-x_location(i-1))/dt^2-
c*x_location(i-1)/2/dt-k*x_location(i)+Ca*m1*(U(i+1)-U(i))/dt-
Ca*m1*(x_location(i-1)-
2*x_location(i))/dt^2+0.5*d*Cd*A*abs(Vr)*Vr)/((m/dt^2)-
(c/2/dt)+(Ca*m1/dt^2));
P(i) = c*(V(i)^2) ;
end
figure(2)
plot(total_time(1:end-1),P)
xlabel("Time in seconds")
ylabel("Power developed (W)")
title('effect of daming coefficient')
hold on
end

Result
As per the objective, the graphs are plotted to check the change in power with respect to KC
number and damping coefficient. The analysis is carried out to check the behavior of the
system at a KC value of 10 and the damping value of 100m NS/m. The total time taken for
the analysis is 50seconds and the time division is 0.0005 seconds. The graph is plotted with
power developed on the Y axis and time-in s X axis. The graph is shown below.
Figure 2: power developed at KC = 10 c = 100Ns/m
Power is fluctuating at the initial stage and becomes stable. It takes around -3 seconds for this
particular system to get in stable condition. It can be seen that the system undergoes the
cyclic process. The variation of power at different KC number is shown below.

Figure 3: Power with KC number


As the KC number increases the power produced is increases. And for all values of KC
number, there is a rapid increment in power, it is because of the unstable condition and the
system tries to reach in stable condition. Prior to stable condition, the system frequency tries
to match with the water flow velocity frequency. The variation of power with the damping
coefficient is shown below.

Figure 4: Power with a damping coefficient


When the damping coefficient with a high value of magnitude uses the power produced is
high. The more restriction the damper is provided against the flow the power produced is
more. But it has to be noted that the damping coefficient cannot be much high as it may stop
vibration due to water flow. The more damping increases the power and may reach a peak
value and then decrease.

Description of Task 2
In this task, the CFD techniques are used in heat transfer analysis. Heat transfer I simply
energy transfer from high energy level to low energy level. Energy can be transferred by heat,
work or by mass. This problem deals with energy transfer by heat as well as mass. One
dimensional conduction equation is used to solve the system. The system is a 2 m length soil
and the analysis field are divided into 200 nodes. The soil temperature to reach 25C is to be
analyzed. In this system soil at an initial temperature of 18C is used. The top surface of the
soil is kept as 30C. It can be seen that the system will undergo thermal equilibrium after some
time and will reach 30C. It is considered to be a one-dimensional analysis as the heat is
conducting in one direction only towards the direction perpendicular to the surface). Along
with the conduction heat transfer ground water of velocity 0.016m/s is flowing in the same
direction of heat flow. Thus, heat transfer will be boosted up due to mass transfer of
groundwater.

The governing equation for the analysis of heat conduction with the mass transfer is shown
below

∂T ∂T ∂2 T
+u =α 2
∂t ∂x ∂x

The corresponding numerical form of the governing equation is written as

T i +1, n−T T i+1−T T i +1−2T +T i−1


=−u +α
2 Δt 2 Δx Δ x2

To find the temperature at each node

T i +1−T T i+1−2 T +T i−1


T i+1 ,n = (−u +α ) * 2 Δt+ T
2 Δx Δ x2

Δt is the time division, u is the velocity of water and T i+1 ,n is the temperature which is to be
calculated at each time step The other temperature value are taken from previthe ous time
step and the codes needed to converged for each loops.

The objective of this analysis is to find the time to reach 25C at a location 1.5 meter from top
ground. The analysis of time to reach 25C at location 1.5m with varying thermal diffusivity is
also performed. ‘α ' is called thermal diffusivity and is a function of thermal conductivity,
density and specific heat. The bottom boundary condition is given as there is no heat transfer
at location x = 2 m from the ground. To write code for this condition T(n) at x = 2m is same
as T(n-1). MATLAB code for this governing equation is given below.

close all
clear all
clc
n = 200 ; % number of division space
L = 2 ; % total analysis length
s = linspace(0,L,n) ; %total space is devided in to 'n' parts
ds = s(2)-s(1); % difference between each nodes
LD = 8 ;
T = zeros(1,n)+(10+LD); % initial condition of temperature
T(1) = 30; % boundary condition of soil
dt = .0001; % each time step for iteration
T1 = T;
u = 0.002*(1+LD) ; % velocity of water
T_D = 0.0002 ; % thermal diffusivity
[time] = analysis2a(LD, n, T_D, u, L, ds, T, dt, T1);
disp(time)
[tm,time] = analysis2b(LD, n, T_D, u, L, ds, T, dt, T1);
time_25C = tm ;

function [tm,time] = analysis2b(LD, n, T_D, u, L, ds, T, dt, T1);


X = 0 ;
alpha = 0.0002:0.0001:0.001;
for T_D = alpha
X = X+1;
time = 0 ;
%Intial soild condition is given as
T = zeros(1,n)+(10+LD);
% Soil top boundary condition
T(1) = 30;
T1 = T;
while T(150) < 25
time = time + dt ;
for i = 2:(n-1)
T(i) = (((T1(i+1))+(T1(i-1)))/ds^2-(u/T_D)*(T1(i+1))/2/ds+
(u/2/T_D/ds+1/T_D/dt-2/(ds^2))*(T1(i)))*dt*T_D ;
end
T1 = T ;
T1(n) = T1(n-1);
end
tm(X) = time ;
end
plot(alpha,tm)
xlabel('thermal diffusivity')
ylabel('time taken to reach 25C')

function [time] = analysis2a(LD, n, T_D, u, L, ds, T, dt, T1);


time = 0 ;
while T(150) < 25
time = time + dt ;
for i = 2:(n-1)
T(i) = (((T1(i+1))+(T1(i-1)))/ds^2-(u/T_D)*(T1(i+1))/2/ds+
(u/2/T_D/ds+1/T_D/dt-2/(ds^2))*(T1(i)))*dt*T_D ;
end
T1 = T ;
T1(n) = T1(n-1);
end
}

Result
Two analysis are performed in this task. One is to find the time for reaching 25C at location x
= 1.5 m. And the other task is to find the variation of time taken for different values of
thermal diffusivity. The analysis one shows that location 1.5 m from ground reaches 25C in
169 seconds. The temperature reaches 25C in 169 seconds and take more time to reach 25C
at location beyond 1.5m. Same way the locations less than 1.5m from the ground will reach
25C in lesser time than 169 seconds.
Figure 5: Time variation with thermal diffusivity.

The second analysis is plotted on a graph with the time taken on Y-axis and thermal
diffusivity on X-axis. The graph is shown in the image above. The thermal diffusivity is
varied from 0.0002m2s to 0.001m2/s with a variation of 0.0001m2/s. From the result, the
time taken to reach 25C is increased with thermal diffusivity and then decreases. Thermal
diffusivity has an important role in distributing the heat inside a material. Moreover, this term
comes with transient heat conduction. In steady state heat conduction, the system reaches
steady state and the governing equation used in the steady state will not have thermal
diffusivity term or any time terms. Before reaching a steady state, a system will undergo
unsteady state condition which is governed by the terms explained in the above equations.
The more thermal conductivity the more the material will transfer heat within the material.
The reason the time has taken is increased will be initially the material will try to store the
heat rather than conducting it. Since the part at x =2 meter from the ground is insulated the
heat will be reflected back and get stored everywhere. This will increase the time taken to
reach the specified temperature.

References
 Rajput, R. (2010). A textbook of fluid mechanics ("Fluid mechanics and Hydraulic
machines"--Part I). Ram Nagar, New Delhi: S. Chand.
 Holman, J., & Bhattacharyya, S. (2002). Heat Transfer. New Delhi: McGraw Hill
Education.
 Danko, G. Model Elements and Network Solutions of Heat, Mass and Momentum
Transport Processes.

You might also like