- Index
- » Users
- » TSgarp
- » Profile
Posts
Posts
Hey thanks a bunch sjoelund.se
I get a file does not exist error if I try to run from my bat (or from a .mos, loaded into omc).
Code:
omc.exe loadModel(Modelica);
OM Shell has no problem with the command, everything is installed to the standard location. I'm I doing something wrong?
Code:
omc.exe loadModel(Modelica);
omc.exe loadFile("F:\model.mo");
omc.exe simulate(model);
omc.exe plot(x); //or plot3 as was pointed out =)
to get an integration of current I had to cast current (a flow variable) as a Real, then Modelica was happy.
ex.
model simple
Real IN,OUT;
INT intx;
equation
IN = vin.i;
intx.u = IN;
OUT = intx.y;
end simple;
--------------------------------------------------
block INT
parameter Real k = 1;
Modelica.Blocks.Interfaces.RealInput u;
Modelica.Blocks.Interfaces.RealOutput y(start = 0);
equation
der(y) = k * u;
end INT;
I am trying to get OMC to simulate my model directly (without an IDE like OMEdit). I have a large about of models so I created a bat script to like the following to do it for me.
omc.exe "F:\Model_1.mo"
omc.exe plot(X)
However, i have been getting an error of
Error processing file "F:\model_1.mo"
[F:\model_1.mo:4:3-4:89:writable] Error: Class Modelica.SIunits.Voltage not found in scope Model_1.RampVoltage while instantiating SL_RampVoltageX.v.
I think i need to load the Modelica Library first, but I am unsure how as I'll I have found has been a .zip of it.
thanks in advance
I have been having trouble coming up with a way to take the integral of current and voltage at a specific node in a circuit. I have tried using the Block Integrator but it can not handle flow variables such as current. Is there a way this can be done?
thanks in advance
- Index
- » Users
- » TSgarp
- » Profile