Steam Engine

Really interesting structure, that fits the definition "made of faeces and sticks"
Unfortunately the fabricator don't have money for new pressure gauge, so he should be careful in his experiments.

Getting Started with Scilab

1. Install and run Scilab (it is available in Ubuntu Software Center)
2. Type scinotes or  go to Applications-->SciNotes

//scalar variables

// show string variable in messagebox

sometext='variable b='+string(b)

//get current directory

//change current directory
//to where current file is saved
//at first save it as 'test'

pathname = get_absolute_file_path('test.sce')

//get current directory again

//print sometext as output

//argument of a function

//now the function
function y=f(x)
    if x>=0 then
//plot it

//Let's try arrays

//solve linear system c x = d
//variant1, via Matrix Inverse


//variant2, very simple

//let's get and show 1-st element of array x2

//let's get 2nd column of array 'c'

The example below shows to to build simple electrical circuit with xcos (scicos)

Next simple example shows simple hydraulic circuit

Arduino + Small DC motor

This little engine has the ability to buzz.
You can manage the level with command like

analogWrite(motorPin, speed);

where speed is 0 to 255 means level.

I am using details from Starter Kit
Mosfet transistors [IRF520], (to manage voltage for motor)
1N4007 diod (for protection)
TFK-280SA-22125 MOTOR (6V DC)

See the circuit below (click to enlarge)

//Arduino code (google examples for more details)

const int motorPin =  9; // the number of the motor pin

int switchState = 0;  // variable for reading the switch's status

void setup() {
  // initialize the motor pin as an output:
  pinMode(motorPin, OUTPUT);
  while (! Serial);
  Serial.println("Speed 0 to 255");

void loop()
  if (Serial.available())
    int speed = Serial.parseInt();
    if (speed >= 0 && speed <= 255)
      analogWrite(motorPin, speed);

Connect arduino usb to computer, open terminal emulator (ubuntu) and allow this device to run:
sudo chmod a+rw /dev/ttyACM0

Upload the sketch (see the code above) and open Tools>Serial Monitor
Type any value from 0 to 255 into command line

At 255 it is running at full speed and buzzes very fine. 100 is slower. 50 is very slow. At 30 it stuck.

Unfortunately I don't have propeller now, and can't make this test more interesting. You may google for lessons, where it is combined with temperature sensor for PID control.

Scilab - ODE Second order (mass on spring with damping and external force)


// diff equation
// m*y'' = m*g-c*y-r*y'+u(t)



function ft=u(t)

function wf=w(t)

function dz=f(t,y)



Arduino UNO + TMP36 temperature sensor + Scilab

1. Create circuit with TMP36 sensor (google for examples)

2. Connect arduino to computer via USB port (it is for data exchange and power). In Ubuntu 14 you should allow this device. Open terminal and run

sudo chmod a+rw /dev/ttyACM0

note 'ttyACM0' is optional. You may need to change this line.
In arduino software check for:  Tools>Port

3. Install and run arduino software. Create new sketch (google for details):

int outputpin= 0;

void setup()

//main loop
void loop()
int rawvoltage= analogRead(outputpin);

float volts= (rawvoltage/1024.0) * 5;
float celsius= (volts-0.5)*100;



Go to Sketch > Upload.
Go Tools > Serial Monitor to see output (Temperature, degrees C, each 1 sec)

4. SciLab  > Applications > Module Manager - ATOMS > Real Time > Serial Communication Toolbox for Scilab

Install it and re-run scilab

5. Type Scinotes or go to Applications > SciNotes

Create code like (read help for details and commands):

n=300 // plot 300 data points from serial port "/dev/ttyACM0"
while i<=n
data(i) = strtod(readserial(h)); // char to number
plot(i,data(i),'b-o'); // real time plot
drawnow(); // show data

And run it (arduino monitor should be closed).
You will see output in real time. Scilab is getting string output (temperature) and transfer it to the numbers.

SciLab/Xcos also has special tool for Arduino. You may google videos on youtube for that.

SciLab ODE second order

Example #1
Cantilever beam under the concentrated moment


function dz=f(x,y)




result is 1/4 of circle (curve of constant curvature - blue)
'y' is the vector in the code above, it is why we have 2 curves (solution and derivative)

Dealing With CalculiX. Main principles.

What is CalculiX?

CalculiX is two programs

CCX - solver

CGX - Pre-PostProcessor

CCX looks like as one binary file (in Windows it is ccx.exe). If you will try to run it as usual (by double-click) nothing will  happen. CCX is console application with text file interface. At first you should create text file (File.INP) with mesh, named groups and input (boundary conditions) applied.
After that you can run solver from terminal emulator "ccx file". CCX will read text file and make calculation. The result will be many text files stored at the same folder. For example .FRD file will contain all results (as you will order in File.INP)

What is CGX? CGX is pre-postprcessor. What you can do with CGX?
You can run input file for preprocessing (to see and check groups of nodes, element faces and elements).
You can apply some boundary conditions (for example pressure or film coefficient for convection) with using "send" card in CGX.

When calculation is finished, you can run .FRD file for the postprocessing (to check stress, displacements and etc).

Salome-Platform And Salome-MECA

What is Salome? It is powerful open-source CAD/Mesher, developed by EDF (Electricity of France). There is a simple reason why it is open, because there are no reasons to make it proprietary. The goal of development is to design and build industrial things, which is much more expensive and important than possible income that can be obtained from proprietary software. Also the normal proportion for salespersons/developers in software industry is 9 to 1 (not any software, even perfect can be sold easily). You can take part in usage and testing and submit your issues to developer. Salome is mainly for Linux but there is experimental Windows version.

What is Salome-MECA? It is Salome-Platfrom + Code_Aster FEA package. Salome-MECA is for Linux only. There is a special Linux distribution (64 bit), called Caelinux  that combines Salome-MECA and other open-source software for engineers. You may get .ISO file from official website, from SF.NET or using this link:   (md5sum fa8f1d551f0ad9ccfdb295367fc9e9cf  for

See all files at this shared folder:


1) Salome For Windows: download archive (from here or from official website)
Unzip it onto C:\   and double-click salome_run.bat file.
Link for old 32-bit version.

2) Salome-MECA For Linux 64 bit.
Download it from here:
(sometimes this link doesn't work)

Or use link below:
Salome-MECA 2015-2 (64bit)
md5sum A78EAE0B1937F06CED8E7F570B05F94B

also you may get older versions (2013-2014)  
Salome-MECA 2013-1 64 bit Linux:

The reason why older versions can be required is that many Code_Aster  books and examples has been created for older version of Code_Aster (v10). Some commands can be changed and the old sample will require some changes in the newer versions.

Installation of Salome-MECA under Linux is very simple (because it is generally portable software). Untar archive into any folder, and ./ it from terminal.
The process is shown in this video:

3) Caelinux Distribution. 
Under windows you can try VirtualBox or programs like that. Google for "how to install 64 bit under virtualbox" if you're going to use 64 bit. Some extra actions can be required. In this case Linux will work as normal windows program at separate window.
If you want to install it as normal fully functional OS, google for "install linux from ISO". If you have separate flash stick, use UNetBootin from SF.NET (or similar programs) to make and run it in live mode (without installation). Also you can install linux onto usb flash drive or SSD and use it from there.

How to get started?
Salome has perfect help system in English. There are video lessons at this channel
(the series of about 40 lessons from simple examples to complex models will give you good understanding of how it works).

Lesson 1 - Basic Of Salome. Extrusion:
Lesson 2 - Boss and Cut Extrusion:
(bodies will be merged when you use this option)
Lesson 5 - Extrusion Along Path:
Lesson 6 - Body Of Revolution:
Lesson 7 - Boolean Cut:
Lesson 11 - Thicken Of Shell:
Lesson 21 - Basic Of Python Scripting:
Lesson 29 - Code_Aster + Eficas:
Lesson 34 - Hexahedron(i,j,k):
Lesson 35. Hexadralization With Submesh Input.
Lesson 37 - Mixed mesh (Submesh):
Lesson 38 - Radial mesh:

Many other lessons for Salome can be found on this channel.

What you can do with Salome in general? You can build any geometry (bodies and shells) and export it into STEP/IGES standard formats. Salome is little bit less efficient in terms of productivity than Solidworks or other feature-based software but you can do the same things just slower.
What else you can do with Salome? You can prepare mesh with named groups (to apply boundary conditions) and export it into many mesh formats (like .UNV, .MED, etc) or you can use Code-Aster to make calculation inside Salome-MECA.

Open meshers are less productive than commercial ones, but it do the same thing (just little bit more sensitive to your skills and experience).

There are many programs and services (like SimScale) use opensource libraries and can be used along with Salome.