- Index
- » Users
- » Fonte
- » Profile
Posts
Posts
Hello to everyone,
I have an equation where the unknown variable is T a temperature. I don't know why but when I launch the simulation I have a negative solution
I have defined the variable in this way
Modelica.SIunits.Temperature T(start=Modelica.Constants.T_zero+20,min=273.15);
I'm wondering if this is this one is the right way to constrain a variable to belong to the range [273, [
Thanks a lot
the temperature type is defined in this way
type ThermodynamicTemperature = Real (
final quantity="ThermodynamicTemperature",
final unit="K",
min = 0,
displayUnit="degC")
I'm wondering why if I run that code in OpenModelica 1.5.0 and then in Dymola 7.4 (with visual studio 2008)
I have different results
model tentative
Real a(start=0);
Real T=0.1;
Real a_steady(start=0);
algorithm
a_steady:=a_steady+1;
equation
der(a)=(a_steady-a)/T;
end tentative;
with the same simulation parameter
with openmodelica a_steady fast grows for each time step of the simulation, instead with dymola a_steady remains constantly to 1, and a has a few growing.
instead in dymola the system behaves like a_steady=1 for all the simulation.
can anyone help me to understand, please?
what is it supposed to be the normal behavior? the one of dymola or the one of openmodelica?
It can be the compiler, isn't it?
c'est werid for me.
thanks for your time
have good day
here are the pictures
http://www.mypicx.com/09032010/modelica/
I've some problems to attach them I don't know the reason
How would you write it?
if you have to share a variable (coupling parameter) between two components, and this parameter can be modified by these components during the simulation.
a good day
Hello there,
I need to share a variable, beta_c, between two classes, which behave at two different packages Compressor and Turbine.
I put this variable as global (inner tag) in a class which behaves at a package, Turbocharger, which contains the two package Compressor and Turbine.
So the class in Compressor and Turbine, are able to reference to it by the tag outer.
I have some doubt, if I did that in the right way,
this is the code:
I'm wondering
package Turbocharger
partial class Coupling Parameters
inner Real beta_c (start=0.1);
end Coupling Parameters;
package Turbine
......
class TurbineQpTW
outer Real beta_c (start=0.1);
equation
..............
beta_c = .........;
..............
end TurbineQpTW;
......
end Turbine;
package Compressor
...........................
class CompressorQpTW
...........................
outer Real beta_c (start=0.1);
...........................
end CompressorQpTW;
...........................
end Compressor;
end Turbocharger;
I'm wondering why when I try to compile I receive every-time this message:
This class has a top-level outer beta_c, you can use this class as a sub-component.
You have to add an inner element when using this.
component context: beta_c
component declared as Real beta_c
I'm wondering if it should be better if I put this variable like an input for the compressor and an input and an output for the turbine. The variable beta_c is modified only in the turbine, but I'm not able to predict the causality of this system, that is to say I don't know if the compressor will be the first to work or it will be the turbine
have a good day
thank you
I want to use the Pulse signal generator block, inside my model,
model PowerConsumerMod "Model of the dynamics of the load"
import SI = Modelica.SIunits;
import SO = Modelica.Blocks.Sources;
parameter SI.Time tau_circuit_eau=2400; // s
SI.Power pow_ech(start=380); // kW
SO.Pulse pulse(amplitude(quantity=380), width(quantity=10)); // real [kW}
SI.Power pow_bias=240; // kW
SI.Power pow_ref=pulse.y+pow_bias; // kW
equation
d(pow_ech) = (1/tau_circuit_eau)*(pow_ref - pow_ech);
end PowerConsumerMod;
but when I tried to translate it, the compiler gave me back lots of warnings.
PowerPlant.PowerConsumer.PowerConsumerMod:
Warning: Type error.
Warning: Type error.
Warning: Found function d without explicit declaration in (model PowerPlant.PowerConsumer.PowerConsumerMod).
Warning: Type error.
Warning: Type error.
Warning: Type error.
In quantity attribute for pulse.amplitude.
Ignoring quantity attribute.
Used in component pulse.
Modelica Text: near line 6
Warning: Type error.
In quantity attribute for pulse.width.
Ignoring quantity attribute.
Used in component pulse.
Modelica Text: near line 6
Model having the same number of unknowns and equations: 6
WARNING: 7 warnings were issued
Are they normal? Can I ignore them? I didn't simulate it yet, but I'm just wondering if this warnings are normal
thanks
have a good day
I'm trying to define an array (with a fixed dimension) of instances of a class. for each instances I need to assign three parameters. These parameters have the same values for every instances.
Heater.Wood[N] woodInHeater(v=woodInput.v, rho=woodInput.rho, s0=s_0, h0=h_0);
So my way is that
it is correct, isn't it?
'cause every-time when I try to translate this code the compiler returns to me a warning
Warning: Automatically introducing 'each' in definition equation for:
woodinHeater[1].v
Examine the release notes on array of components
what is the correct way to write that, without generating warning?
thank
have good day
Hello there,
I need to write an equation and an algorithm (to assign a value to a variable) inside a for loop
is that possible?
for example something like that
for i: in 2: N loop
equation
der(s(i))=s(i)+a;
algorithm
a:=a+s;
end for;
I don't know when I try to compile itwhy I have some errors on the tags algorithm and end for.
Any suggestion?
i don't find that Readme
README-OMDev-MINGW.txt
I looed for it here
http://www.ida.liu.se/~adrpo/omc/omdev/mingw/
but nothing
where can I find it?
None can help me?
None already did that
I just need some additional details
Hello to everyone,
I'm trying to use the function debug available with MDT
http://www.ida.liu.se/~adrpo/mdt/mdt-0. … .jpg[/url]
First of all, can you confirm that I can use that to debug the code of a Modelica package (.mo files)?
I found and read this conversation
http://www.mail-archive.com/openmodelic … 00277.html
and I understood that I need to build first a debug version of Open Modelica compiler (omcd.exe) as it has been said here
"
You will also need to build a debug version of Open Modelica compiler.
In Eclipse you right-click on the project in the left hand side (Modelica Projects view), say Rebuild and in the variable input
window you write "debug" without the quotes. This will generate
an executable called omcd which contains debugging facilities.
"
But I tried to do that but it doesn't work.
Can anyone give more details to do that?
Wha is the project that I should compile? is it the source code of the compiler OMC or the one of the modelica package, that I want to do the debug?
Can I use VISUAL STUDIO 2010 express?
any advises?
thank you
good day
I wrote my lookuptable with 2 input
using some code available in the standard library Modelica.Blocks.Tables
and ModelicaAddition.Tables
Hello,
I need to create a lookup table, with the possibility to do the interpolation and the extrapolation?
I have found some stuff here
http://www.ida.liu.se/~pelab/realsim/li … ables.html for the lookup tables
http://www.ida.liu.se/~pelab/realsim/li … _Math.html for the interpolation
https://svn.modelica.org/projects/Model … s/Types.mo for the extrapolation
but unfortunately they are just sketches
Can you suggest how can I do it?
Should I start from scratch or there are available some more mature libraries to do that?
thank you so much
bye
How can I write a code of a square wave generator in Open Modelica?
I'd also like to know in what kind of structure S (the the dependent variable of the pde) is stored.
S is a matrix, isn't it?
So on the rows there is the S in function of time and on the columns there is S in function of the space, can it be?
I've asked that because I need to use the variable S into an integral made from space
I'm trying to describe a partial differential equation with modelica.
I've found some papers on Internet about method of lines, but I prefer the way used by Peter Fritzson in his book "Principles of object-oriented modeling and simulation with Modelica"
Unfortunately I don't have it yet, I've just made an order, for now I'm reading some parts on google books.
http://books.google.com/books?id=IzqY8A … mp;f=false
But I'm not able to sort out.
It's a simple equation a first order PDE
pdS/pdt=-v pdS/pdx -r/rho
It's exactly the same case of the section 8.5.2.2 pag 266
I've defined the model, then the record DomainLine1DGrid, the function Line1Dfunc, the record FieldLine1DGrid.
I've some problem to specify the 1D domain.
I need to define a domain as a region enclosed by two point.
I don't figure out how I can define the type DomainGe1D and the record GeomLine.
can I ask you your help?
does anyone have any idea?
so ... I should format my pc and reinstall all the stuffs.
I think it's better
while that is the contain of the file dcmotor.log
**************************
g++ -I"C:\OpenModelica1.5.0\/include" -msse2 -mfpmath=sse -I. -I"C:/OpenModelica1.5.0/testmodels" -o dcmotor.exe dcmotor.cpp -L"C:/OpenModelica1.5.0/testmodels" -lsim -L"C:\OpenModelica1.5.0\/lib" -lc_runtime -lf2c -lsendData -lQtNetwork-mingw -lQtCore-mingw -lQtGui-mingw -luuid -lole32 -lws2_32
/mingw/lib/libmingwex.a(pformat.o):pformat.c.text+0x1529): undefined reference to `__get_output_format'
collect2: ld returned 1 exit status
mingw32-make: *** [dcmotor] Error 1
**************************
and I don't have anything when I add getErrorString()
**********************
simulate(dcmotor,startTime=0.0,stopTime=10.0)
record SimulationResult
resultFile = "Simulation failed.
"
end SimulationResult;
>> getErrorString()
""
***************************
this is the result
it doesn't sound good for me
***************************************
C:\OpenModelica1.5.0\testmodels>..\bin\omc +showErrorMessages +d=failtrace sim_B
ouncingBall.mos
/*- CevalScript.cevalGenerateFunctionDAEs failed( loadFile )*/
/*- CevalScript.cevalGenerateFunction failed(loadFile)*/
/*- CevalScript.cevalGenerateFunctionDAEs failed( simulate )*/
/*- CevalScript.cevalGenerateFunction failed(simulate)*/
/*- CevalScript.cevalGenerateFunctionDAEs failed( plot )*/
/*- CevalScript.cevalGenerateFunction failed(plot)*/
/*- CevalScript.cevalGenerateFunctionDAEs failed( plot )*/
/*- CevalScript.cevalGenerateFunction failed(plot)*/
/*- CevalScript.cevalGenerateFunctionDAEs failed( system )*/
/*- CevalScript.cevalGenerateFunction failed(system)*/
'rm' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
true
""
record SimulationResult
resultFile = "Simulation failed.
"
end SimulationResult;
""
"No simulation result to plot."
"No simulation result to plot."
1
C:\OpenModelica1.5.0\testmodels>
***************************************
Bonjours,
from this morning for every simulation that I launch by omshell or omc
omc always return this message
""""""
Record SimulationResult
resultFile = "Simulation failed.
"
SimulationResult end;
""""""
for example on omcshell
"""""""""""""""""
>> Cd ("C: / OpenModelica1.5.0/testmodels)
"C: / OpenModelica1.5.0/testmodels"
>> LoadFile ("C: / OpenModelica1.5.0/testmodels/dcmotor.mo)
true
>> Simulated (dcmotor, startTime = 0.0, StopTime = 10.0)
Record SimulationResult
resultFile = "Simulation failed.
"
SimulationResult end;
""""""""""""""""""""""""
I can not figure out what's 'the problem?
Can someone help me?
I have already tried to uninstall openmodelica, to delete everything that was in the folder, to run ccleaner, to restart my system and to reinstall openmodelica but nothing is changed
What is it wrong please?
ps
I have Windows XP with Modelica open 105, and the eclipse with mdt simforge
So the support of MDT to the compiler OMC is in working progress, isn't it?
so
thank you for your time
Probably there was a misunderstanding
I have to write some code for a compressor of a cogeneration plant
I am interested in using OMC as interpreter to correct the errors in the code
cite
"
The compiler also includes a Model interpreter for interactive usage and constant expression evaluation.
"
http://www.openmodelica.org/index.php/d … /tools/135
all here
ps
keep in mind the I start to use modelica Thuday so I'm not sure if I'm approaching the task properly
I'm writing you because I've some problem with the integration of compiler omc in Eclipse with the plugin mdt.
I've downloaded and installed openmodelica 1.50 for windows xp, the environment variables are well settled at least I guess
OPENMODELICAHOME -> C:\OpenModelica1.5.0
and the I've download and installed eclipse with MDT from this weblink
http://www.ida.liu.se/~pelab/modelica/O … -0.7.3.zip
I've followed the instruction of this paper at page 63
http://www.ida.liu.se/labs/pelab/modeli … sGuide.pdf
and I've read this guide
http://openmodelica.ida.liu.se:8080/cb/ … oc_id=1389
Apparently everything is right, except that the compiler doesn't work, if I call it by Eclipse: following these steps Project -> build project
But when I try to build a project nothing happen, I also put some errors deliberately, but I don't receive any message from OMC
any suggestion?
- Index
- » Users
- » Fonte
- » Profile