- Index
- » Users
- » Nasrou
- » Profile
Posts
Posts
It works Thank you very much for your help, It's been more than 10 days since i'm looking for a solution.
Nasrou
When I use your script, i get my csv files but inside these files I don't have values (numbers) i have things like ù$%...
I don't know why i get this .
Nasrou
If I move my system command out of the for loop then i will not simulate my model for each value of my parameter !!
Nasrou
This is a screen shot of what i got after running these commands.
Nasrou
I runned exactly your command. But I still have the same problem with the dll
Nasrou
which PATH you are talking about ? is it the mos file Path ?
Nasrou
I can't open the RCmodel executable because i don't have in my computer this dll : libsundials_idas.dll
I changed RCserie by RCmodel in my system command but it still not working ( i still not have my csv file even if i change _res.mat by _res.csv )
Nasrou
This is my model ( I made it with OMEdit ) :
Code:
model RCmodel
Modelica.Electrical.Spice3.Basic.R_Resistor R(R = 1) annotation(
Placement(visible = true, transformation(origin = {-50, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Electrical.Spice3.Basic.C_Capacitor C(C = 2) annotation(
Placement(visible = true, transformation(origin = {-16, 8}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Electrical.Spice3.Basic.Ground Gr annotation(
Placement(visible = true, transformation(origin = {-62, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Electrical.Spice3.Sources.V_constant V(V = 2) annotation(
Placement(visible = true, transformation(origin = {-154, 12}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
equation
connect(V.n, Gr.p) annotation(
Line(points = {{-154, 2}, {-154, 2}, {-154, -22}, {-62, -22}, {-62, -22}}, color = {0, 0, 255}));
connect(V.p, R.p) annotation(
Line(points = {{-154, 22}, {-156, 22}, {-156, 42}, {-60, 42}, {-60, 42}}, color = {0, 0, 255}));
connect(C.n, Gr.p) annotation(
Line(points = {{-16, -2}, {-16, -2}, {-16, -22}, {-62, -22}, {-62, -22}}, color = {0, 0, 255}));
connect(R.n, C.p) annotation(
Line(points = {{-40, 42}, {-16, 42}, {-16, 18}, {-16, 18}}, color = {0, 0, 255}));
annotation(
uses(Modelica(version = "3.2.2")));
end RCmodel;
My mos script :
Code:
cd();
loadModel(Modelica);
getErrorString();
loadFile("RCmodel.mo");
getErrorString();
buildModel(RCmodel);
getErrorString();
for i in 1:3 loop
c := 0.1 + i;
system("./RCserie -override=C.C=" +String(c)+" -r=RCserie" +String(i) + "_res.mat");
getErrorString();
end for;
Nasrou
Do you mean the output files ?
Nasrou
I fixed this problem but I don't found my csv file.
it is normal ?
Nasrou
I do the same thing (like the documentation about the sweep parameter) for my model but i get a warning : The initial conditions are not fully specified, and I don't understand why i get this warning.
Someone have an idea ?
Nasrou
Thank you Adeel.
It allowed me to advance considerably in my project.
Nasrou
Yes, Thanks to Adeel.
Apparently, we can do FOR loops in a .mos script, it's a good thing because we can run several simulations with just a for loop.
Nasrou
Thank you Ueda for your response.
I have another question, can we use FOR loops in a .mos script ?
Nasrou
Thank you Adeel for your response.
I want to know how can i save my results for each paramaeter in a csv file ?
Nasrou
Hello everyone,
I want to know how we can do a sweep parameter and save results in different csv files.
For example, I have a RC model and I want to change the value of R and save results of the simulation in a csv file.
I tried with a mos script but it didn't work.
Thank you
Nasrou
Hi Adam,
Thank you for your response. I want to do a parameter sweep with a .mos script because I'm more comfortable with mos scripts than python.
And i want also to save results of my simulation in a csv file.
Nasrou
Hello everyone,
I want to know how we can do a sweep parameter and save results in different csv files.
For example, I have a RC model and I want to change the value of R and save results of the simulation in a csv file.
I tried with a mos script but it didn't work.
Thank you
Nasrou
Hi everyone,
I'm new to OpenModelica, and I want to do post-processing (such as FFT) of the data of my OM simulation. How can i do such thing with OpenModelica ?
Thank you.
Hi Adrian
thank you for your answer, and i would like to know with which programming language i should write my script.
Cheers.
hello,
I'm new to OM, and i have maybe a stupid question.
I want to control a simulation of my model by doing several simulations. and I want to know how can I control that. I know, that with a mos script we can do such things, but i don't know how to create a .mos script.
My question is : how can I create mos file ?
thank you.
hello everyone,
i'm new at OpenModelica, and i would like to know how can i create a .mos script that can allow me to control the simulation of my model.
Thank you
- Index
- » Users
- » Nasrou
- » Profile