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

Issue3618 air filter #3986

Merged
merged 15 commits into from
Nov 20, 2024

Conversation

SenHuang19
Copy link

This PR addresses the comments.

@SenHuang19
Copy link
Author

@JayHuLBL Could you please review this PR?

@@ -0,0 +1,27 @@
within Buildings.Fluid.AirFilters.BaseClasses.Characteristics;
record filtrationEfficiencyParameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change name to FiltrationEfficiencyParameters

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The record name has been changed.

@@ -0,0 +1,27 @@
within Buildings.Fluid.AirFilters.BaseClasses.Characteristics;
record filtrationEfficiencyParameters
"Record for filtration efficiency vs. relative mass of the contaminant captured by the filter"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use versus, rather than vs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace versus with vs.

"Name of trace substance";
parameter
Buildings.Fluid.AirFilters.BaseClasses.Characteristics.filtrationEfficiencyParameters
filterationEfficiencyParameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may use shorter parameter name, like filEffPar

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace filterationEfficiencyParameters with filEffPar

<p>
The record contains one dataset:
relative mass of the contaminant
(see <a href=\"modelica://Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency\">
Copy link
Contributor

@JayHuLBL JayHuLBL Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it the right link to the right class? I think it should like to Buildings.Fluid.AirFilters.BaseClasses.Characteristics.filtrationEfficiencyParameters?

Or you may mean The record contains one dataset <Characteristics.filtrationEfficiencyParameters> for <Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency>?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the definition of the relative mass is provided in modelica://Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency.
I update the document to avoid confusions.

annotation (Documentation(info="<html>
<p>
Data record that describes the relative mass of the contaminant captured by the filter <code>rat</code> versus
the filtration efficiency <code>eps</code>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data record that describes the relative mass of the contaminant <code>rat</code> captured by the filter when it has the filtration efficiency specified as <code>eps</code>.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update it as suggested

extends Modelica.Icons.Record;
parameter Real mCon_nominal(
final unit = "kg")
"Maximum mass of the contaminant can be captured by the filter";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maximum mass of the contaminant that can be ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the typo.

"Relative mass of the contaminant captured by the filter"
annotation (Placement(transformation(extent={{100,40},{140,80}})));

Copy link
Contributor

@JayHuLBL JayHuLBL Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a protected section to find out the total types of the contaminant

protected
  parameter Integer nConSub = size(per.substanceName,1) "Total types of contaminant substances";

and then
change above y[size(per.substanceName,1) to y[nConSub], and below the for loop.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it as suggested

"Maximum mass of the contaminant captured by the filter";
parameter Integer nin(
min=1)=1
"Number of input connections";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you mean the total types of contaminant substances? So can we change the nin to nConSub and change the comment to Total number of contaminant substance types?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it as suggested

parameter Integer nin(
min=1)=1
"Number of input connections";
parameter Buildings.Fluid.AirFilters.BaseClasses.Data.Generic per
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need to have the per parameter. We just need the nominal contaminant mass. Why don't we keep the mCon_nominal?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it as suggested

@@ -1,26 +1,28 @@
within Buildings.Fluid.AirFilters.BaseClasses;
model FlowCoefficientCorrection
"Component that calculates the flow coefficient correction factor"
parameter Real b
"Resistance coefficient";
parameter Buildings.Fluid.AirFilters.BaseClasses.Data.Generic per
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to instantiate the per parameter in the base class? I think it may be enough to have the per been instantiated only in the top level class, i.e. Buildings.Fluid.AirFilters.Empirical.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it as suggested

annotation (Placement(transformation(extent={{100,40},{140,80}})));

protected
parameter Real s1[:,:]= {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add the parameter nConSub in the protected section and defined it as nConSub=size(substanceName,1). This will avoid calculating the size(substanceName,1) multiple times.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it as suggested

</li>
<li>
The <code>extraPropertiesNames</code> has to be defined in the medium model.
when the <code>extraPropertiesNames</code> in the medium model don't contain all the contaminants
defined in the <code>per</code>.
</li>
</ul>
</html>", revisions="<html>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we reference for the model development?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a reference.

Copy link
Contributor

@JayHuLBL JayHuLBL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SenHuang19 Please see the inline comments.

@SenHuang19
Copy link
Author

@SenHuang19 Please see the inline comments.

Thanks a lot! I am working on addressing them now.

@JayHuLBL
Copy link
Contributor

@SenHuang19 Is it ready for review?

@SenHuang19
Copy link
Author

@SenHuang19 Is it ready for review?

@JayHuLBL Yes it is.

@JayHuLBL JayHuLBL merged commit 929e92b into lbl-srg:issue3618_airFilter Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

2 participants