Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » Lala
  • » Profile

Posts

Posts

May-12-14 14:30:24
Category: Programming

I already found a solution how to solve this task. But maybe some new users will have the same problem, so that’s why I will try to explain that in this section.
In the very beginning of the class formulation, just define the parametres that You are going to use in the class. Definition will look something like this (this is for inspiration only):

Code:

final parameter Integer m = 3 "Some number";

parameter Modelica.SIunits.Inertia Jr = 0.29 "Inertia";
parameter Integer p(min = 1) = 2 "Number of pole pairs";
parameter Modelica.SIunits.Frequency fsNominal = 50 "Frequency";
parameter Modelica.SIunits.Inductance Lm = 0.00922531 "Inductance" annotation(Dialog(tab = "New tab"));

I think that You are going to understand this code when You use it. Variables are defined trough path Modelica/SIunits. Section “annotation(Dialog(tab = "New tab"));” defines the new tab (not “General” tab) for the model.
I hope so that this will help to someone.
Cheers,
Lala : )

May-12-14 11:16:19
Category: Programming

P.S. Name of the class is aimc_class.mo

May-12-14 11:15:34
Category: Programming

I think that the solution is to make a new record for model.
I made a record, but the problem is that my class doesn’t recognize the parameters from the record. For example when I put this code into the record file, my model wouldn’t find it:

Code:

record AIMC_record

parameter Modelica.SIunits.Inertia Jr = 0.29 "Rotor's moment of inertia";
annotation…
end AIMC_record;

Anyone who worked with this? Any tips?
Thanks a lot,
Lala : )

May-11-14 11:09:11
Category: Programming

Hello OME users,
When I use sub-model (class.mo) in another model (for example class can be DC motor and second model contain power supply and this class of DC motor) can I make a list of variables for this class in primary model? It means, when I double-click on the DC motor class to open list with parameters. I’m wondering if is possible in OME? Now I have to expand class (“show class”) and to type the values of every component.
Thanks for Your help.
Cheers,
Lala : )

Apr-23-14 08:54:09
Mathematical description of models in OME
Category: Programming

Hello OME users,
Does anyone worked with the blocks of electrical machines (AIMC and PMSM) in OME?
We all know that exist a few ways how to mathematically describe induction machines, motors. Most common ways is T-model and Gamma-model. Does anyone know which system of mathematical equations is used in OME for induction machines, AIMC and PMSM? Is it T, Gamma or another model description?
Thanks a lot. I appreciate it.
Cheers,
Lala : )

Apr-17-14 10:56:11
I already wrote abouth this problem in section: PROGRAMMING

Hi guys,
I have a question. In the library Modelica, Electrical, MultiPhase, Interface is NO block called RealInput (path for RealInput is Modelica, Blocks, Interface). How I can build Input parameter for Three-Phase system?
I tried with the RealInput, but this Real Number is not proper in the multi-phase system.
Thanks,
Lala

Apr-15-14 20:32:04
Category: Programming

If You mean RealVectorInput from path: Modelica, Block, Interfaces, it didn't work. I can't connect that to the TerminalBox. All I need is an input block before TerminalBox for the asynchronous and synchronous motors.

Apr-15-14 13:37:18
Category: Programming

Hi guys,
I have a question. In the library Modelica, Electrical, MultiPhase, Interface is NO block called RealInput (path for RealInput is Modelica, Blocks, Interface). How I can build Input parameter for Three-Phase system?
I tried with the RealInput, but this Real Number is not proper in the multi-phase system.
Thanks,
Lala

Apr-07-14 17:51:30
Ability to compile 64 bit executables and FMUs
Category: Developer

I have the same question. That update is going to be available soon (as Nightly Build) for Windows?
I need so much to export my models as 64-bit FMU-s.
Thanks!

Apr-04-14 18:19:17
Category: Developer

Hello all,
I'm wondering if there is any chance in OpenModelica to change compiler?
I need to export the 64 bit FMU (.dll). Now, OpenModelica exports only the 32 bit version of the FMU.
Or, there is another possibility. If someone has Dymola, You can export my model as 64 bit FMU. I really need this and I will be grateful if someone will help me with this.
If You are interested to help, I will send You my model from OpenModlica.
Thanks for help.
Cheers,
Lala

Apr-01-14 10:40:03
Category: Programming

Or, there is another possibility. If someone has Dymola, You can export my model as 64 bit FMU. I really need this and I will be grateful if someone will help me with this.
If You are interested to help, I will send You my model from OpenModlica.
Cheers,
Lala

Or, there is another possibility. If someone has Dymola, You can export my model as 64 bit FMU. I really need this and I will be grateful if someone will help me with this.
If You are interested to help, I will send You my model from OpenModlica.
Cheers,
Lala

Apr-01-14 09:46:49
Category: Programming

Hello all,
I'm wondering if there is any chance in OpenModelica to change compiler?
I need to export 64 bit FMU (.dll).
Thanks for help,
Lala

Hello all,
I'm wondering if there is any chance in OpenModelica to change compiler?
I need to export 64 bit FMU (.dll).
Thanks for help,
Lala

Mar-13-14 14:16:45
Category: Programming

Adeel, thanks again. current/smile You already helped me a few times.
For making the documentation, I found, at the end, under the Modelica Text View code:

Code:


annotation(...
Documentation(info = "<HTML>
<p>
Model of a...
</p>
<p>
Hello World.
</p>
</HTML>"));

Making the documentation in OME is really nicely done, because it is HTML. current/smile
When I finish everything for my project, I'm going to send You models (for You to add icon-s, bitmap). Before that i have to finish a few things.

Cheers,
Lala

P.S. How to send You my files?

Mar-12-14 18:30:20
Category: Programming

P.S. Any tips, hyperlinks or documents for "How to write Documentation"?
Thanks again,
Lala current/smile

Mar-12-14 17:50:13
Category: Programming

Adeel, thanks a lot for replaying.
I think that there is a problem with putting image (Bitmap) into icon layer. Bitmap is not showing in Libraries Browser. I know that if I draw something or write something, it is going to work, but Bitmap not. 
Anyway, it is not that big problem.
Cheers,
Lala

Hello everyone,
I have problems while exporting models in OME to XML.
In Message Browser I get this msgs:
1)    [:0:0-0:0] Error: Internal error SimCode: The model aimc_all could not be translated to XML
2)    [CodegenXML.tpl:2147:14-2147:14] Error: Template error: Unknown expression: array(3.141592653589793 * /*Real*/(2 * (-1 + k)) / /*Real*/(m) for k in 1:m)
Is there anyone that can help me to fix this? Thanks for Your help.
Cheers,
Lala

Mar-12-14 12:20:13
Category: Programming

Hello everyone,
Me again. current/smile
I need some help with adding icons into OME. I find out the way how to add the icon, but it is not showing in “Libraries Browser”. It’s just shown as a picture when I use that submodel into another model.
I think that for Libraries Browser is another way (another picture format and size) that is used for showing icons.
Another thing that I don’t know how to put into my model is “Documentation”.
If someone can help me to solve this things, I will be very grateful.
Thanks,
Lala

Mar-06-14 14:16:33
Category: Programming

Hello everyone,
Currently I’m working on FMU models exporting (and classes) in OpenModelica.
I made a class in OpenModelica, for the one AIMC. The idea was to create a submodel of motor and to add this submodel (class) to the model with sinVoltage power unit.
OM can export the FMU of the model with the  submodel, but there are problems with exporting just that submodel (class of AIMC that I made). What I think is that OM, first of all, can export only classes and models that can be simulated (models with power unit, ground etc.), but can’t export the class that can’t be simulated.
Does anyone have some ideas how to solve this problem and how to export only class (model without power unit etc.). If You are interested in this problem, I will send You class and model that I made and on which currently I work on.
Thanks for help and tips.
Cheers,
Goran

Feb-23-14 19:06:22
Topic: FMU
OpenModelica co-simulation Simulink
Category: Programming

Hello all,
Currently I’m working on co-simulation (OpenModelica and Matlab/Simulink). I know that in OpenModelica exists FMI to generate and export FMU. Now, after exporting the FMU, my question is how to work with this FMU in Matlab/Simulink? FMI generates some C-code and now I don’t know how to use this code for FMU simulation.
Also, I already tried to export FMU from OpenModelica and then that model (FMU) to import back to OpenModelica. I imported successfully the .fmu file, but simulation didn’t work.
Thanks for Your opinion and help,
Lala

Feb-22-14 21:20:59
Category: Programming

Dymola already has that function. I hoped so that OM can do the same but OM is an open-source and of course it is not that perfect like commercial versions. Only thing that I want to do is not to make universal model translator between OMEdit and Simulink, but to translate just a model that I made in OMEdit. Hope so that FMI can help me with this, because it generates some code that can be used in Simulink. I’m not an expert in Simulink (not in OM, too) and I’m thankful to anyone who can give me some tips or who has some experience with this.
Cheers,
Lala

Feb-22-14 21:12:11
Category: Programming

Thanks to You I solved my problems. There is need to make class (like a subsystem) and then to input that class into model. I’m really thankful for help.
Lala current/smile

Feb-22-14 19:50:17
Category: Programming

Hello everyone,
My next question is how to put more components into one OM block (something similar to the Matlab/Simulink)? Is there any function or block for this?
Thanks,
Lala
__________________________________________________________________
From OMEdit simply drag & drop the components into your model.
Read OpenModelicaUsersGuide.pdf chapter 2 for more information.

Adeel.
__________________________________________________________________
Once more, thanks for replaying. I already made a complex model and I know some basics how to connect components and how to make models in OMEdit. Now, I am facing problem that I have a lot of components in one model and the questions was how to hide some of them by putting them (compressing) in one block? The same function exists in Matlab/Simulink where exists some blocks with input and outputs and some logic inside this block. In OMEdit, on examples of motors I saw that for example they put all motors components inside one block; terminal box is also made from a few components etc. I want to do the same with my model; to make some box with image and to programe this block.
Thanks,
Lala

Feb-22-14 19:49:14
Category: Programming

Hello everyone,
I’m working on a specific model exchange between OpenModelica and Matlab/Simulink. I already read something about FMI (FMU) on internet but I didn’t find any tutorial how to sole that task. Does anyone have some tips for this problem?
Thanks,
Lala
_________________________________________________________________________________
I suppose you are using OMEdit.

Create your model and then export it as an FMU. From the menu FMI->export FMU.

Adeel.
_________________________________________________________________________________
First of all, thanks for replaying.
I already found this function in OMEdit and that’s why I want to try my models in Matlab/Simulink. But the question is that do I have to change the C code (prepare it for S-function) or OMEdit and FMI standard does all work for me? I know that FMI generates C code and FMU but can Simulink (S-function) read this code or there is need to do some changes? It means, if I don’t have to do any changes, only need is just to call S-function (C code) in Matlab/Simulink and simulation is going to work.
Many thanks,
Lala

Once more, thanks for replaying. I already made a complex model and I know some basics how to connect components and how to make models in OMEdit. Now, I am facing problem that I have a lot of components in one model and the questions was how to hide some of them by putting them (compressing) in one block? The same function exists in Matlab/Simulink where exists some blocks with input and outputs and some logic inside this block. In OMEdit, on examples of motors I saw that for example they put all motors components inside one block; terminal box is also made from a few components etc. I want to do the same with my model; to make some box with image and to programe this block. 
Thanks,
Lala

Feb-22-14 19:39:45
Model exchange

First of all, thanks for replaying.
I already found this function in OMEdit and that’s why I want to try my models in Matlab/Simulink. But the question is that do I have to change the C code (prepare it for S-function) or OMEdit and FMI standard does all work for me? I know that FMI generates C code and FMU but can Simulink (S-function) read this code or there is need to do some changes? It means, if I don’t have to do any changes, only need is just to call S-function (C code) in Matlab/Simulink and simulation is going to work.
Many thanks,
Lala

Hello everyone,
My next question is how to put more components into one OM block (something similar to the Matlab/Simulink)? Is there any function or block for this?
Thanks,
Lala

Feb-22-14 15:07:55
Model exchange

Hello everyone,
I’m working on a specific model exchange between OpenModelica and Matlab/Simulink. I already read something about FMI (FMU) on internet but I didn’t find any tutorial how to sole that task. Does anyone have some tips for this problem?
Thanks,
Lala

Hello everyone,
I need to compare simulation results from OME with Simulink. I already made a model of AIMC in OME and I need to compare angel velocity and stator's current with results from SImulink. There is one problem. In Simulink I use gamma model of AIMC but I don’t know with what model work OME. That's why I found some differences in results.
Is there anyone who can help me with this kind of problem (to explain and to send me the mathematical equations used in OME for AIMC)?
If there is no one, I have to get equations from text editor and to find out how to set parameters.
Thanks,
Lala

Hello everyone,
I have been already writing about this topic, but maybe some didn't understand with what I have a problem.
I don't know how to simulate 9-phases AIMC in OpenModelica.
Does anyone can help me to solve this problem? Thanks a lot.

Regards,
Lala

Hello,
I'm learning to work in OME environment and right now, I'm doing a school project about motors.
For that I have to simulate the  Asynchronous Induction Machines where the number of phases is 9 (not 3). I have some problems with spacephasor and I con not connect spacephasor with the terminalbox. Does anyone can help me to solve this problem?
Thanks a lot.

Regards,
Lala : )

  • Index
  • » Users
  • » Lala
  • » Profile
You are here: