Buildings.Fluid.AirFilters.BaseClasses

Package with base classes for Buildings.Fluid.AirFilters

Information

This package contains base classes that are used to construct the models in Buildings.Fluid.AirFilters.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency FiltrationEfficiency Filtration efficiencies for capturing each contaminant
Buildings.Fluid.AirFilters.BaseClasses.FlowCoefficientCorrection FlowCoefficientCorrection Flow coefficient correction factor due to the contaminant accumulation
Buildings.Fluid.AirFilters.BaseClasses.MassAccumulation MassAccumulation Mass of the contaminants capatured by the filter
Buildings.Fluid.AirFilters.BaseClasses.MassTransfer MassTransfer Component that sets the trace substance at the filter outlet
Buildings.Fluid.AirFilters.BaseClasses.PressureDropWithVaryingFlowCoefficient PressureDropWithVaryingFlowCoefficient Flow resistance with a varying flow coefficient
Buildings.Fluid.AirFilters.BaseClasses.Validation Validation Collection of models that illustrate model use and test models

Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency

Filtration efficiencies for capturing each contaminant

Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency

Information

This model calculates the filtration efficiency, eps, using cubic Hermite spline interpolation of the filter dataset (see Buildings.Fluid.AirFilters.Data.Characteristics.FiltrationEfficiencyParameters) with respect to the input rat.

The rat is the relative mass of the contaminant that is captured by the filter, and is calculated by

rat = mCon/mCon_max,

where mCon is the mass of all the captured contaminants, and mCon_max is the maximum mass of the contaminants that can be captured.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
MassmCon_max Maximum mass of the contaminant that can be captured by the filter [kg]
StringnamCon[:] Name of trace substance
FiltrationEfficiencyParametersfilEffPar[nConSub] Filtration efficiency versus relative mass of the contaminant

Connectors

TypeNameDescription
input RealInputmConMass of the contaminant captured by the filter [kg]
output RealOutputy[nConSub]Filtration efficiency of each contaminant [1]
output RealOutputratRelative mass of the contaminant captured by the filter, which is the total captured contaminant mass divided by the filter's maximum contaminant capacity [1]

Modelica definition

model FiltrationEfficiency "Filtration efficiencies for capturing each contaminant" extends Modelica.Blocks.Icons.Block; parameter Modelica.Units.SI.Mass mCon_max "Maximum mass of the contaminant that can be captured by the filter"; parameter String namCon[:] "Name of trace substance"; parameter Buildings.Fluid.AirFilters.Data.Characteristics.FiltrationEfficiencyParameters filEffPar[nConSub] "Filtration efficiency versus relative mass of the contaminant"; Buildings.Controls.OBC.CDL.Interfaces.RealInput mCon( final unit="kg") "Mass of the contaminant captured by the filter"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput y[nConSub]( each final unit="1", each final min=0, each final max=1) "Filtration efficiency of each contaminant"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput rat( final unit="1", final min=0) "Relative mass of the contaminant captured by the filter, which is the total captured contaminant mass divided by the filter's maximum contaminant capacity"; protected parameter Integer nConSub = size(namCon,1) "Total types of contaminant substances"; parameter Real filRat[:,:]=filEffPar.rat "Relative mass of captured contaminant"; parameter Real filEps[:,:]=filEffPar.eps "Filtration efficiency"; equation rat = mCon/mCon_max "Relative mass of the contaminant captured by the filter"; for i in 1:nConSub loop y[i] = Buildings.Utilities.Math.Functions.smoothLimit( Buildings.Utilities.Math.Functions.smoothInterpolation( x=rat, xSup=filRat[i,:], ySup=filEps[i,:]), 0, 1, 1E-3) "Calculate the filtration efficiency"; end for; end FiltrationEfficiency;

Buildings.Fluid.AirFilters.BaseClasses.FlowCoefficientCorrection Buildings.Fluid.AirFilters.BaseClasses.FlowCoefficientCorrection

Flow coefficient correction factor due to the contaminant accumulation

Buildings.Fluid.AirFilters.BaseClasses.FlowCoefficientCorrection

Information

This model calculates the flow coefficient of the filter by

dpCor = brat,

where b is the flow resistance coefficient, which must be greater than 1, rat is the relative mass of the contaminant that is captured by the filter as described in Buildings.Fluid.AirFilters.BaseClasses.FiltrationEfficiency.

References

Qiang Li ta al., (2022). Experimental study on the synthetic dust loading characteristics of air filters. Separation and Purification Technology 284 (2022), 120209.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Realb2.0Resistance coefficient

Connectors

TypeNameDescription
input RealInputratRelative mass of the contaminant captured by the filter. It's the total captured contaminant mass divided by the filter's maximum contaminant capacity [1]
output RealOutputyFlow coefficient correction [1]

Modelica definition

model FlowCoefficientCorrection "Flow coefficient correction factor due to the contaminant accumulation" extends Modelica.Blocks.Icons.Block; parameter Real b(min=1)=2.0 "Resistance coefficient"; Buildings.Controls.OBC.CDL.Interfaces.RealInput rat( final unit="1", final min=0, final max=1) "Relative mass of the contaminant captured by the filter. It's the total captured contaminant mass divided by the filter's maximum contaminant capacity"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput y( final unit="1", final min=1) "Flow coefficient correction"; initial equation assert(b>1, "In " + getInstanceName() + ":The resistance coefficient must be larger than 1", level = AssertionLevel.error) "Validate the resistance coefficient"; equation y=b^rat; end FlowCoefficientCorrection;

Buildings.Fluid.AirFilters.BaseClasses.MassAccumulation Buildings.Fluid.AirFilters.BaseClasses.MassAccumulation

Mass of the contaminants capatured by the filter

Buildings.Fluid.AirFilters.BaseClasses.MassAccumulation

Information

This model mimics the process for a filter to capture the contaminants. The mass of the contaminants, mCon, increases over time. However, when the input signal uRep changes from false to true, mCon is reset to mCon_start.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
IntegernConSub1Total number of contaminant substance types
MassmCon_max Maximum mass of the contaminant that can be captured by the filter [kg]
MassmCon_start Initial contaminant mass of the filter after replacement [kg]

Connectors

TypeNameDescription
input RealInputmCon_flow[nConSub]Contaminant mass flow rate [kg/s]
input BooleanInputuRepSwitch to true to replace the filter and reset the accumulation
output BooleanOutputyRepTrue if the filter is full and should be replaced
output RealOutputmConMass of the contaminant captured by the filter [kg]

Modelica definition

model MassAccumulation "Mass of the contaminants capatured by the filter" extends Modelica.Blocks.Icons.Block; parameter Integer nConSub( final min=1)=1 "Total number of contaminant substance types"; parameter Modelica.Units.SI.Mass mCon_max "Maximum mass of the contaminant that can be captured by the filter"; parameter Modelica.Units.SI.Mass mCon_start(final min=0) "Initial contaminant mass of the filter after replacement"; Buildings.Controls.OBC.CDL.Interfaces.RealInput mCon_flow[nConSub]( each final unit="kg/s") "Contaminant mass flow rate"; Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uRep "Switch to true to replace the filter and reset the accumulation"; Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput yRep "True if the filter is full and should be replaced"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput mCon( final unit = "kg") "Mass of the contaminant captured by the filter"; protected Buildings.Controls.OBC.CDL.Reals.IntegratorWithReset intWitRes( final k=1, final y_start=mCon_start) "Calculate the mass of contaminant"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant mStart( final k = mCon_start) "Constant for start value of contaminants"; Buildings.Controls.OBC.CDL.Reals.Greater notFul(final h=0.01*mCon_max) "Check if the filter is full"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant mMax( final k = mCon_max) "Constant for maximum filter concentration"; Buildings.Controls.OBC.CDL.Reals.MultiSum mulSum( final nin=nConSub) "Summation of the inputs"; Buildings.Controls.OBC.CDL.Logical.Not ful "Check if the filter is full"; Buildings.Controls.OBC.CDL.Logical.Edge edg "Edge for triggering filter reset"; equation connect(mStart.y, intWitRes.y_reset_in); connect(notFul.u2, intWitRes.y); connect(mMax.y, notFul.u1); connect(mulSum.y, intWitRes.u); connect(mulSum.u, mCon_flow); connect(notFul.y, ful.u); connect(ful.y, yRep); connect(edg.u, uRep); connect(edg.y, intWitRes.trigger); connect(intWitRes.y, mCon); end MassAccumulation;

Buildings.Fluid.AirFilters.BaseClasses.MassTransfer Buildings.Fluid.AirFilters.BaseClasses.MassTransfer

Component that sets the trace substance at the filter outlet

Buildings.Fluid.AirFilters.BaseClasses.MassTransfer

Information

This model sets the trace substance of the medium that leaves port_b by

port_b.C_outflow = inStream(port_a.C_outflow) - eps * C_inflow;

where eps is an input mass transfer efficiency and C_inflow is an input trace substance rate.

This model has no pressure drop.

Extends from Buildings.Fluid.Interfaces.PartialTwoPort (Partial component with two ports).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
StringnamCon[:] Name of contaminant substance
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input RealInputeps[nConSub]Filtration efficiency of each contaminant [1]
output RealOutputmCon_flow[nConSub]Contaminant mass flow rate [kg/s]

Modelica definition

model MassTransfer "Component that sets the trace substance at the filter outlet" extends Buildings.Fluid.Interfaces.PartialTwoPort; parameter String namCon[:] "Name of contaminant substance"; Buildings.Controls.OBC.CDL.Interfaces.RealInput eps[nConSub]( each final unit = "1", each final min = 0, each final max= 1) "Filtration efficiency of each contaminant"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput mCon_flow[nConSub]( each final unit = "kg/s") "Contaminant mass flow rate"; protected parameter Integer nConSub=size(namCon,1) "Total types of contaminant substances"; parameter Real s[:,:]={ {if (Modelica.Utilities.Strings.isEqual(string1=Medium.extraPropertiesNames[i], string2=namCon[j], caseSensitive=false)) then 1 else 0 for i in 1:nConSub} for j in 1:Medium.nC} "Vector to check if the trace substances in the medium are included in the performance dataset"; initial equation assert(abs(sum(s) - nConSub) < 0.1, "In " + getInstanceName() + ": Some specified trace substances are not present in medium '" + Medium.mediumName + "'.\n" + "Check filter parameter and medium model.", level = AssertionLevel.error) "Check if all the specified substances are included in the medium"; equation // Modify the substances individually. for i in 1:Medium.nC loop if max(s[i]) > 0.9 then for j in 1:nConSub loop if s[i,j]>0.9 then port_b.C_outflow[i]=inStream(port_a.C_outflow[i])*(1 - eps[j] * s[i,j]); port_a.C_outflow[i]=inStream(port_a.C_outflow[i]); mCon_flow[j]=inStream(port_a.C_outflow[j])* eps[j]; end if; end for; else port_b.C_outflow[i]=inStream(port_a.C_outflow[i]); port_a.C_outflow[i]=inStream(port_b.C_outflow[i]); end if; end for; // Mass balance (no storage). port_a.Xi_outflow=inStream(port_b.Xi_outflow); port_b.Xi_outflow=inStream(port_a.Xi_outflow); port_a.m_flow =-port_b.m_flow; // Pressure balance (no pressure drop). port_a.p=port_b.p; // Energy balance (no heat exchange). port_a.h_outflow=inStream(port_b.h_outflow); port_b.h_outflow=inStream(port_a.h_outflow); end MassTransfer;

Buildings.Fluid.AirFilters.BaseClasses.PressureDropWithVaryingFlowCoefficient Buildings.Fluid.AirFilters.BaseClasses.PressureDropWithVaryingFlowCoefficient

Flow resistance with a varying flow coefficient

Buildings.Fluid.AirFilters.BaseClasses.PressureDropWithVaryingFlowCoefficient

Information

Model of a flow resistance with a varying flow coefficient.

This block is implemented based on Buildings.Fluid.FixedResistances.PressureDrop and inherits most of its configuration. However, its mass flow rate is calculated differently by using

m_flow / √dp = m_flow_nominal / (√dp_nominal*dpCor),

where dpCor is a correction factor of the flow coefficient. Therefore, if dpCor=1.2, at the nominal mass flow rate m_flow_nominal, there will be 20% more pressure drop than dp_nominal.

Extends from Buildings.Airflow.Multizone.BaseClasses.PartialOneWayFlowElement (Partial model for flow resistance with one-way flow), Buildings.Airflow.Multizone.BaseClasses.PowerLawResistanceParameters (Power law resistance parameters).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
MassFlowRatem_flowif Modelica.Math.isEqual(m, ...Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s]
Realm0.85Flow exponent, m=0.5 for turbulent, m=1 for laminar
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Pressure difference of clean filter at m_flow_nominal [Pa]
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanforceErrorControlOnFlowtrueFlag to force error control on m_flow. Set to true if interested in flow rate
BooleanuseDefaultPropertiestrueSet to false to use density and viscosity based on actual medium state, rather than using default values
PressureDifferencedp_turbulent0.1Pressure difference where laminar and turbulent flow relation coincide. Recommended = 0.1 [Pa]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input RealInputdpCorFlow coefficient correction factor [1]

Modelica definition

model PressureDropWithVaryingFlowCoefficient "Flow resistance with a varying flow coefficient" extends Buildings.Airflow.Multizone.BaseClasses.PartialOneWayFlowElement( m_flow= if Modelica.Math.isEqual(m, 0.5, 1E-10) then rho_default/(dpCor^m)*Buildings.Airflow.Multizone.BaseClasses.powerLaw05( C=C, dp=dp, a=a, b=b, c=c, d=d, dp_turbulent=dp_turbulent, sqrt_dp_turbulent=sqrt_dp_turbulent) else rho_default/(dpCor^m)*Buildings.Airflow.Multizone.BaseClasses.powerLawFixedM( C=C, dp=dp, m=m, a=a, b=b, c=c, d=d, dp_turbulent=dp_turbulent), final m_flow_small=1E-4*abs(m_flow_nominal)); extends Buildings.Airflow.Multizone.BaseClasses.PowerLawResistanceParameters( m = 0.85); parameter Modelica.Units.SI.PressureDifference dp_nominal(displayUnit="Pa") "Pressure difference of clean filter at m_flow_nominal"; Buildings.Controls.OBC.CDL.Interfaces.RealInput dpCor( final unit = "1", final min = 1) "Flow coefficient correction factor"; protected parameter Real k=m_flow_nominal/(dp_nominal^m) "Flow coefficient, k = m_flow/ dp^m"; parameter Real C=k/rho_default "Flow coefficient, C = V_flow/dp^m"; end PressureDropWithVaryingFlowCoefficient;