Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional declaration in AirvolumeMixed #167

Open
MatthewSZhang opened this issue Nov 19, 2021 · 0 comments
Open

Conditional declaration in AirvolumeMixed #167

MatthewSZhang opened this issue Nov 19, 2021 · 0 comments

Comments

@MatthewSZhang
Copy link

I found a conditional declaration of in BuildingSystems.Buildings.Airvolumes.AirvoumeMixed shown as:
"BuildingSystems.Buildings.Airvolumes.MixingVolumeMoistAir air(
redeclare package Medium = Medium,
geometryType=geometryType,
V=V,
m_flow_nominal=0.1,
nPorts=nAirpaths,
T_start=T_start[1],
X_start={x_start[1],1-x_start[1]},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) if
TSou == BuildingSystems.Buildings.Types.DataSource.Calculation
"Mixed air volume of moist air"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));"

Then the component 'air' is used in
" Modelica.Blocks.Sources.RealExpression pAir(
y=air.p)
annotation (Placement(transformation(extent={{44,50},{64,70}})));"

The issue is that Modelica Language Specification (Version 3.4), Section 4.4.5, said, "A component declared with a condition-attribute can only be modified and/or used in connections", but why when I tested it in BuildingSystems.Applications.HeatingSystems.WaterHeatingSystem, no error appears in Dymola.

Is it a bug in AirvolumeMixed, but Dymola for some reason bypasses it, or it is a correct usage of conditional declaration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant