Guidelines for Coding

All the guidelines should be followed without fail for timely acceptance of code and award of the internship. Failure to do so might result in rejection of your work.

  1. Strictly use OpenModelica 1.9.6 and higher versions for coding.
  2. The codes should follow the naming convention as given below, the codes will not be approved if the naming convention is not followed as instructed. For example, 3rd solved problem from chapter 1 (Example 1.3) should be represented by code named as
  3. Use package, model, function, record Specialisations for each problem, as per need.
  4. If problems have subparts, then code it as a package containing its subparts as models.
  5. The dependencies on other codes/functions (if any) should be mentioned as a comment clearly before starting the code.
  6. If the textbook contains significant errors(More than 2 % deviation in calculations/results), mention the same as a comment at the end such as
  • "The  answer may slightly vary due to  rounding off values"   
  • "The  answer provided in the textbook is wrong
  1. Do not reproduce exact problem statements or text from the textbooks, in your code.
  2. Specify units (if any) and description of variables, parameters and constants during declaration.
  3. Appropriate comments should be put up, wherever needed, which will make the code easily understandable. The comments should help in highlighting the flow of logic being used. For example, an equation like R = V/I can have comment as "Ohm's Law" along with it.
  4. The symbols used in the code should be same as those being used in the textbook.
  5. If any changes are made or any further information is added to the Simulation Setup window to run any particular code, please comment the same at the beginning of the code.
  6. Once you have completed coding, mail us at  contact-om(at)fossee(dot)in with complete details including your name and allotted book.