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

Posts

Posts

Apr-20-12 17:55:38
Message from OMEdit: Template error: literalExpConst failed

Hello again,


besides my last problem, which after all was easy to handle (avoid German "Umlaut" !), the following error message of OMEdit is a mystery for me: 

"
Translation    16:48:36    CodegenC.tpl    6799:14-6799:14    Template error: literalExpConst failed: {}
"

I assume, it might have something to do with the complexity of the model. For confirming of this assumption I took out two function calls, computed the needed results from the functions separately in OMNotebook (same functions, no error messages), and put in the results in the model. After this simplification, it simulated.
Might be there another source of failure I didn't see?


Greetings

Apr-20-12 17:41:27
Error message from OMEdit not understandable

All right, I found my mistake, you were right, there were some degree signs ( ° ) in my code, but they were put as comments, thats why I didn't expect them to induce complications. Furthermore, I had an German  " Ö " in the path, but that was not a problem so far in earlier simulations.

Anyway, thank you!

Apr-20-12 16:44:02
Error message from OMEdit not understandable

Hello,


I tried already to update to the last OM 1.8.1 Version, but out of some reason my package, containing all relevant components, and the the separate simulation modell is not started and there were no error messages. They are only started in the BETA-Version of OM 1.81., which was released in January. Sorry for my incomplete knowledge, but how to update on new omc? Is it contained in the OM 1.8.1, released this April?

The most confusing fact for me is, that my model has been simulated some says ago by BETA OM 1.8.1 and now is NOT, when i tried it under exactly the same circumstances current/sad   ....


Greetings

Apr-20-12 15:42:36
Error message from OMEdit not understandable

Hello,


during process (after compiling and before simulation) of an own model, OMEdit gave me back following error message:

"
Following Error has occurred.

Process crashed throw [line] 255 [file] simulation/simulation_input_xml.cpp
simulation_input_xml.cpp:Error:failed to read the XML file
Testmodell_6_init.xml: not well formed (invalid token) at line 68
"

May anybody tell me, how to fix this mistake of mine? There is no document or model with a line 68 to correct as far I can see.


Greetings

Hello,


I want to run a model of heat exchanger and need the media model of Modelica.Media. It works so far, however, OM gives me the message, that my predefined start values for pressure and enthaply were not used because they are already defined inside Modelica.Media.

I define the start values in this way:
Modelica.SIunits.Pressure p (start=300000.0, fixed=true)

Is there any way to tell OM, that my defined values are the important ones?


Kind Regards Georg

Dec-22-11 21:55:26
Modified HX Model of Modelica.Fluid should get modified by new record

Hello,

I want to create a Plate Heat Exchanger Model by modifying the Default HX Model in Modelica.Fluid. I've modified subclasses and created a record, which contains all relevant geometrical data. These should get connected with the model HeatExchangerSimulation. For example instead of



model HeatExchangerSimulation
  "simulation for the heat exchanger model"

extends Modelica.Icons.Example;

replaceable package Medium =
      Modelica.Media.Water.StandardWaterOnePhase;
      //replaceable package Medium = Modelica.Media.Water.StandardWater;
      //package Medium = Modelica.Media.Incompressible.Examples.Essotherm650;

     Fluid_Test1_PHE_Temp6.Examples.HeatExchanger.BaseClasses.BasicHX HEX(
     c_wall=500,
   ...
   ...

end HeatExchangerSimulation;


there is written now:


model HeatExchangerSimulation
  "simulation for the heat exchanger model"

extends Modelica.Icons.Example;

replaceable package Medium =
      Modelica.Media.Water.StandardWaterOnePhase;
      //replaceable package Medium = Modelica.Media.Water.StandardWater;
      //package Medium = Modelica.Media.Incompressible.Examples.Essotherm650;

     Fluid_Test1_PHE_Temp6.Examples.HeatExchanger.BaseClasses.BasicHX HEX(
     c_wall=PHE_DATA.c_wall,
   ...
   ...

end HeatExchangerSimulation;


("PHE_DATA " is the shortcut of the Modelica path to the record)


But when I let check the model, it tells me, that c_wall is in conflict with an earlier definition. Is there a method to create a kind of hierarchy, where declarations can be overridden?

My intention was, to controll the model from one point (the record) and not to spread all input varibles in subclasses of the model.


Cheers
Georg

Dec-01-11 14:39:34
Looking for Source/explanation for Nusselt function in Modelica.Fluid

Hi perost,

thanks for fast replying. In that case I will try to simplfy the model somehow, although there is no starting point for it at the moment (Your colleague already wrote, the many "redeclares" mainly cause problems).

Nov-30-11 19:40:36
Looking for Source/explanation for Nusselt function in Modelica.Fluid

Hello,


In Modelica.Fluid.Pipes.BaseClasses.HeatTransfer.LocalPipeFlowHeatTransfer the final Nusselt Number is computed by a splicefunction (see Modelica.Media.Air.MoistAir.Utilities.spliceFunction). May you can shortly explain, why there are the two numbers "6150" and "3850"?
I have the VDI Wärmeatlas of 2006 (you have the edition of 1997) and I had not found such an interpolation function.

P.S. Thank you very much for uploading Fluid in OM, good job!


Greetings
Georg

Nov-07-11 10:30:41
Tried to integrate a self-designed library, OME crashes

Hy Adrian Pop,


thank you very much for your detailed answer. Please find my explanations and the code in my mail I send to the mentioned address.


Greetings
Georg


P.S. If I accomplish a workable code in near futue, I can publicise it here, if somebody wants to see it.

Nov-05-11 21:22:19
Tried to integrate a self-designed library, OME crashes

Hy there,


since my last enquiry for the FLUID Library ( thanks for your interest) I tried to build a basic model of an heat exchanger HX, combined with the Modelica.Media Library.
I took out the basic classes from Modelica.Fluid (I work parallel with an Demo Version of Dymola) and combine them to a summary package and a single Model for defining simulation parameters (mass flow, start value for temperatures, etc.); All previous classes from Fluid, which were not important for the HX, I did not copy!
In Dymola the package + simulation model were checked successfully. Afterwards I have tried to import these 2 classes in OM. There were some error messages, e.g. signs, like " \\ \" could not get identified, therefore I isolated them. So there seem to be no formal mistakes more, but OM always crashes down, when I try to simulate. Furthermore, my two classes both contain about 2,600 equations together and I have read, OM is able to handle at least 10,000. It did not make any differences, when I had tried to split the summary packages up into single models and smaller packages, because I previously thought, OM can not load a model of about 3000 lines, but there were no success. I tried to study the OMDocumetation for finding an hint for modelling limits in OM, but found nothing.

So you see, I did not simply try to copy parts of FLUID Library hoping they are going to work somehow, but tried to addapt and simplify all classes, I need. 

May anybody can explain me, what important limits one have to consider concerning my problem?
If somebody like, I will paste here my Modelica Code of course! If there any further questions, please ask me.


Have a nice weekend!
Georg

Oct-27-11 23:10:17
Libraries FLUID and FLUIDDISSIPATION does not work in OpenModelica

Ok, thanks for answering


Greetings
Georg

Oct-27-11 17:01:15
Libraries FLUID and FLUIDDISSIPATION does not work in OpenModelica

Hello,


since my last enquiry i got "more smart", because I recognized, that Modelica 3.1 inlcudes media data and there is no need to compute one by myself. Thank you for that! current/smile

I tried to involve the free Libraries "FLUID" and "FLUIDDISSIPATION" in OpenModelica, but the storage seems to be overloaded. Are these libraries supposed to work in OpenModelica? I have thought so, because they are freeware...


Greetings
Georg

Sep-30-11 14:54:44
Interface Excel for data transfer of fluid properties data base

Hello sjoelund.se,

thank you for your fast reply. I will try your suggestions and let you know if was succesfull!

Regards
Georg

Sep-29-11 18:02:28
Interface Excel for data transfer of fluid properties data base

Hello everybody,


for my diploma thesis I would like to build a database for fluid properties (e.g. water/steam, wet/dry air, heat transfer oil, etc.) for properties like:
- enthalpy,
- entropy,
- density,
- temperature,
- viskosity,
- etc.

Does anybody of you know, if there are interfaces to transfer data from Excel to OpenModelica?
Regards
Georg

P.S. If anybody needs a fluid properties data base as well, you are wellcome to build it with me together.

Sep-29-11 17:51:36
code not evaluated by OM / incomprehensible ERROR message

Thank you for your effort!

I am  sorry haven't seen your reply so far. I use the 1.7 version. I ment, that "elseif" isn't marked in extra colors, that's why I thought it isn't a keyword.

Regards Georg

Sep-06-11 15:47:17
code not evaluated by OM / incomprehensible ERROR message

Hello sjoelund.se,

many thanks for replying so quickly! Now it's working, I wanted to try with "elseif" before, but it wasn't marked as red in the editor, e.g. like "else if".

Regards
Georg

Sep-06-11 14:05:20
code not evaluated by OM / incomprehensible ERROR message

Hello everybody,


I would like to evaluate the class below, but OpenModelica always gives me the message:
[<interactive>:33:1-33:4:writeable] Error: No viable alternative near token: end

Following the advice it might has something to do with the last phrase "end cpW;", but I see no error there. Any ideas of yours? Thank you very much!!


code:


class cpW

//specific isobaric heat capacity of water or steam
//cpW in kJ/(kg K)
//temperature in K
//pressure in bar
//cpW = -1: temperature and/or pressure outside range

extends pSatW;
extends cpreg1;
extends cpreg2;
extends cpreg3;
extends pBound;
extends tBound;
extends densreg3;
parameter Real temperature;
parameter Real pressure;
Real density;
Real cpW;

equation
if (temperature >= 273.15) and (temperature <= 623.15) and (pressure >= pSatW) and (pressure <= 1000.00) then
cpW = cpreg1; //region 1
else if (temperature >= 273.15 and temperature <= 623.15 and pressure > 0 and pressure <= pSatW) or (temperature >= 623.15 and temperature <= 863.15 and pressure > 0 and pressure <= pBound) or (temperature >= 863.15 and temperature <= 1073.15 and pressure > 0 and pressure <= 1000.00) then
cpW = cpreg2; //region 2
else if temperature >= 623.15 and temperature <= tBound and pressure >= pBound and pressure <= 1000.00 then
density = densreg3; //region 3
cpW = cpreg3;
else
cpW = -1.00; //outside range
end if;

end cpW;

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