Tuesday, October 30, 2012

Week Eleven Progress (SEM 2)


The plan for this week are to find equations for the flow and the pressure of blood in the arterial tree and to transfer the equations into MATLAB language.

Well I researched and I found an article called "A hybrid one-dimensional/Womersley model of pulsatile blood flow in the entire coronary arterial tree" for "Yunlong Huo and Ghassan S. Kassab" this article is simple and I the blood pressure and flow equation for 1D simulation and I took it as refrence

Quotation from article:

"
The details of the mathematical derivations are outlined in APPENDIX A. Briefly, the governing equations for flow and pressure may be expressed through conservation of mass and momentum asFormula(1)Formula(2)where A is cross-sectional area (CSA) of the vessel, q is volumetric flow rate, ρ is density, Estat is static Young's modulus, h is wall thickness, R0h0, and A0 are original radius of the vessel, original wall thickness, and original CSA, respectively, and ν is kinematic viscosity. 
"


Article http is:
http://ajpheart.physiology.org/content/292/6/H2623.full



Now I have to translate these two equations to MATLAB language.

After I organized the equation I wrote the equation at MATLAB as apeared below

MATLAB APPENDIX for EQUATION 2:


A = ?;
q = ?;
p = ?;
v = ?;
h0 =?;
R0 = ?;
A0 = ?;
Estat = ?;
E = ((-4/3)*(q/A^2)+((A/p)*((Estat*h0)/(R0*A0)));
F = (8/3)*(q/A);
G = v;
K =(dt/dx);
E =(dt^2)/(dx^2));




Week Nine Progress (SEM 2)

This week I was quit busy with my academic stuffs. I had presentations and also I was preparing and sitting for my replaced face tests since I skipped face tests last week (week 8) for temporary leave.
So I have not make a seen progress just I have seen my supervisor Dr Rosmina Jaafar and we discussed about the geometry of upper limb artery issue. She guide me to ignore the geometry of the artery for now because it need long time to study new programming such as ANSYS and I have just four left for the final presentation. She guided me to focus on the blood flow inside that artery.

Lately this week after the meeting with my supervisor. I decided simulated the blood flow not only in the upper limb artery but in whole artery system due that in the beginning I specified my my project in upper limb artery because it very difficult to construct the geometry system and the blood flow for the whole arteries in the body. Since now I am focusing on the blood flow I will extend my project from the blood flow inside the upper limb artery to the whole system artery

Week Eight Progress (SEM 2)

Beginning of this week I decided to stop continuing making MATLAB coding for the project equations for while because I am far away from university's library. secondly to simulate the upper limb artery into MATLAB.

So I began with searching on how to construct the geometry of arterial using MATLAB since a part of my project is to simulate or construct the geometry of upper limp artery besides the blood flow through it.

I made a comprehensive research I went through internet sites and many researches talk about modeling arteries such as (MODELLING THE HEMODYNAMICS IN THE HUMAN CAROTID ARTERY BIFURCATION AND COMPUTER SIMULATION" for Adrian Postelnicu, Dan Minea, Livia Sangeorzan, and Mircea Lupu) and ("MODELING 3-D COMPLIANT BLOOD FLOW WITH FOSLS" for Jeffrey J. Heys, Curt DeGroff, Tom Manteuffel, Steve McCormick and Henry Tufo) and more.

Through my reading I discovered a new obstacle in accomplishing my project that the simulation of blood flow can be done by MATLAB but the geometry of artery it self can not be simulated with MATLAB, it can be simulated by using FOSLS or ANSYS or FLOTRAN but not the MATLAB.

I decided to meet my supervisor Dr Rosmina Jaafar next week since this week I am out of Malaysia in temporary leave; to talk about this issue and how I can handle it.

Week Seven Progress (SEM 2)

Since last week I failed to know how to transfer an inegration equation to matrix form then to MATLAB form. that's mean I failed to transfer the main equation of my project (the Navier-Stoke equation) into matrices then MATLAB.
I decided to get help so I went to see Mr. Syamsul Adlan Mahhir who taught me mathematics four. I went to him in paticular since he is good at mathematics and MATLAB as well. I showed him the equations and I asked him how to change those kind of equations to matrices then to MATLAB. After he saw the equations he told that "it is not easy to achieve that; it long and complex process" and he advised me to read something called Matrix MATLAB. And he Asked me if I faced any problem don't hesitate to come to him again.

I searched on that and I founded it's a really complex process as mister Syamsul said; and there are mathematics researches and master research dedicated only for transferring blood flow equations - which I'm using them too- to MATLAB

I got depressed because knowing how to change blood flow equations (Navier-Stoke -or womresly- and finite) to matrices then MATLAB and there are mathematical researches done by more than researcher only simulating the blood flow.

I decided to intensify my search on the issue. after intesified researched I found a book at BMI library:

called " Introduction to Numerical Analaysis Using MATLAB" to Rizwan Butt 

and the other book called " An Introduction to Numerical Methods A MATLAB Approach" authored by Abdelwahab Kharab and Ronald B. Guenther. 

the beauty of these two books they talk about some numerical methods and they give the general equation for every method then they transfer the equation into matrices after that they give the MATLAB coding for every particular method.

In these to books I found matrices form and the MATLAB coding of the Finite equation -one of equation I use in this project- as appeared in the attachement below.

ATTACHMENT MISSING


notice: those pictures taken from  Introduction to Numerical Analaysis Using MATLAB books

The bad news is I could not found the matrices or the MATLAB coding for Navier-Stoke equation -main equation of the blood flow- in none of the books although the Navier-Stoke equation under numerical method.

So I have to comprehend and intensify my research more in order to know how to matrices the other equations and simulate them in the MATLAB.

Week Six Progress (SEM 2)

As I learnt through the last weeks; we can not code a mathematical equation to MATLAB coding straight away. We have to change the equation to matrix form first then from matrix form to MATLAB coding. This is a must procedure in order to transfer any equation into MATLAB; so I decided firstly gain information, learn and practice how to transfer an equation into matrix form then from matrix form to MATLAB.

There was no big issue in transferring normal equation (first and second order) matrix form but the problem was in transfering defrentiation equations into matrices.
Since the project deals with complex numerical and differential equations -as appeared below-  I really faced a real dilemma in knowing how to transfer those equation into matrices the to MATLAB. the whole week gone in searching and understand how to transfer from numerical to matrices.

appendix: (Navier-Stoke equaion)






Week Five Progress (SEM 2)

NOTICE:


MY ATTACHMENTS FOR THIS WEEK ARE STILL MISSING AS SOON AS THEY BEEN FOUNDED THE POST WILL BE UPDATED

SORRY

Thursday, October 25, 2012

Week Four Progress (SEM 2)

during this week I studied how to apply equation into MATLAB
I started with simple equation. In order to apply any equation to MATLAB we have to convert the equation to matrix form then
X+2Y=5
2X+Y=4














A*Z=B
Z=B/A




RESULT





Sunday, October 7, 2012

Week Three Progress (SEM 2)

I continue mastering the MATLAB:) during this week as well . In this week I focused on the commands of plotting 2D graph and the basic commands of plotting 3D graph


  • Firstly, I learnt how to make 2D plot by using the command 
    • plot(independent variable, dependent variable, ' the property')



  • Then I went through the properties of plotting (colour and line tribe); there are many properties for graph drawing such 'k' for black colour line and '*' for drawing star line.


Example



The Result






  • Then I learnt how to make the graph grid --> by adding 'grid' command after the 'plot' command

  • Then I went through and I understood the 'hold on, hold off and close all' commands
    • hold on & hold off --> to show the last figure or not
    • close off --> to close any figure was opened



  • After that I learnt about 'subplot' command and the different between 'subplot' and 'plotsubplot(number of rows, number of column, the number of the matrix which occupy the figure)


Example for subplot




The Result






  • Then I learnt how to name or label the graph Axis's and title the graph
    • For labeling X Axis we use the command --> xlabel('The of the axis')
    • For labeling Y Axis we use the command --> xlabel('The of the axis')
    • For titling the graph we use the command --> title('The Title of the graph')


Example for Label and Title the Graph



The Result





  • Actually, I went through many related to 2D plotting and I won't be able to mention them all, but I can tell before I ended this post; one the most significant which I learnt during this week that I learnt the basic command of plotting 3D graph
    • The most important two commands in plotting 3D are 'meshgrid' and 'mesh' (which work as plot command in 2D)


Here an Example for 3D Plotting




 The Result