Saturday 22 December 2012

Need the complete program today

10:25 am

Referring to this for understand how to solve pde programmatically.
Really scared now.. :(
Okay, So have been going in steps.

Right now, the following program works.


[p,e,t]=initmesh('Mycircleg');
[p,e,t]=refinemesh('Mycircleg',p,e,t);
u0=zeros(size(p,2),1);
tlist=linspace(1,0.1,20);
u1=parabolic(u0,tlist,'circleb1',p,e,t,0.0035,1,f,1060);
pdesurf(p,t,u1)

What I have to do in this, are the following modifications:

1. The radius of the circle in Mycircleg.m need to be passed somehow from the main Embedded MATLAB file.
One way to do this is save the input radius variable in as a matlab variable in workspace and access it in the next file.

2. In the parabolic function, a number of replacements have to be done. We'll begin from the end. Last 4 parameters of the function are c, a, f, d.
c = viscosity of blood, 0.0035 kg/m.s. a is gravity = 1, pressure f  needs to be provided dynamically from the pressure source, d = 1060kg/m3
One way to do this is to just have another input to the block, and use that variable in place of f.

3. tlist variable!! We know that the function parabolic will evaluate the solution to the geometry for every value of the array tlist. but I need the function to be evaluated for every value of the simulation time!
I will have to try different combinations of possibilities for this.

No comments:

Post a Comment