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

Posts

Posts

Hi,
Is it possible to call Python functions from OMEdit? I can see only Dymola is mentioned in the systems requirements.
I followd the steps and added PYTHONPATH and MOEDICAPATH to the system envrionment variables, however, I am getting the following error while simulating Buildings.Utilities.IO.Python27.Functions.Examples.Exchange:
__The code execution cannot proceed because ModelicaBuildingsPython2.7.dll was not found. Reinstalling the program may fix this problem___

I would be grateful for any assistance in this regard.

P.S. I want to implement surrogate model (machine learning/keras model) in OMEdit.

Sincerely,
Akhtar

Really appreciated. Thank you very much.

Sincerely,
akhtar

Hello FWend,

Did you make it? I have the same issue.

Sincerely,
Akhtar

Dear Rene Just Nielsen,

Thank you very much. That's very helpful. In the current case, the waterhammer effect is out of our interest. And I have another query,

Does the static momentum balance allow the reversing of the flow direction, i.e. acausality in this respect?


Best Regards,
Akhtar

Hello,
I have understood that in thermo-hydraulic modelling, Modelica tools offer the user to use either static or dynamic momentum balance. I have two questions related:
1)    Do both ways allow me to model in acausal way (that the flow direction is allowed to change)?
2)    In the simulation applications I have found, the static one is used. Are there examples of industrial simulation applications where the dynamic momentum balance has been applied?

I’m experimenting with OMEdit tool, is this momentum balance option available somewhere in the GUI?

I have a model in OMEdit and want to control the Tank Liquid Level by openin and closing the pump and valve according to the set levels of the Tank. The model is in the link below. I would be grateful for any assistance.

https://drive.google.com/file/d/1oIs6sR … 6gvT1/view

Hi,
I am following your steps and trying to simulate but failed. I am getting the following messages:
messages = "Simulation execuation failed for model: mymodel
Access is denied.
"

Also, I tried on another computer and there the message is,
messages = "Failed to build model: mymodel"

Could you please help me how to fix the issue.

Thanks

May-27-19 13:56:28
ThermoPower_Examples_BraytonCycle_Plant

Hi,

I am trying to simulate the same model as available in the ThermoPower library_Examples_BraytonCycle_Plant. However, I am receiving the follow errors. Could you please help me how to redeclare the partial class (Medium in this case).

Errors:



_________________________________________________________________________________________________________
[1] 16:15:12 Translation Notification
[ThermoPower.Gas: 247:17-248:44]: From here:

[2] 16:15:12 Translation Error
[mymodel_ThermoPower_Library: 35:3-36:112]: component sourceMassFlow1 contains the definition of a partial class Medium.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.

[3] 16:15:12 Translation Error
Error occurred while flattening model mymodel_ThermoPower_Library.Plant_1

___________________________________________________________________________________________________________

MODEL
--------------------------------------
model Plant_1
Modelica.Blocks.Interfaces.RealInput u annotation(
    Placement(visible = true, transformation(origin = {-100, 22}, extent = {{-12, -12}, {12, 12}}, rotation = 0), iconTransformation(origin = {-100, 22}, extent = {{-12, -12}, {12, 12}}, rotation = 0)));
Modelica.Blocks.Continuous.FirstOrder firstOrder1 annotation(
    Placement(visible = true, transformation(origin = {-68, 50}, extent = {{-4, -4}, {4, 4}}, rotation = 0)));


ThermoPower.Gas.SourceMassFlow sourceMassFlow1 annotation(
    Placement(visible = true, transformation(origin = {-44, 40}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
ThermoPower.Gas.CombustionChamber combustionChamber1 annotation(
    Placement(visible = true, transformation(origin = {-28, 20}, extent = {{-6, -6}, {6, 6}}, rotation = 0)));
ThermoPower.PowerPlants.HRSG.Components.StateReader_gas stateReader_gas1 annotation(
    Placement(visible = true, transformation(origin = {-43, 21}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
ThermoPower.PowerPlants.HRSG.Components.StateReader_gas stateReader_gas2 annotation(
    Placement(visible = true, transformation(origin = {-13, 19}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
ThermoPower.Gas.PressDrop pressDrop1 annotation(
    Placement(visible = true, transformation(origin = {-49, 3}, extent = {{-5, -5}, {5, 5}}, rotation = 90)));
ThermoPower.Gas.PressDrop pressDrop2 annotation(
    Placement(visible = true, transformation(origin = {-9,3}, extent = {{-5, -5}, {5, 5}}, rotation = -90)));
ThermoPower.Gas.Compressor compressor1 annotation(
    Placement(visible = true, transformation(origin = {-62, -22}, extent = {{-12, -12}, {12, 12}}, rotation = 0)));
ThermoPower.Gas.SourcePressure sourcePressure1 annotation(
    Placement(visible = true, transformation(origin = {-89, -1}, extent = {{-7, -7}, {7, 7}}, rotation = 0)));
ThermoPower.Gas.Turbine turbine1 annotation(
    Placement(visible = true, transformation(origin = {-4, -22}, extent = {{-12, -12}, {12, 12}}, rotation = 0)));
ThermoPower.Gas.SinkPressure sinkPressure1 annotation(
    Placement(visible = true, transformation(origin = {36, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
ThermoPower.Electrical.Generator generator1 annotation(
    Placement(visible = true, transformation(origin = {58, -20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(turbine1.shaft_b, generator1.shaft) annotation(
    Line(points = {{4, -22}, {48, -22}, {48, -20}, {50, -20}}));
  connect(compressor1.shaft_b, turbine1.shaft_a) annotation(
    Line(points = {{-54, -22}, {-12, -22}, {-12, -22}, {-12, -22}}));
  connect(sourcePressure1.flange, compressor1.inlet) annotation(
    Line(points = {{-82, 0}, {-72, 0}, {-72, -12}, {-72, -12}}, color = {159, 159, 223}));
  connect(turbine1.outlet, sinkPressure1.flange) annotation(
    Line(points = {{6, -12}, {4, -12}, {4, 0}, {26, 0}, {26, 0}}, color = {159, 159, 223}));
  connect(pressDrop2.outlet, turbine1.inlet) annotation(
    Line(points = {{-8, -2}, {-14, -2}, {-14, -12}, {-14, -12}}, color = {159, 159, 223}));
  connect(stateReader_gas2.outlet, pressDrop2.inlet) annotation(
    Line(points = {{-8, 20}, {-8, 20}, {-8, 8}, {-8, 8}}, color = {159, 159, 223}));
  connect(combustionChamber1.out, stateReader_gas2.inlet) annotation(
    Line(points = {{-22, 20}, {-18, 20}, {-18, 20}, {-18, 20}}, color = {159, 159, 223}));
  connect(pressDrop1.inlet, compressor1.outlet) annotation(
    Line(points = {{-48, -2}, {-52, -2}, {-52, -12}, {-52, -12}}, color = {159, 159, 223}));
  connect(stateReader_gas1.inlet, pressDrop1.outlet) annotation(
    Line(points = {{-50, 20}, {-50, 20}, {-50, 8}, {-48, 8}}, color = {159, 159, 223}));
  connect(combustionChamber1.ina, stateReader_gas1.outlet) annotation(
    Line(points = {{-34, 20}, {-40, 20}, {-40, 20}, {-40, 20}}, color = {159, 159, 223}));
  connect(sourceMassFlow1.flange, combustionChamber1.inf) annotation(
    Line(points = {{-38, 40}, {-28, 40}, {-28, 26}, {-28, 26}}, color = {159, 159, 223}));
  connect(firstOrder1.y, sourceMassFlow1.in_w0) annotation(
    Line(points = {{-64, 50}, {-48, 50}, {-48, 44}, {-48, 44}, {-48, 44}}, color = {0, 0, 127}));
  connect(u, firstOrder1.u) annotation(
    Line(points = {{-100, 22}, {-80, 22}, {-80, 50}, {-73, 50}}, color = {0, 0, 127}));
end Plant_1;

May-23-19 10:11:38
OMEdit Simulation Output_Failed to solve linear system of equations, system is singular.

Hi,

I am facing problems with simulating the subject example. In OMEdit, the instantiation and compilation go successfully, however, at the simulation output I receive the following errors.
__
Failed to solve linear system of equations (no. 6971) at time 577.447282, system is singular for U[3, 3].
The default linear solver fails, the fallback solver with total pivoting is started at time 577.447282. That might raise performance issues, for more information use -lv LOG_LS.
Matrix singular!
under-determined linear system not solvable!
While solving non-linear system an assertion failed at time 577.447.

__

Also, when I edit any parameter, I get compilation errors and the simulation doesn't proceed.

Could you please tell me about the effects of those errors at the simulation output and why I am unable to edit any of the parameters??


Please note: I have made a duplicate model of the subject model with a different name and I am using OpenModelica1.13.264bit.

Thanking you.

May-21-19 06:45:37
ThermoPower librarys' examples

Thanks for writing.
Please check these:

[1] 09:31:04 Scripting Warning
Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.

[1] 09:44:06 Translation Warning
[ThermoPower.Water: 5482:7-5482:63]: No corresponding 'inner' declaration found for component .ThermoPower.System fluidFlow.system declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: ThermoPower.Water.Flow1DFV$fluidFlow.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

[2] 09:44:06 Translation Error
[ThermoPower.Examples: 2415:80-2415:93]: Variable gamma_F not found in scope ThermoPower.Water.Flow1DFV$fluidFlow.

[3] 09:44:06 Translation Error
Error occurred while flattening model ThermoPower.Examples.RankineCycle.Models.HE

May-20-19 11:04:29
ThermoPower librarys' examples

Is it because of this warning?
"
Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.
"

May-20-19 11:01:31
ThermoPower librarys' examples

I cannot run any of the ThermoPower librarys' examples in the OMEdit. Why?

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