Difference between revisions of "ASCEND/C2/Writing-basic-model/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with ''''Tutorial 3: Developing a Basic model in ASCEND''' {| style="border-spacing:0;" | style="border:0.75pt solid #000001;padding:0.0104in;"| <center>'''Visual Cue'''</center> | s…')
 
 
(2 intermediate revisions by 2 users not shown)
Line 20: Line 20:
 
We will learn how to
 
We will learn how to
  
* Build a basic model
+
* Build a basic '''model'''
* Add methods to the basic model and
+
* Add '''methods''' to the basic '''model''' and
 
* Write dimensionally consistent equations
 
* Write dimensionally consistent equations
  
Line 32: Line 32:
 
| style="border:0.75pt solid #000001;padding:0.0104in;"| Here I am using
 
| style="border:0.75pt solid #000001;padding:0.0104in;"| Here I am using
  
* Ubuntu Linux OS v. 12.04
+
* '''Ubuntu Linux''' OS v. 12.04
* ASCEND v. 0.9.8
+
* '''ASCEND '''v. 0.9.8
  
  
Line 41: Line 41:
  
 
Pre-requisites
 
Pre-requisites
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| To know more about ASCEND
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| To know more about '''ASCEND'''
  
please visit ascend4.org
+
Please visit '''ascend4.org'''
  
 
For relevant tutorials please visit our website
 
For relevant tutorials please visit our website
  
http://spoken-tutorial.org
+
'''http://spoken-tutorial.org'''
  
 
|-
 
|-
Line 53: Line 53:
  
 
Example
 
Example
| style="border:0.75pt solid #000001;padding:0.0104in;"| Let us begin the tutorial with a simple example. In this example let us solve 3 simultaneous equations with 3 unknowns
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| Let us begin the tutorial with a simple example.  
  
we will use a text editor like gedit to write our model
+
In this example, let us solve 3 simultaneous equations with 3 unknowns.
  
I already have the code for the example in a text file
+
We will use a text editor like '''gedit''' to write our '''model'''
  
let me explain the code
+
|-
 +
| style="border:0.75pt solid #000001;padding:0.0104in;"|
 +
| style="border:0.75pt solid #000001;padding:0.0104in;"| I already have the '''code''' for the example in a text file
 +
 
 +
Let me explain the '''code'''
  
 
|-
 
|-
| style="border:0.75pt solid #000001;padding:0.0104in;"| Open mymodel.a4c in gedit
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| Open '''mymodel.a4c '''in gedit
| style="border:0.75pt solid #000001;padding:0.0104in;"| Open the file mymodel.a4c in a text editor
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| Open the file''' mymodel.a4c '''in a text editor
  
 
|-
 
|-
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight the “system.a4l” line
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight the “'''system.a4l'''” line
| style="border:0.75pt solid #000001;padding:0.0104in;"| Initially we mention the library (that is a collection of pre-defined models that we need in our model).
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| Initially we mention the '''library''' (that is a collection of pre-defined '''models''' that we need in our model).
  
Here we require the basic sysyem.a4l library
 
  
.a4l extension denotes the ascend4 library
+
Here we require the basic '''system.a4l''' '''library'''
 
+
the name of the library is written in double quotes
+
  
 +
|-
 +
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight the “'''system.a4l'''” line
 +
| style="border:0.75pt solid #000001;padding:0.0104in;"| '''.a4l '''extension denotes the '''ascend4 library'''
  
  
 +
The name of the '''library''' is written in '''double quotes'''.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the semi colon
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the semi colon
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| note that semi colon is a statement terminator in ascend
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that '''semi colon''' is a '''statement terminator''' in '''ASCEND'''.
  
Ascend considers all the statements as one sentence if semi colon is not put after each statement
+
'''ASCEND''' considers  
 +
*all the statements as one sentence  
 +
*if '''semi colon''' is not put after each '''statement'''.
  
 
|-
 
|-
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight MODEL my_model
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight '''MODEL my_model'''
| style="border:0.75pt solid #000001;padding:0.0104in;"| MODEL my_model begins a model with name my_model
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| '''MODEL my_model''' begins a '''model''' with name '''my_model'''
  
you can give any name to the model
+
You can give any name to the '''model'''
  
 
|-
 
|-
 
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight (*variables declaration*)
 
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight (*variables declaration*)
| style="border:0.75pt solid #000001;padding:0.0104in;"| In Ascend comments are written in parenthesis enclosed with in a pair of asterik mark
+
| style="border:0.75pt solid #000001;padding:0.0104in;"| In '''ASCEND''' '''comments''' are written in '''parenthesis''' enclosed with in a pair of '''asterik mark'''.
  
comments are not executed
 
  
they make the model easier to understand
+
'''Comments''' are not executed.
  
we will now define variables for our model
 
  
|-
+
They make the '''model '''easier to understand.
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight solver_var
+
  
  
 +
We will now define the '''variables''' for our '''model'''.
  
| style="border:0.75pt solid #000001;padding:0.0104in;"| Any variable whose value is expected to be computed by Ascend must be of type solver_var
+
|-
 +
| style="border:0.75pt solid #000001;padding:0.0104in;"| Highlight '''solver_var'''
 +
 
 +
| style="border:0.75pt solid #000001;padding:0.0104in;"| Any '''variable''' whose value is expected to be computed by '''ASCEND''', must be of type '''solver underscore var'''
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight all the defined variables
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight all the defined variables
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Thus we define variable x,y,z,d and a as a solver_var
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Thus we define variable '''x,y,z,d''' and '''a''' as a '''solver_var'''
  
the definition of the type solver_var is predefined in the system.a4l library
+
The definition of the type '''solver_var '''is predefined in the '''system.a4l library'''
  
IS_A is an operator in Ascend which is used to define variable types
+
'''IS underscore A''' is an operator in '''ASCEND''' which is used to define '''variable types'''.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight all the equation sequentially
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight all the equation sequentially
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Equations to be solved are
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| The equations to be solved are
  
x+y+z = a*d
+
'''x+y+z = a*d'''
  
x+y+2*z = 5 and
+
'''x+y+2*z = 5 and'''
 
+
5*x+2*y-3*z = 0
+
 
+
Note that we have not mentioned how to solve this given set of equations
+
 
+
we have also not mentioned which variables are to be specified and which are to be calculated
+
  
 +
'''5*x+2*y-3*z = 0'''
  
 +
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight continues
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that we have not mentioned how to solve this given set of equations.
  
 +
We have also not mentioned which '''variables''' are to be specified and which are to be calculated.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight END my_model
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight '''END my_model'''
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now end this model with END my_model
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now end this '''model '''with '''END my_model'''
 
+
 
+
 
+
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Show the loaded model on Ascend interface
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Show the loaded model on '''ASCEND''' interface
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open this model in Ascend
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open this '''model''' in '''ASCEND'''.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the successful execution line in the message panel
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the successful execution line in the message panel
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that Ascend has executed the on_load method by default
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that '''ASCEND''' has executed the '''on_load method''' by default.
  
this can be seen from the message in the panel below
+
 
 +
This can be seen from the message in the panel below.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the values of the variables on Ascend interface
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the values of the variables on '''ASCEND''' interface
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Observe that Ascend has given the default value of 0.5 to each of the variable
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Observe that '''ASCEND''' has given default values of''' 0.5''' to each of the '''variables'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Click the solve button
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Click the '''solve''' button
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now click on the solve icon
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now click on the '''Solve''' icon.
  
Ascend displays the results
+
'''ASCEND '''displays the result.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the converged message in the panel below
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the converged message in the panel below
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| This can be confirmed in the panel below
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| This can be confirmed in the panel below.
 +
 
  
A converged message is displayed after the successful completion of the calculation
+
A converged message is displayed after the successful completion of the calculations.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the values of the variables y and d
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the values of the variables '''y and d'''
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that Ascend squared the system automatically
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that '''ASCEND'''
 
+
* squared the system automatically
keeping the values of two variables y and d as default value and calculated the value for rest of the variables
+
* by keping the values of two '''variables y''' and '''d''' as default values
 +
* and calculated the values for rest of the '''variables'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Right click on d and assign it a value 1
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Right click on '''d''' and assign it a value 1.
  
Fix d by selecting the fixed option
+
Fix '''d '''by selecting the fixed option.
  
Repeat the same for x
+
Repeat the same for '''x'''.
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now suppose we want to make x and d as our fixed variable by assigning values to them and solve for a, y and z
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now suppose we want to  
 +
*make '''x '''and '''d '''as our fixed '''variables''''''Bold text''' by assigning values to them and solve for '''a, y '''and''' z'''.
  
then, right click on d and select properties from the drop down menu
+
Then, right-click on '''d''' and select '''Properties''' from the drop down menu.
  
Under values, assign a value to d
+
Under '''Values''', assign a value to '''d'''
  
here I am giving the value 1
+
Here I am giving the value 1.
  
now in solving section, select fixed
+
Now in '''Solving''' section, select '''Fixed'''.
  
click on Apply and OK
+
Click on '''Apply''' and '''OK'''.
  
now similarly repeat the same procedure for fixing the value of x
+
Now similarly repeat the same procedure for fixing the value of '''x'''
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding results
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding results
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| observe that ascend has solve the model and you will have a new set of results
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Observe that '''ASCEND''' has solved the '''model '''and you will have a new set of results.
 +
 
 +
 
 +
Note that the '''fixed variables''' are shown in green color and '''free variables''', calculated by '''ASCEND''' are shown in blue color.
 +
 
 +
 
 +
Also note that the final results has been displayed with a '''tick mark''' and the '''fixed variables''' have been denoted by a '''closed lock icon'''.
 +
 
  
note that the fixed variables are shown in green color and free variables, calculated by Ascend are shown in blue color
+
We can also specify the '''fixed''' and '''free variables''' in the '''code''' and assign values to the '''variables'''.
  
Also note that the final result has been displayed with a tick mark and the fixed variables have been denoted by a closed lock icon
 
  
we can also specify the fixed and free variables in the code and assigning value to the variables
+
In '''ASCEND''' the solution procedure is separate from the problem statement.
  
In Ascend the solution procedure is separate from the problem statement
 
  
Methods contain procedures to solve the model
+
'''Methods '''contain procedures to solve the '''model'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open my_model in gedit
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open '''my_model''' in '''gedit'''
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| We will now explain different methods to solve our model
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| We will now explain different methods to solve our '''model'''.
  
open the file my_model.a4c in a text editor
 
  
We write the methods after equations
+
Open the file '''my_model.a4c''' in a text editor.
 +
 
 +
 
 +
We write the '''methods''' after '''equations'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Delete END my_model and remove asterik from METHODS and end of the code
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Delete '''END my_model''' and remove asterik from '''METHODS''' and end of the code
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now remove the line END my_model
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now remove the line '''END my_model'''.
  
Delete the parenthesis and asterik mark in front of methods and at the end of the code
 
  
 +
Delete the '''parenthesis''' and '''asterik mark''' in front of '''METHODS''' and at the end of the '''code'''.
  
 +
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding lines in the code sequentially
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Under '''METHOD specify''', we fixed '''variables a''' and '''d'''.
 +
 +
 +
We also assign values to the '''variables''' as '''a = 1''' and '''d = 3'''.
  
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlighte the corrsponding lines in the code sequentially
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"|  
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Under method specify, we fixed variable a and d
+
  
we also assign values to the variables as a = 1 and d=3,note that to assign the values to a particular variable, we use a : and = sign together
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that to assign the values to a particular '''variable''', we use a '''colon''' and '''<nowiki>=</nowiki>''' sign together.
  
I will refer := to sign as is equal to from here on
 
  
Under method on_load we run the method specify
+
I will refer''' := (colon and equal to)''' sign as '''is equal to '''from here on.
 +
 
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding lines in the code sequentially
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Under '''METHOD on_load''', we run the '''METHOD specify'''.
  
This is the method that describes Ascend the action to be taken when a model is loaded
+
This is the '''method''' that describes '''ASCEND '''the action to be taken when a '''model''' is loaded.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Click on the save button
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Click on the '''save''' button
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now end the method on_load and my_model and save this file
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now end the '''METHOD on_load''' and '''my_model''' and save this file.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Show the ascend interface
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Show the ascend interface
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open this with Ascend
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open this with '''ASCEND'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Select the on_load method and run the code
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Select the '''on_load method '''and run the code
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now under methods select on_load
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now under '''Methods '''select '''on_load'''
  
click on run
+
Click on '''Run'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Click on the solve button and highlight the asnwers
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Click on the '''solve''' button and highlight the asnwers
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| click on solve icon
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| And then click on '''Solve''' icon.
  
observe that Ascend has fixed the variable a and d and calculated the values for x,y and z
+
 
 +
Observe that '''ASCEND''' has fixed the '''variables a''' and''' d''' and calculated the values for '''x, y '''and '''z'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the code file again in gedit
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the code file again in '''gedit'''
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open the code for my_model.a4c again
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open the '''code''' for '''my_model.a4c''' again.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Carry out the required editing in the code file
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Carry out the required editing in the code file
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now remove the values assigned under specify
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now remove the values assigned under '''specify'''.
  
Now we will add a new method called values
+
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Type as per narration
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"|Now we will add a new '''METHOD''' called '''values'''.
  
type method values and then type a = 1, d= 2 and end values
 
  
now under on_load type run values after run specify
+
Type '''METHOD values''' and then type '''a = 1, d= 2 '''and '''END values'''
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Type as per narration
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"|Now under '''on_load''' type '''RUN values''' after '''RUN specify'''.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the file with ascend
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the file with ascend
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now save the file and open it with Ascend
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now save the file and open it with '''ASCEND'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Run the code using on_laod method and press solve
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Run the code using '''on_load method''' and press '''solve'''
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Again run the method on_load and click on solve
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Again run the '''Method on_load''' and click on '''Solve'''.
 +
 
  
you will see ascend has fixed variable a and d and assigned the values as mentioned under values section in the code
+
You will see  
 +
*'''ASCEND''' has fixed '''variables a '''and '''d'''
 +
*and assigned the values  
 +
*as mentioned under '''Values''' section in the '''code'''.
  
 
|-
 
|-
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the required code file in gedit
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the required code file in '''gedit'''
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| now let’s look at an interesting feature of dimensional consistency in Ascend with the help of another model
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now let’s look at an interesting feature of '''dimensional consistency''' in '''ASCEND '''with the help of another '''model'''.
  
here we will compute the mass of a cylinder
 
  
I already have the code for this model
+
Here we will compute the '''mass''' of a '''cylinder'''.
  
let me explain the code
 
  
open cylinder.a4c with a text editor
+
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Type as per narration
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"|I already have the '''code''' for this '''model'''.
 +
 
 +
Let me explain the '''code'''.
 +
 
 +
Open''' cylinder.a4c''' with a text editor.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding line in a sequential order
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding line in a sequential order
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| note that here we require atoms.a4l library as compared to systems library used earlier in the last model
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that, *here we require '''atoms.a4l''' library  
 +
*as compared to '''systems library, '''used earlier in the last '''model'''
  
atoms is a refined version of systems library
 
  
and contains the definition of various variable types
+
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight continues
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"|
 +
*'''atoms '''is a refined version of '''systems library'''.
 +
*and contains the definition of various variable types  
 +
*that represent different physical units
  
that represent different physical units
 
  
For example we write v is a volume
+
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding line in a sequential order
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| For example, we write  
 +
*'''v is a volume'''
 +
*'''m is a mass''' etc.
  
m is a mass etc.
+
'''Volume, mass''' etc. are different''' variable types''' defined in '''atoms.a4l'''
  
volume, mass etc. are different variable types defined in atoms.a4l
+
This helps in ensuring that the equations written in '''ASCEND models''' are '''dimensionally consistent'''.
  
This helps in ensuring that the equations written in Ascend model are dimensionally consistent
+
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Scroll down the code
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| After this we write '''equations''' and '''methods''' as explained earlier.
  
After this we write equations and methods as explained earlier
 
  
Note that while specifying values for these variable types, we need to mention the corresponding physical units in curly brackets
+
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the corresponding line in a sequential order
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Note that, while specifying values for these '''variable types''', we need to mention the corresponding physical units in '''curly brackets'''..
  
Here we write V = 100 cm^3 and p = 100kg/m^3
 
  
note that V is in CGS units while p is in SI units
+
Here we write '''V = 100 cm cube '''and '''p = 100 kg per metre cube'''.
  
The user doesn't have to worry about the units as Ascend itself performs the unit conversion
 
  
|-
+
Note that '''v''' is in '''CGS units''' while '''p''' is in '''SI units'''.
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the file in Ascend and run and solve it using the on_load method
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open this file in Ascend
+
  
Now once again run the on_load method
 
  
and solve the problem
+
The user doesn't have to worry about the '''units''' as '''ASCEND''' itself performs the '''unit conversion'''.
 +
 
 +
|-
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Open the file in ASCEND and run and solve it using the on_load method
 +
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now open this file in '''ASCEND'''.
 +
 
 +
Now once again run the '''on_load Method'''  and solve the problem.
  
 
|-
 
|-
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the answers
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Highlight the answers
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| observe that ascend has converted the values of volume into SI units and then calculated the mass in SI units
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Observe that '''ASCEND''' has converted the values of '''volume''' into '''SI units''' and then calculated the '''mass''' in '''SI units'''
  
Note that Ascend by default uses SI units until specified otherwise
+
 
 +
Note that '''ASCEND''', by default, uses '''SI units''' until specified otherwise.
  
 
|-
 
|-
Line 336: Line 387:
  
 
Summary
 
Summary
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now let us summarize,in this tutorial,
+
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Now let us summarize.
  
We have learned how to
+
In this tutorial,
 
+
* Build a basic model
+
* Add methods to the basic model and
+
* Write dimensionally consistent equations
+
  
 +
We have learnt how to
  
 +
* Build a basic '''model'''
 +
* Add '''methods''' to the basic '''model''' and
 +
* Write '''dimensionally consistent equations'''
  
 
|-
 
|-
Line 352: Line 403:
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Do the following assignment
 
| style="border-top:none;border-bottom:0.75pt solid #000001;border-left:0.75pt solid #000001;border-right:0.75pt solid #000001;padding:0.0104in;"| Do the following assignment
  
Edit the model cylinder in a text editor and make it dimensionally inconsistent
+
#Edit the '''model cylinder '''in a text editor and make it '''dimensionally inconsistent'''
 
+
#For example, write '''m is a distance''' instead of '''mass'''
For example, write m is a distance instead of mass
+
#Now run this '''dimensionally inconsistent model''' in '''ASCEND '''and observe the output
 
+
#Add more '''variables''' and '''equations''' to the '''model cylinder.a4c''' and solve it in '''ASCEND'''
Now run this dimensionally inconsistent model in Ascend and observe the output
+
 
+
Add more variables and equations to the model cylinder.a4c and solve it in Ascend
+
  
 
|-
 
|-

Latest revision as of 20:39, 6 July 2014

Tutorial 3: Developing a Basic model in ASCEND


Visual Cue
Narration
Open Slide number 1

Title slide

Welcome to the spoken tutorial on Developing a Basic Model in ASCEND
Open Slide 2

Learning Objectives

In this tutorial,

We will learn how to

  • Build a basic model
  • Add methods to the basic model and
  • Write dimensionally consistent equations


Open Slide number 3

System Requirement

Here I am using
  • Ubuntu Linux OS v. 12.04
  • ASCEND v. 0.9.8


Open Slide number 4

Pre-requisites

To know more about ASCEND

Please visit ascend4.org

For relevant tutorials please visit our website

http://spoken-tutorial.org

Open Slide number 5

Example

Let us begin the tutorial with a simple example.

In this example, let us solve 3 simultaneous equations with 3 unknowns.

We will use a text editor like gedit to write our model

I already have the code for the example in a text file

Let me explain the code

Open mymodel.a4c in gedit Open the file mymodel.a4c in a text editor
Highlight the “system.a4l” line Initially we mention the library (that is a collection of pre-defined models that we need in our model).


Here we require the basic system.a4l library

Highlight the “system.a4l” line .a4l extension denotes the ascend4 library


The name of the library is written in double quotes.

Highlight the semi colon Note that semi colon is a statement terminator in ASCEND.

ASCEND considers

  • all the statements as one sentence
  • if semi colon is not put after each statement.
Highlight MODEL my_model MODEL my_model begins a model with name my_model

You can give any name to the model

Highlight (*variables declaration*) In ASCEND comments are written in parenthesis enclosed with in a pair of asterik mark.


Comments are not executed.


They make the model easier to understand.


We will now define the variables for our model.

Highlight solver_var Any variable whose value is expected to be computed by ASCEND, must be of type solver underscore var
Highlight all the defined variables Thus we define variable x,y,z,d and a as a solver_var

The definition of the type solver_var is predefined in the system.a4l library

IS underscore A is an operator in ASCEND which is used to define variable types.

Highlight all the equation sequentially The equations to be solved are

x+y+z = a*d

x+y+2*z = 5 and

5*x+2*y-3*z = 0

Highlight continues Note that we have not mentioned how to solve this given set of equations.

We have also not mentioned which variables are to be specified and which are to be calculated.

Highlight END my_model Now end this model with END my_model
Show the loaded model on ASCEND interface Now open this model in ASCEND.
Highlight the successful execution line in the message panel Note that ASCEND has executed the on_load method by default.


This can be seen from the message in the panel below.

Highlight the values of the variables on ASCEND interface Observe that ASCEND has given default values of 0.5 to each of the variables.
Click the solve button Now click on the Solve icon.

ASCEND displays the result.

Highlight the converged message in the panel below This can be confirmed in the panel below.


A converged message is displayed after the successful completion of the calculations.

Highlight the values of the variables y and d Note that ASCEND
  • squared the system automatically
  • by keping the values of two variables y and d as default values
  • and calculated the values for rest of the variables.
Right click on d and assign it a value 1.

Fix d by selecting the fixed option.

Repeat the same for x.

Now suppose we want to
  • make x and d as our fixed variables'Bold text by assigning values to them and solve for a, y and z'.

Then, right-click on d and select Properties from the drop down menu.

Under Values, assign a value to d

Here I am giving the value 1.

Now in Solving section, select Fixed.

Click on Apply and OK.

Now similarly repeat the same procedure for fixing the value of x

Highlight the corresponding results Observe that ASCEND has solved the model and you will have a new set of results.


Note that the fixed variables are shown in green color and free variables, calculated by ASCEND are shown in blue color.


Also note that the final results has been displayed with a tick mark and the fixed variables have been denoted by a closed lock icon.


We can also specify the fixed and free variables in the code and assign values to the variables.


In ASCEND the solution procedure is separate from the problem statement.


Methods contain procedures to solve the model.

Open my_model in gedit We will now explain different methods to solve our model.


Open the file my_model.a4c in a text editor.


We write the methods after equations.

Delete END my_model and remove asterik from METHODS and end of the code Now remove the line END my_model.


Delete the parenthesis and asterik mark in front of METHODS and at the end of the code.

Highlight the corresponding lines in the code sequentially Under METHOD specify, we fixed variables a and d.


We also assign values to the variables as a = 1 and d = 3.


Note that to assign the values to a particular variable, we use a colon and = sign together.


I will refer := (colon and equal to) sign as is equal to from here on.


Highlight the corresponding lines in the code sequentially Under METHOD on_load, we run the METHOD specify.

This is the method that describes ASCEND the action to be taken when a model is loaded.

Click on the save button Now end the METHOD on_load and my_model and save this file.
Show the ascend interface Now open this with ASCEND.
Select the on_load method and run the code Now under Methods select on_load

Click on Run.

Click on the solve button and highlight the asnwers And then click on Solve icon.


Observe that ASCEND has fixed the variables a and d and calculated the values for x, y and z.

Open the code file again in gedit Now open the code for my_model.a4c again.
Carry out the required editing in the code file Now remove the values assigned under specify.
Type as per narration Now we will add a new METHOD called values.


Type METHOD values and then type a = 1, d= 2 and END values

Type as per narration Now under on_load type RUN values after RUN specify.
Open the file with ascend Now save the file and open it with ASCEND.
Run the code using on_load method and press solve Again run the Method on_load and click on Solve.


You will see

  • ASCEND has fixed variables a and d
  • and assigned the values
  • as mentioned under Values section in the code.
Open the required code file in gedit Now let’s look at an interesting feature of dimensional consistency in ASCEND with the help of another model.


Here we will compute the mass of a cylinder.


Type as per narration I already have the code for this model.

Let me explain the code.

Open cylinder.a4c with a text editor.

Highlight the corresponding line in a sequential order Note that, *here we require atoms.a4l library
  • as compared to systems library, used earlier in the last model


Highlight continues
  • atoms is a refined version of systems library.
  • and contains the definition of various variable types
  • that represent different physical units


Highlight the corresponding line in a sequential order For example, we write
  • v is a volume
  • m is a mass etc.

Volume, mass etc. are different variable types defined in atoms.a4l

This helps in ensuring that the equations written in ASCEND models are dimensionally consistent.

Scroll down the code After this we write equations and methods as explained earlier.


Highlight the corresponding line in a sequential order Note that, while specifying values for these variable types, we need to mention the corresponding physical units in curly brackets..


Here we write V = 100 cm cube and p = 100 kg per metre cube.


Note that v is in CGS units while p is in SI units.


The user doesn't have to worry about the units as ASCEND itself performs the unit conversion.

Open the file in ASCEND and run and solve it using the on_load method Now open this file in ASCEND.

Now once again run the on_load Method and solve the problem.

Highlight the answers Observe that ASCEND has converted the values of volume into SI units and then calculated the mass in SI units


Note that ASCEND, by default, uses SI units until specified otherwise.

Open Slide number 5:

Summary

Now let us summarize.

In this tutorial,

We have learnt how to

  • Build a basic model
  • Add methods to the basic model and
  • Write dimensionally consistent equations
Open Slide number 6:

Assignment

Do the following assignment
  1. Edit the model cylinder in a text editor and make it dimensionally inconsistent
  2. For example, write m is a distance instead of mass
  3. Now run this dimensionally inconsistent model in ASCEND and observe the output
  4. Add more variables and equations to the model cylinder.a4c and solve it in ASCEND
Open Slide number 7

About the Spoken Tutorial Project

Information on the spoken tutorial project is available on our website

spoken-tutorial.org

Open Slide number 8

Spoken Tutorial Workshops

Details on Workshops based on spoken tutorials is also available on the website
Open Slide number 9

Acknowledgements

Spoken tutorial project is funded by NMEICT,MHRD



Open Slide number 10

Thank You

This is Priya Bagde from IIT Bombay signing off

Thank You for joining

Contributors and Content Editors

Nancyvarkey, Tarung