- Index
- » Users
- » vserge
- » Profile
Posts
Posts
Great
Where I can read information how to setup interactive simulation by FMI?
I need to create special "payer" witch used FMI for communicating and manage simulation process ?
Hello,
Is it possible to show different Diagram view of one hierarchical model on different monitors?
I try to describe idea:
I have model of plant and on main diagram i can show main blocks of pant.Of course, I can drill down to model by "show class" command to show next level of model and diagram view for this part of model.
But for demonstration purpose we have four monitors and we need to output on monitors diagram of main model and diagrams of all main blocks of plant on two monitors.
On other monitors we need to plat charts by plot command.
How I can do it?
How to run "Interactive Simulation View" in last version of OpenModelica on MAC OS?
In user documentation for version 1.8.1 (OpenModelica 1.8.1 User's Guide) - it was a chapter 3 "
Chapter 3: Interactive Simulation in OMEdit...................................................................... 19
OpenModelica Interactive ....................................................................................... 20
Invoking Interactive Simulation................................................................................ 20
Interactive Simulation View..................................................................................... 20"
but in latest User's Guide this section is absent?
I need to run model simulation interactively. How I can do it?
It's strange bug.
I can get this behaviour with "openmodelica-nightly-1.9.4~dev.beta1-5-g0072bb3.mpkg"
I think error happened if OpenModelica works a half of day (3-4 hours) and when you try to check model without saving.
After restart OpenModelica always all right.
What debug options I need to setup for catching this bug?
I try with "openmodelica-nightly-1.9.4~dev.beta1-5-g0072bb3.mpkg" and it's work ok.
Thank you
For Mac OS I couldn't find this build.
The latest is openmodelica-nightly-1.9.4~dev.beta1-5-g0072bb3.mpkg
This build is the same to 747?
On build OpenModelica 1.9.4~dev-675-gb524b08
I get strange behaviour of OMEdit.
For example, I copy test model Modelica.Fuild.Example.DrumBoiler (MSL 3.2.1) to my test_DrumBoiler model
After code examination I find to input with out full path:
Code:
Blocks.Interfaces.RealInput q_F(unit="MW") if
use_inputs "fuel flow rate"
annotation (Placement(transformation(extent={{-112,-56},{-100,-44}})));
Blocks.Interfaces.RealInput Y_Valve if use_inputs "valve opening"
annotation (Placement(transformation(extent={{-112,-96},{-100,-84}})));
and in Diagram View they are shown as red squares.
When I correct code
Code:
Modelica.Blocks.Interfaces.RealInput q_F(unit="MW") if
use_inputs "fuel flow rate"
annotation (Placement(transformation(extent={{-112,-56},{-100,-44}})));
Modelica.Blocks.Interfaces.RealInput Y_Valve if use_inputs "valve opening"
annotation (Placement(transformation(extent={{-112,-96},{-100,-84}})));
and change view to Diagram I saw four element "RealInput q_F" and four element "RealInput Y_Valve" see picture
and modelica code in section between "model name" and "equation" is multiplay tree times and plus four lines:
Code:
Blocks.Interfaces.RealInput Y_Valve annotation(Placement(visible = true, transformation(extent = {{-112, -96}, {-100, -84}}, rotation = 0)));
Blocks.Interfaces.RealInput q_F annotation(Placement(visible = true, transformation(extent = {{-140, -54}, {-128, -42}}, rotation = 0)));
Blocks.Interfaces.RealInput q_F annotation(Placement(visible = true, transformation(extent = {{-142, -32}, {-130, -20}}, rotation = 0)));
Blocks.Interfaces.RealInput q_F annotation(Placement(visible = true, transformation(origin = {-141, -43}, extent = {{-13, -13}, {13, 13}}, rotation = 0)));
What happened? My be I do something wrong?
Thank you.
I try to use this examples in my models for experiments.
Adrian,
I think in Modelic.Media.Examples must be a working examples, because it's verified and tested ready for demonstrating solutions.
I try to redeclare Medium:
Code:
Interfaces.FluidPort_a port_a (redeclare package Medium = Seneca.Common.ACIDGas2) "Порт ввода газа" annotation(Placement(visible = true, transformation(origin = {-584, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-100, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
And get Translation Error:
Code:
Variable Medium.nXi not found in scope Modelica.Fluid.Interfaces.FluidPort_a$port_a
Can anybody help my to understand why this error occur?
Good mornig
I setup OpenModelica 1.9.4~dev-675-gb524b08 and I try to execute example Modelica.Media.Examples.Tests.Components.PortVolume
and get the next error:
Code:
[1] 06:58:44 Translation Error
[Modelica.Media: 3269:9-3271:35]: Medium is partial, name lookup is not allowed in partial classes.
[2] 06:58:44 Translation Error
[Modelica.Media: 3272:9-3274:30]: Medium is partial, name lookup is not allowed in partial classes.
[3] 06:58:44 Translation Error
[Modelica.Media: 3278:9-3282:30]: Medium is partial, name lookup is not allowed in partial classes.
[4] 06:58:44 Translation Error
[Modelica.Media: 3283:9-3286:30]: Medium is partial, name lookup is not allowed in partial classes.
[5] 06:58:44 Translation Error
[Modelica.Media: 3293:9-3293:65]: Medium is partial, name lookup is not allowed in partial classes.
[6] 06:58:44 Translation Error
[Modelica.Media: 4478:17-4603:23]: Illegal to instantiate partial class BaseProperties$medium.
[7] 06:58:44 Translation Error
Error occurred while flattening model Modelica.Media.Examples.Tests.Components.PortVolume
Please give me please some advice about it?
The error message link to Modelica.Media.IdealGases.Common
and in function
Code:
redeclare function density_derX "Return density derivative by mass fraction"
extends Modelica.Icons.Function;
input ThermodynamicState state "Thermodynamic state record";
output Density[nX] dddX "Derivative of density w.r.t. mass fraction";
algorithm
dddX := array(-state.p / (state.T * gasConstant(state)) * molarMass(state) / data[i].MM for i in 1:nX);
annotation(Inline = true, smoothOrder = 2);
end density_derX;
where data[i] not declare. Is it correct?
I'm try to create new media based on MixtureGasNasa and used it in test examples NonCircularPipes (copy standard MSL example to new file).
When I try to check model I get new errors:
Code:
[9] 17:54:03 Translation Error
[Modelica.Media.IdealGases.Common: 1305:5-1305:67]: Wrong number of subscripts in data[j].MM (1 subscripts for 0 dimensions).
[10] 17:54:03 Translation Error
[Modelica.Media.IdealGases.Common: 1305:5-1305:67]: Variable data[j].MM not found in scope Modelica.Fluid.Sources.Boundary_pT$boundary.Medium.molarMass.$foriter loop scope$.
[11] 17:54:03 Translation Error
Error occurred while flattening model Example_NonCircularPipes
For describe situation in details include here code of models.
Code:
package ACIDGas_1 "Определение проектной смеси для установки по очистке серы"
import Modelica.Fluid;
function phase_stat "функция расчета диаграммы состояний для бинарных газов/жидкостей относительно серы"
end phase_stat;
import Modelica.Media.IdealGases.Common.MixtureGasNasa;
extends MixtureGasNasa(mediumName = "ACIDGas", data = {Common.SingleGasesData.H2S, Common.SingleGasesData.SO2, Common.SingleGasesData.H2O, Common.SingleGasesData.O2, Common.SingleGasesData.N2, Common.SingleGasesData.H2, Common.SingleGasesData.CO, Common.SingleGasesData.CO2, Common.SingleGasesData.COS, Common.SingleGasesData.CS2, Common.SingleGasesData.CH4, Common.SingleGasesData.C2H6, Common.SingleGasesData.C3H8, Common.SingleGasesData.C4H10_isobutane, Common.SingleGasesData.C4H10_n_butane, Common.SingleGasesData.C5H12_i_pentane, Common.SingleGasesData.NC3H12, Common.SingleGasesData.NH3, Common.SingleGasesData.S, Common.SingleGasesData.S2, Common.SingleGasesData.S3, Common.SingleGasesData.S4, Common.SingleGasesData.S5, Common.SingleGasesData.S6, Common.SingleGasesData.S7, Common.SingleGasesData.S8}, fluidConstants = {Common.FluidData.H2S, Common.FluidData.SO2, Common.FluidData.H2O, Common.FluidData.O2, Common.FluidData.N2, Common.FluidData.H2, Common.FluidData.CO, Common.FluidData.CO2, Common.FluidData.COS, Common.FluidData.CS2, Common.FluidData.CH4, Common.FluidData.C2H6, Common.FluidData.C3H8, Common.FluidData.C4H10_isobutane, Common.FluidData.C4H10_n_butane, Common.FluidData.C5H12_i_pentane, Common.FluidData.NC3H12, Common.FluidData.NH3, Common.FluidData.S, Common.FluidData.S2, Common.FluidData.S3, Common.FluidData.S4, Common.FluidData.S5, Common.FluidData.S6, Common.FluidData.S7, Common.FluidData.S8}, substanceNames = {"H2S", "SO2,", "H2O", "O2", "N2", "H2", "CO", "CO2", "COS", "CS2", "CH4", "C2H6", "C3H8", "C4H10_isobutane", "C4H10_n_butane", "C5H12_i_pentane", "NH3", "S", "S2", "S3", "S4", "S5", "S6", "S7", "S8"}, reference_X = {0.0, 0.0, 0.0, 0.232, 0.768, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0});
annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
end ACIDGas_1;
Code:
model Example_NonCircularPipes
import Modelica.Media;
import Modelica.Fluid;
replaceable package Medium = ACIDGas_1 "Medium in the component";
extends Modelica.Icons.Example;
constant Real odim = 0.015;
constant Real idim = 0.005;
inner Modelica.Fluid.System system(energyDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial) annotation(Placement(visible = true, transformation(origin = {-80, 80}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Sources.Boundary_pT boundary(redeclare package Medium = Medium, nPorts = 2, p = 10.0e5, T = 293.15) annotation(Placement(visible = true, transformation(origin = {-80, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Sources.MassFlowSource_T massflowsink1(redeclare package Medium = Medium, nPorts = 1, m_flow = -0.1, T = 293.15) annotation(Placement(visible = true, transformation(origin = {40, 40}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
Modelica.Fluid.Sources.MassFlowSource_T massflowsink2(redeclare package Medium = Medium, nPorts = 1, m_flow = -0.1, T = 293.15) annotation(Placement(visible = true, transformation(origin = {40, -40}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
Modelica.Fluid.Pipes.DynamicPipe circular_pipe(redeclare package Medium = Medium, length = 100, diameter = 0.01, T_start = 293.15, p_a_start = 10.0e5, p_b_start = 10.0e5) annotation(Placement(visible = true, transformation(origin = {-20, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Pipes.DynamicPipe annulus_pipe(redeclare package Medium = Medium, length = 100, crossArea = Modelica.Constants.pi * (odim ^ 2 - idim ^ 2) / 4, perimeter = Modelica.Constants.pi * (odim + idim), isCircular = false, diameter = 0, p_a_start = 1000000, p_b_start = 1000000, T_start = 293.15) annotation(Placement(visible = true, transformation(origin = {-20, -40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(boundary.ports[1], circular_pipe.port_a) annotation(Line(points = {{-70, 2}, {-60, 2}, {-60, 40}, {-30, 40}}, color = {0, 127, 255}));
connect(boundary.ports[2], annulus_pipe.port_a) annotation(Line(points = {{-70, -2}, {-60, -2}, {-60, -40}, {-30, -40}}, color = {0, 127, 255}));
connect(circular_pipe.port_b, massflowsink1.ports[1]) annotation(Line(points = {{-10, 40}, {30, 40}}, color = {0, 127, 255}));
connect(annulus_pipe.port_b, massflowsink2.ports[1]) annotation(Line(points = {{-10, -40}, {30, -40}}, color = {0, 127, 255}));
annotation(experiment(StopTime = 1), Library = Seneca, Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
end Example_NonCircularPipes;
What I do wrong?
I try to change annotation according Modelica Specification 3.3. rev 1
so I have code with "IconMap":
Code:
model PartialTwoPort
import Modelica.Icons.Model;
extends Modelica.Icons.Model;
extends Modelica.Fluid.Interfaces.PartialTwoPort annotation(IconMap(extent = {{-100, -100}, {100, 100}}, primitivesVisible = false), DiagramMap(extent = {{-100, -100}, {0, 0}}, primitivesVisible = true));
annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
end PartialTwoPort;
Hello
I find in trac that this bug is closed https://trac.openmodelica.org/OpenModelica/ticket/1131
But i have OpenModelica 1.9.4~dev-94-ge7263fe and code
Code:
model PartialTwoPort
extends Modelica.Fluid.Interfaces.PartialTwoPort annotation(Icon(primitivesVisible = false));
annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
end PartialTwoPort;
and it didn't work.
My be I do something wrong?
I need to hide arrow Icon layer of PartialTwoPort from on Icon layer in my model?!
we are working on unix/linux systems, so we try only linux.
I think you can setup openmodelica on cluster with out GUI, but with CORBA interface.
After that you can send to cluster model for compilation and simulations.
see another post on this forum https://openmodelica.org/forum/default- … -interface
or http://comments.gmane.org/gmane.comp.mi … elica/1408
in paper http://www.ep.liu.se/ecp/076/054/ecp12076054.pdf may be useful.
If you would like to setup Thermocycle library you need to install additional library ExternalMedia.
But it's not so simple.
I hope we can make a package for ALT Linux, but it's take a time.
Hi, Tian
Thank you for your advice.
I try it and got the same errors.
After that I start to find solutions, because on my linux desktop configure script working but on server didn't.
ALT Linux development team implement security enhancement for run /bin/sh from unprivileged users.
Description a security problem "Why not just use /bin/sh ?"
This problem can be solved by adding unprivileged user to group "wheel".
Hi,
I try to compile from git OpenModelica (minimal and full).
I clone OpenModelica from git according git instructions:
Code:
[vserge@comp OpenModelica-minimal]$ git clone https://openmodelica.org/git-readonly/OpenModelica.git OpenModelica-minimal
[vserge@comp OpenModelica-minimal]$ cd OpenModelica-minimal/
[vserge@comp OpenModelica-minimal]$ git submodule update --init --recursive libraries testsuite OMCompiler common
and after that I try to compile, but get configure error:
Code:
[vserge@comp OpenModelica-minimal]$ autoconf
[vserge@comp OpenModelica-minimal]$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
configure: OpenModelica pre-commit hook has been installed
ln: failed to create symbolic link '.git/hooks/pre-commit': File exists
configure: OpenModelica commit-msg hook has been installed
configure: error: cannot run /bin/sh ./config.sub
I try to run command: "/bin/sh ./config.sub" and it's working.
What I do wrong?
We schedule this work on January 2016.
We'll keep you informed here.
I think I get the same problem with ThermoSysPro.
[2] 16:46:07 Scripting Notification
2015-09-25 16:46:07.436 OMEdit[1224:68458] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
[3] 16:46:16 Scripting Notification
[/opt/openmodelica/lib/omlibrary/ThermoSysPro 3.1/package.mo: 132:31-134:169]: ThermoSysPro is not yet fully operational with OpenModelica.
The authors suggest using Dymola for full benefit of the library, in particular if you are experiencing difficulties.
The current operational status with OpenModelica of the included examples can be found at https://test.openmodelica.org/libraries … rsive.html
[4] 16:46:35 Scripting Warning
Requested package Modelica of version 3.2, but this package was already loaded with version 3.2.1. You might experience problems if these versions are incompatible.
[5] 01:26:52 Translation Error
Cannot instantiate ThermoSysPro.Combustion due to class specialization PACKAGE.
l3oo321 We are ready collaborate to update or rewrite this library for OM.
- Index
- » Users
- » vserge
- » Profile