Thursday 20 December 2012

Analysis to plot the pde parabolic solution

10:15 am

Now that I have understood what the code snippette does, we've gotto think about what the output should be.. It should be the velocity profile during the simulation time.

This makes me realize that, the time tlist that we supply to the parabolic function for solution of the pde should be changed to the simulation time. => How?

 Each column in u1 is the solution at the time given by the corresponding item in tlist. For my function, parabolic, each item in tlist needs to be block.CurrentTime. What should be the size of this array? Depends on the number of itertions of the solution we want to see. I need to try this out, on a smaller scale before implementing it on my model. Need an example.

let x be a sin wave, let y be a square wave. Let us try to build a block that will create an output that is a sum of these two inputs and the simulation time taken as an input through the functions arguments. ok. Let's try that out right away, .. but for that, I need to know how,.. how EXACTLY to write a level 2 matlab s function. Here we go.

Alright, so, read through and have realized that, it's a whole new set of keywords and almost an entire language to learn, .. when writiing an s function.. Remember having a s-function writing wizard of some sort in simulink.. It will be better if I use that,.. instead of wasting my time writing the entire code, .. let's check that out. No, .. no, .. that looks even more scary, coz it uses C mex and c code. Let that be. I'll continue with writing the s function matlab code only. Studying how to write an s-function from this pdf document. Very helpful.

No comments:

Post a Comment