Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
model Bug3783 | ||
replaceable package liquid = Modelica.Media.Water.StandardWater; | ||
Modelica.Fluid.Sources.FixedBoundary boundary(redeclare package Medium = liquid, p=100) annotation(Placement(visible = true, transformation(origin = {-26, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
annotation(uses(Modelica(version = "3.2.1"))); | ||
end Bug3783; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// name: Bug3783.mos [BUG #3783] | ||
// keywords: check that we keep the redeclare modifiers! | ||
// status: correct | ||
// | ||
|
||
loadFile("Bug3783.mo"); getErrorString(); | ||
list(Bug3783); getErrorString(); | ||
"remove modifiers except redeclares"; | ||
removeComponentModifiers(Bug3783,"boundary",true); getErrorString(); | ||
list(Bug3783); getErrorString(); | ||
setComponentModifierValue(Bug3783, boundary.p, $Code(=10e5)); getErrorString(); | ||
getComponentModifierNames(Bug3783,"boundary"); getErrorString(); | ||
getComponentModifierValue(Bug3783,boundary.p); getErrorString(); | ||
list(Bug3783); getErrorString(); | ||
|
||
// Result: | ||
// true | ||
// "" | ||
// "model Bug3783 | ||
// replaceable package liquid = Modelica.Media.Water.StandardWater; | ||
// Modelica.Fluid.Sources.FixedBoundary boundary(redeclare package Medium = liquid, p = 100) annotation(Placement(visible = true, transformation(origin = {-26, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
// annotation(uses(Modelica(version = \"3.2.1\"))); | ||
// end Bug3783;" | ||
// "" | ||
// "remove modifiers except redeclares" | ||
// true | ||
// "" | ||
// "model Bug3783 | ||
// replaceable package liquid = Modelica.Media.Water.StandardWater; | ||
// Modelica.Fluid.Sources.FixedBoundary boundary(redeclare package Medium = liquid) annotation(Placement(visible = true, transformation(origin = {-26, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
// annotation(uses(Modelica(version = \"3.2.1\"))); | ||
// end Bug3783;" | ||
// "" | ||
// Ok | ||
// "" | ||
// {"p"} | ||
// "" | ||
// 10e5 | ||
// "" | ||
// "model Bug3783 | ||
// replaceable package liquid = Modelica.Media.Water.StandardWater; | ||
// Modelica.Fluid.Sources.FixedBoundary boundary(redeclare package Medium = liquid, p = 10e5) annotation(Placement(visible = true, transformation(origin = {-26, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
// annotation(uses(Modelica(version = \"3.2.1\"))); | ||
// end Bug3783;" | ||
// "" | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters