- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Problems when running fluid exampls...
Problems when running fluid exampls in OMEditor
Problems when running fluid exampls in OMEditor
I am a beginner using OpenModelica. When I try to run the examples in fluid on OMEditor, I cannot run those examples with pipe component in them. Here is the error message shows up every time:
"Translation 13:00:20 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_nominal has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else 1000.0 * pipe.flowModel.dp_small) as default value
Translation 13:00:20 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else system.dp_small) as default value
Translation 13:00:20 0:0-0:0 Error building simulator. Build log: gcc -I"C:/OpenModelica1.9.0//include/omc" -O0 -falign-functions -msse2 -mfpmath=sse -c -o Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.o Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c: In function 'omc_Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX':
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: 'Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_setState__pTX_rettype' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: (Each undeclared identifier is reported only once
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: for each function it appears in.)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: expected ';' before 'tmp3'
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:18: error: 'Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density_rettype' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:18: error: expected ';' before 'tmp4'
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:25: error: 'tmp3' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:26: error: 'tmp4' undeclared (first use in this function)
mingw32-make: *** [Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX] Error 1
Translation 13:00:20 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1551:22-1551:73 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else system.dp_small) as default value
Translation 13:00:20 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1551:22-1551:73 Parameter dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else system.dp_small) as default value"
Also the OMEditor prevents me from connecting any other components with pipe, showing the following error message:
"Translation 12:52:15 0:0-0:0 Error occurred while flattening model test
Translation 12:52:15 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Media\package.mo 4285:17-4410:23 Illegal to instantiate partial class BaseProperties
Translation 12:52:15 0:0-0:0 Error building simulator. Build log: gcc -I"C:/OpenModelica1.9.0//include/omc" -O0 -falign-functions -msse2 -mfpmath=sse -c -o Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.o Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c: In function 'omc_Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX':
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:17: error: 'Modelica_Fluid_Vessels_OpenTank_Medium_setState__pTX_rettype' undeclared (first use in this function)
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:17: error: (Each undeclared identifier is reported only once
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:17: error: for each function it appears in.)
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:17: error: expected ';' before 'tmp3'
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:18: error: 'Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy_rettype' undeclared (first use in this function)
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:18: error: expected ';' before 'tmp4'
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:25: error: 'tmp3' undeclared (first use in this function)
Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX.c:26: error: 'tmp4' undeclared (first use in this function)
mingw32-make: *** [Modelica_Fluid_Vessels_OpenTank_Medium_specificEnthalpy__pTX] Error 1
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Interfaces.mo 541:7-541:61 No corresponding 'inner' declaration found for component .Modelica.Fluid.System tank.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: Modelica.Fluid.Vessels.OpenTank.
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.
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_nominal has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else 1000.0 * pipe.flowModel.dp_small) as default value
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else pipe.flowModel.system.dp_small) as default value
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_nominal has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else 1000.0 * pipe.flowModel.dp_small) as default value
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else pipe.flowModel.system.dp_small) as default value
Translation 12:52:16 0:0-0:0 Error building simulator. Build log: gcc -I"C:/OpenModelica1.9.0//include/omc" -O0 -falign-functions -msse2 -mfpmath=sse -c -o Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.o Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c: In function 'omc_Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX':
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: 'Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_setState__pTX_rettype' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: (Each undeclared identifier is reported only once
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: for each function it appears in.)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: expected ';' before 'tmp3'
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:18: error: 'Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density_rettype' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:18: error: expected ';' before 'tmp4'
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:25: error: 'tmp3' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:26: error: 'tmp4' undeclared (first use in this function)
mingw32-make: *** [Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX] Error 1
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Interfaces.mo 1044:9-1044:63 No corresponding 'inner' declaration found for component .Modelica.Fluid.System pipe.flowModel.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: Modelica.Fluid.Pipes.StaticPipe.FlowModel.
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.
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1551:22-1551:73 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else system.dp_small) as default value
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1551:22-1551:73 Parameter dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else system.dp_small) as default value
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Interfaces.mo 1044:9-1044:63 No corresponding 'inner' declaration found for component .Modelica.Fluid.System pipe.flowModel.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: Modelica.Fluid.Pipes.StaticPipe.FlowModel.
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.
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_nominal has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else 1000.0 * pipe.flowModel.dp_small) as default value
Translation 12:52:16 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else pipe.flowModel.system.dp_small) as default value
Translation 12:52:17 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_nominal has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else 1000.0 * pipe.flowModel.dp_small) as default value
Translation 12:52:17 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1336:17-1349:92 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if pipe.flowModel.system.use_eps_Re then 1.0 else pipe.flowModel.system.dp_small) as default value
Translation 12:52:17 0:0-0:0 Error building simulator. Build log: gcc -I"C:/OpenModelica1.9.0//include/omc" -O0 -falign-functions -msse2 -mfpmath=sse -c -o Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.o Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c: In function 'omc_Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX':
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: 'Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_setState__pTX_rettype' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: (Each undeclared identifier is reported only once
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: for each function it appears in.)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:17: error: expected ';' before 'tmp3'
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:18: error: 'Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density_rettype' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:18: error: expected ';' before 'tmp4'
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:25: error: 'tmp3' undeclared (first use in this function)
Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX.c:26: error: 'tmp4' undeclared (first use in this function)
mingw32-make: *** [Modelica_Fluid_Pipes_StaticPipe_FlowModel_Medium_density__pTX] Error 1
Translation 12:52:17 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Interfaces.mo 1044:9-1044:63 No corresponding 'inner' declaration found for component .Modelica.Fluid.System pipe.flowModel.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: Modelica.Fluid.Pipes.StaticPipe.FlowModel.
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.
Translation 12:52:17 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1551:22-1551:73 Parameter pipe.flowModel.dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else system.dp_small) as default value
Translation 12:52:17 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Pipes.mo 1551:22-1551:73 Parameter dp_small has no value, and is fixed during initialization (fixed=true), using available start value (start=if system.use_eps_Re then 1.0 else system.dp_small) as default value
Translation 12:52:17 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Interfaces.mo 1044:9-1044:63 No corresponding 'inner' declaration found for component .Modelica.Fluid.System pipe.flowModel.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: Modelica.Fluid.Pipes.StaticPipe.FlowModel.
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.
Translation 12:52:17 0:0-0:0 Error building simulator. Build log: gcc -I"C:/OpenModelica1.9.0//include/omc" -O0 -falign-functions -msse2 -mfpmath=sse -c -o Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.o Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c: In function 'omc_Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX':
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:17: error: 'Modelica_Fluid_Interfaces_FluidPort__b_Medium_setState__pTX_rettype' undeclared (first use in this function)
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:17: error: (Each undeclared identifier is reported only once
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:17: error: for each function it appears in.)
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:17: error: expected ';' before 'tmp3'
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:18: error: 'Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy_rettype' undeclared (first use in this function)
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:18: error: expected ';' before 'tmp4'
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:25: error: 'tmp3' undeclared (first use in this function)
Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX.c:26: error: 'tmp4' undeclared (first use in this function)
mingw32-make: *** [Modelica_Fluid_Interfaces_FluidPort__b_Medium_specificEnthalpy__pTX] Error 1
Translation 12:52:17 0:0-0:0 Error building simulator. Build log: gcc -I"C:/OpenModelica1.9.0//include/omc" -O0 -falign-functions -msse2 -mfpmath=sse -c -o Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.o Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c: In function 'omc_Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX':
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:17: error: 'Modelica_Fluid_Interfaces_FluidPort__a_Medium_setState__pTX_rettype' undeclared (first use in this function)
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:17: error: (Each undeclared identifier is reported only once
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:17: error: for each function it appears in.)
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:17: error: expected ';' before 'tmp3'
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:18: error: 'Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy_rettype' undeclared (first use in this function)
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:18: error: expected ';' before 'tmp4'
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:25: error: 'tmp3' undeclared (first use in this function)
Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX.c:26: error: 'tmp4' undeclared (first use in this function)
mingw32-make: *** [Modelica_Fluid_Interfaces_FluidPort__a_Medium_specificEnthalpy__pTX] Error 1
Translation 12:52:17 C:\OpenModelica1.9.0\lib\omlibrary\Modelica 3.2.1\Fluid\Interfaces.mo 223:5-223:64 No corresponding 'inner' declaration found for component .Modelica.Fluid.System pipe.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: Modelica.Fluid.Pipes.StaticPipe.
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."
Looks like there is a bug of addressing wrong address in the pipe component.
Is there any one may be able to tell me which part goes wrong and how to fix it?
Thanks!
Re: Problems when running fluid exampls in OMEditor
Hi,
Try the latest nightly build:
https://build.openmodelica.org/omc/buil … ly-builds/
Media & Fluid libraries required a special flag +d=scodeInstShortcut to work but that need was removed since yesterday.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Problems when running fluid exampls in OMEditor
Hi, Adrian
Thanks for your reply.
With the latest version you provided, the examples work well.
However when I try to build a model connecting a pipe and other components (ie. a open tank), the OMEditor still does not allow me to connect, and gives the same error message. Is there anything I am missing?
And, can I definite a medium in the OMEditor graphic layer? or I have to do it in coding?
Thanks
Re: Problems when running fluid exampls in OMEditor
Hi,
You will need to define a proper medium (not PartialMedium) with coding as far as I know.
OMEdit does not yet handle replaceable classes.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Problems when running fluid exampls...