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

Posts

Posts

May-17-11 15:53:34
No display or connection to RealInput, PositivePin, Flange_a etc.
Category: Developer

In OMEdit, it is not possible to create a connection to an interface component (such as RealInput, RealOutput, PositivePin, Mechanics.Rotational.Flange_a etc)
It seems as if the component is not seen as a valid start or end for a connection, and happens for all interface components in all domains.

To reproduce this:
Create a new model in OMEdit,
add a Blocks.Interfaces.RealInput component
add a Blocks.Math.Gain component (or anything else that has a real input)
Try to connect the RealInput to the Gain.u input  - This is not possible

Also, where an existing model is loaded, which has a connection to/from an interface component, the connection is not shown in OMEdit's icon layer.

May-13-11 14:15:39
Lookup table output is zero for all negative inputs
Category: Developer

Thanks, this is an improvement, as the output is not forced to be zero if the input is zero.

There is still a problem, as the table output can only be defined for zero or positive values. With CombiTable1D and CombiTable1Ds it should be possible to define the output for negative and positive input values. For example the following table:

Code:

Modelica.Blocks.Tables.CombiTable1Ds combitable1ds2(columns = {2}, table = [-10,20;0,0;10,10]) ;

should give the following results:
Input,Output
-10, +20
0, 0
+10,+10

With your fix, it gives
-10,-10 (extrapolated from the positive part of the table)
0,0
+10,+10

It looks as if the negative part of the table is ignored, and the output is extrapolated for negative inputs.

I think the underlying problem is that the function ModelicaTables_CombiTable1D_init (in \c_runtime\ModelicaExternalC\ModelicaTablesImpl.c) calls omcTableTimeIni to initialise the table, and forces the 'start time' to 0.0, so the negative part of the table is never used.

May-06-11 11:47:44
Lookup table output is zero for all negative inputs
Category: Developer

I believe that I have found a bug in OpenModelica when simulating the CombiTable1D and CombiTable1Ds lookup table models.

The output of the lookup table appears to go to zero for all negative input values, even if a non-zero output value is set in the table:

Code:


model TrivialLookupTable
  Modelica.Blocks.Sources.Sine sine1(amplitude = 1, freqHz = 0.2, phase = 0, offset = 0, startTime = 0);
  Modelica.Blocks.Tables.CombiTable1Ds combitable1ds2(table = [-10,10;0,10;10,10], columns = {2});

  equation
    connect(sine1.y,combitable1ds2.u);
end TrivialLookupTable;

I believe that the output from the table should be +10 for all inputs in the range -10 to 10. Instead, the output is +10 for positive input values, but 0 for negative input values.

The same happens with CombiTable1D.

James

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