Pages

15.2.15

Find consistent initial conditions for DAE system [MATLAB - ODE solver]

Matlab can be used to solve DAE systems. Generally speaking a DAE system is a set of differential and algebraic equations that need to be solved simoultaneosly. Matlab provides different tools able to deal with these types of equations; those solvers are named ODE sovers. Even if the name itself would suggest the capability of the solvers to solve only ODEs, also DAEs can be easily managed.

For a complete overview of the different solvers, please visit the following link where all the available builtin solvers and their properties are described in detail.

One of the most important part to get a DAE system to work is to feed it a set of consistent initial conditions. Matlab provides also a tool able to support the user in this process (the function is called decic) but here I would like to explain a more DIY method.

Let's suppose to have your DAE system composed of N differential equations and M algebraic equations. To find a suitable set of initial conditions you could just define the initial value or guess for the differential states and use those guesses to solve the only set of M algebraic equations.

To do this you can easily use the fsolve Matlab's function. This script will try to find the root of a set of equations; Once you get the result from the fsolve you can just use it, with the guess of the differential states, to build the array of consistent initial conditions for the ODE solver.

Please note that in order to be considered consistent, the result coming from the fsolve should have a low residual from its run.

19.12.14

Change EASILY the default program (and other actions) when opening a file

This is a quick post in which I will simply describe my problem and the wonderful solution I found: -I needed to open two .tex files, and I use TexStudio as my default editor (so far it's the best editor I know).
However, TexStudio's default behavior is to open just ONE INSTANCE of the program and load all the files I open on that same instance.
If I want to open a new instance, I found a I nice solution here:
http://tex.stackexchange.com/questions/123660/start-texstudio-portable-in-multiple-instances

Simply go to my direct link access to TexStudio's link icon and add at the end of the target field (i.e. after "(path)\texstudio.exe" to:

" --start-always "%1"
That way, everytime you open Texstudio from this link, you'll open a new instance.
However, if you want to open a new instance everytime you open a .tex file, apparently the best solution is to download this beautiful program:

http://defaultprogramseditor.com/

which allows you to easily change the behavior of your default opening programs. For example:

(I learned this trick from here: http://superuser.com/questions/136133/how-do-i-set-advanced-file-associations-in-windows-7)

And that's all for today.




9.12.14

Liuteria A440 - Laboratorio di liuteria artigianale - Luthier

A weird job: the Luthier

Who knows what is the Lithier job?

Luthiers
I've found this web site across the web. It's only in Italian (unfortunately) but you can try to translate it using some kind of automatic translator (the result could be terrible :) )

Anyway: a Luthier is an artisan whose job is to build, repair or design musical instruments. It's a quite unique work.

This guy from Italy builds handmade guitars and basses (both electrical and classical) as well as repair them.


The web site is pretty cool, and you can find a central box containing all the stuff that he publishes on Facebook; it's a fancy way to show the ongoing works and projects.

On the webpage you can find also videos of handmade instruments played by professionist. If you enjoy this work and would like to get more info you can visit the official web site; Therein are also listed all the links to the main social network used by that guy.

Here's the link:

Liuteria A440 - Laboratorio di liuteria artigianale - Luthier

Bye :)