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
  • » JK
  • » Profile

Posts

Posts

Jul-01-16 07:17:28
Category: Programming

I solved the problem by putting the models in the folder of the standard modelica models (C:\JModelica.org-1.17\install\ThirdParty\MSL\Modelica)...not nice but it works...

however, if somebody has a tip for me, to refer at extern models, would be nice current/smile

Jun-29-16 14:19:45
Category: Programming

Hey everybody,

at first, I'm using OMEdit (OpenModelica) to script and jmodelica to build FMUs and to simulate.
Now I've build two models (submodel1 and submodel2). I like to connect those two models in another model (mainmodel). In Openmodelica editor no problem, because both submodels are loaded in the work directory.

But now I wanted to load the mainmodel in jmodelica, which don't know those two submodels. So an error occurs. I need to load those two models in jmodelica.

Is there a way to reference both models in the programcode?
for example instead of :
Modelica.examples.submodel1 nameofmodel;
like this:
'c:\\users\mymodels\submodel1.mo' nameofmodel;

is there a way to do so?

Otherwise, how can I import those the submodels in jmodelica?

Sorry, I'm not so familiar with Modelica/jModelia and I read and did a lot of tutorials, but can't solve this problem.

Thanks in advanced!

Greetings
Julian

Jun-27-16 08:37:56
Category: Programming

it works!

Thanks for your quick help. You help me to understand Modelica a little more current/smile

edit: just for the records: both variants are working current/wink

Jun-27-16 06:58:36
Category: Programming

Hey everybody,

hope you can help me with this problem. I have a programm code about an electric drive and some physical properties. I want to calculate some values. But every compiler says, that the code is singular. But I don't understand why, cause I have 4 unknowns and 4 equations...

maybe you can give me a hint.
Here's the code:

model E_Motor

        import Modelica.SIunits;
    input SIunits.Frequency freqHzIst(start=50);
    input SIunits.Voltage UIst(start=400);
    input SIunits.Current IMax(start=5);
    parameter SIunits.Inertia JAntrieb(start=30);
    parameter Real i(start=5);
    parameter Integer p(start=2);
    parameter SIunits.Frequency freqHzNenn(start=50);
    parameter SIunits.AngularVelocity nNenn(start=1430);
    parameter SIunits.Inertia JRot(start=0.003);
    parameter Real pi=2*Modelica.Math.asin(1.0);
    parameter SIunits.AngularVelocity nIst;
    parameter SIunits.AngularVelocity w;
    parameter SIunits.KineticEnergy EKinMax;
    parameter SIunits.Power PMax;

equation
        nIst=((freqHzIst/p)*(nNenn/(freqHzNenn/p)))/i;
        w=2*pi*nIst;
        EKinMax=0.5*(JAntrieb+JRot)*w^2;
        PMax=UIst*IMax;

end E_Motor;

thank you very much in advanced!

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