@c -*-texinfo-*-
@c This is part of the FisicaLab User Manual.
@c Copyright (C)  2013 German A. Arias.
@c See the file copying.texinfo for copying conditions.

@node Welcome, Kinematics, Top, Top
@chapter Introduction

@cindex Introduction

FisicaLab is an educational application to solve physics problems. Its main objective is let the user to focus in physics concepts, leaving aside the mathematical details (FisicaLab take care of them). This allows the user to become familiar with the physical concepts without running the risk of getting lost in mathematical details. And so, when the user gain confidence in applying physical concepts, will be better prepared to solve the problems by hand (with pen and paper). FisicaLab is easy to use and very intuitive. However, in order to take advantage of all its features, we recommend you read first these help files.

FisicaLab display two windows, one named @emph{Modules and elements} and other named @emph{Chalkboard}. The first of these windows, contain all modules that can be used to solve problems. These modules are grouped by: kinematics, static, dynamics, ... (see image below). You can select one of these groups with the buttons at the top of the window, marked with (1) in the image. When you leave the mouse's cursor above one of these buttons, a label with the group name is displayed. The buttons marked with (2) let you select the system of units, SI or English. You can see the modules of the selected group inside the box marked with (3). The tabs marked with (4) let you select one of the available modules. The elements of the selected module are displayed inside the box marked with (5). This elements let you set the problems. Inside the box marked with (6) you can write the element's data (if any element is selected, this box will be empty).

@center @image{FisicaLabPanel, 7cm}

The window named @emph{Chalkboard} (see image below), have at the top two buttons, marked with (7). The button at the left let you solve the problem, and the other is to clean the chalkboard. The black box marked with (8) is the chalkboard, where you add the elements to set the problems. You need keep in mind, although you can't see, that the chalkboard is a grid formed with cells of 50x50 pixels. By default the chalkboard size is 26x18 cells. In @emph{Preferences} panel you can change the size to a maximum of 100x100 cells (A greater size than the default could be useful for trusses problems). The text view marked with (9) is where FisicaLab show the answer and messages. The checkbox marked with (10) erase the content of the text view before show the next answer or message. If you want keep the previous content, unselect this checkbox. In this case you can add notes to identify the results of the different problems.

@center @image{FisicaLabPizarra, 7cm}


@menu
* Handling the elements::       
* Element data::                
* How it works::                
* Messages::                    
@end menu

@node Handling the elements, Element data, Welcome, Welcome
@section Handling the elements

@cindex Handling the elements

To add elements at the chalkboard, do a click above the desired element. The mouse's cursor will become in an open hand, meaning this that we will add an element. Do a click above the chalkboard in the position where you want the element, the mouse's cursor will back at its original shape. Each time you add a new element, or select one different, a yellow square will be drawn around the current element. The data of the current element are displayed, for its edition, at panel @emph{Modules and elements}. When you leave the mouse's cursor above one element in the chalkboard, a label with the element's data is displayed. In @emph{Preferences} panel you can configure the font size of these labels.

@center @image{chalkboardProperties, 7cm}

If you want move an element, click above it with the @key{Control} key pressed, the mouse's cursor will become in a close hand, meaning this that we are moving an element. Do click in the new position and the mouse's cursor will back at its original shape. In other hand, if you want delete an element, do click above it with the @key{Shift} key pressed.

Keep in mind that FisicaLab don't let you combine elements from different modules. The elements in each module are enough to set a wide variety of problems.

@node Element data, How it works, Handling the elements, Welcome
@section Element data

@cindex Element data

When you select an element in the chalkboard, or add a new element, you will see a table at the bottom of the window @emph{Modules and elements}. With a double click above any field of the second column, you can write the data. FisicaLab supports scientific notation, to use this use the letter E. For example, to write the number @samp{3.45x10-5}, write:

@example

3.45E-5

@end example

All numerical data must be without spaces. For example, the following numbers are wrong:

@example

- 5.3
7.8E - 8

@end example

Also, FisicaLab can use many conversion factors. To use these, add the character @kbd{@@} before the conversion. If you have selected the SI system, FisicaLab assumes that all data are in meters, kg, seconds, etc. With the English system, FisicaLab assumes that all data are in feet, pounds, slugs, seconds, etc. (in the English system the mass must be in slugs). For example, if you want write an speed of @samp{75 km/h}, use:

@example

75 @@ km/h

@end example

Here, we have one space before and after the character @kbd{@@}, but these are for clarity, and are not required. Each module has its how conversion factors, as you can see in the sections that deal about these. 

You can use letters or words to represent the unknown data. If, for example, the final velocity is an unknown data, you can represent this like:

@example

fv
finalv
fvel

@end example

or any other combination. But, we recommend you use letters or words that are related with the unknown data. Also, the conversion factors can be used with the unknown data. For example, if the time is unknown, and you want this in minutes, write something like:

@example

t @@ min

@end example

The scientific notation can be used with the unknowns, adding the characters @kbd{#E} at the end of the name. For example, for a coefficient of thermal expansion, that is a small value:

@example

coefficient#E

@end example

Also, this can be used with a conversion factor. For example, for a very long distance that we want in kilometers:

@example

distance#E @@ km

@end example

All the conversion factors are available in a contextual menu. After select the row of data where want add the factor, a right mouse click open a context menu with all available factors.

@sp 1

@center @image{MenuContextual, 7cm}

FisicaLab allows mathematical operations directly on the fields where you enter data. Can be carried out operations of addition (@kbd{+}), subtraction (@kbd{-}), multiplication (@kbd{*}) and division (@kbd{/}). Although not allowed to group operations by parentheses. It also provides some useful functions for certain calculations. These are listed below with its description:

@multitable @columnfractions .3 .6

@item cos(ang)
@tab Calculates the cosine of the sexagesimal angle "ang".

@item sin(ang)
@tab Calculates the sine of the sexagesimal angle "ang".

@item tan(ang)
@tab Calculates the tangent of the sexagesimal angle "ang".

@item sqrt(x)
@tab Calculates the square root of the number "x".

@item hypot(a,b)
@tab Calculates the hypotenuse of a right triangle whose legs are "a" and "b".

@item leg(c,a)
@tab Calculates the leg of the right triangle whose hypotenuse is "c" and the other leg is "a".

@item rd(m1,m2,d)
@tab Calculates the distance of the mass "m1" to the center of mass of the system consisting of the masses "m1" and "m2", which are spaced a distance "d".

@end multitable

The numbers that are passed as parameters to these functions must have consistent units. For example, in the @samp{hypot()} function both legs must be in the same units, whether centimeters, meters, inches, etc. These functions can be used in operations of addition, subtraction, multiplication and division. In these operations blank spaces are not allowed. Here are some examples:

@example

8*cos(34)
hypot(4,3)-2
rd(3,6,40)*sin(30) @@ cm
15*8/hypot(13,8)

@end example

Once entered the operation, FisicaLab will do the calculation and will write the result in the entry. Note that is possible to apply conversion factors. Although these can also be applied after carrying out the calculation.

The fields where you enter angles do not allow the operations and functions described above. This is because these fields have their own operations and functions. For example, FisicaLab allows write the angles as slopes (a/b), and automatically convert this to sexagesimal angles. What is very useful for problems of trusses.

@center @image{angulos, 7cm}

For these fields are available two functions that calculates an angle from other relationships. These functions are:

@multitable @columnfractions .3 .6

@item acos(a/c)
@tab Calculates the sexagesimal angle whose cosine is the ratio "a/c".

@item asin(b/c)
@tab Calculates the sexagesimal angle whose sine is the ratio "b/c".

@end multitable

If an operation is entered incorrectly, for example if it contains spaces or contains a function with an incorrect number of parameters, FisicaLab will do nothing and will take that string as an unknown.

@strong{Caution:} @emph{If, for example, you add a mass conversion factor in a time data, this will cause an error in the solution. And you will not get a message about this error.}

@node How it works, Messages, Element data, Welcome
@section How it works

@cindex How it works

FisicaLab work over the base of @emph{number of equations = number of unknown data}. In general you don't need worry about this. But in some cases you will see the error @strong{"The system is undetermined"}. This occurs when you write numeric data in a field that must be an unknown data. The examples show this cases.

@node Messages,  , How it works, Welcome
@section Messages

@cindex Messages

FisicaLab write a wide variety of messages in the text view when a problem is wrong. However, you always will see a message about the calculation's status, as you can see in the following image:

@sp 1

@center @image{ejemplo5, 12cm}

The last line say @strong{"State = success"}, meaning that the calculation was successful. Any other status different as @emph{success}, mean that or the set problem don't have a solution, or an unexpected error occurred.
