Skip to content

Commit

Permalink
sim.Cs as default (quite major change)
Browse files Browse the repository at this point in the history
After long discussion among MZ airflow modellers it was proposed to use sim.Cs as default value for all surfaces also in the 2-port implementation.

I included an override in the siminfomanager  and outer surfaces to go back to the variable Cs implementation in combination with 2-port.
  • Loading branch information
kldjonge committed Jan 18, 2024
1 parent 61abf4e commit 4392a5b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
3 changes: 3 additions & 0 deletions IDEAS/BoundaryConditions/Interfaces/PartialSimInfoManager.mo
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ partial model PartialSimInfoManager
annotation(Dialog(enable=interZonalAirFlowType<>
IDEAS.BoundaryConditions.Types.InterZonalAirFlow.None or unify_n50,group="Interzonal airflow"));

parameter Boolean use_sim_Cs =true "if checked, the default Cs of each surface in the building is sim.Cs"
annotation(choices(checkBox=true),Dialog(group="Wind"));

parameter Modelica.Units.SI.Length H=10 "Building or roof height"
annotation (Dialog(group="Wind"));
parameter Real A0=0.6 "Local terrain constant. 0.6 for Suburban,0.35 for Urban and 1 for Unshielded (Ashrae 1993) "
Expand Down
10 changes: 6 additions & 4 deletions IDEAS/Buildings/Components/OuterWall.mo
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ model OuterWall "Opaque building envelope construction"
parameter Boolean use_custom_Cs = false
"if checked, Cs will be used instead of the default related to the interzonal airflow type "
annotation(Evaluate=true, choices(checkBox=true),Dialog(enable=true,tab="Airflow", group="Wind Pressure"));

parameter Boolean use_sim_Cs =sim.use_sim_Cs "if checked, the default Cs of each surface in the building is sim.Cs"
annotation(choices(checkBox=true),Dialog(enable=not use_custom_Cs,tab="Airflow", group="Wind Pressure"));

parameter Real Cs=sim.Cs
"Wind speed modifier"
annotation (Dialog(enable=use_custom_Cs,tab="Airflow", group="Wind Pressure"));
Expand Down Expand Up @@ -104,10 +108,8 @@ protected
final table=coeffsCp,
final azi=aziInt,
Cs=if not use_custom_Cs and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
then sim.Cs_coeff*(Habs^(2*sim.a))
elseif not use_custom_Cs
then sim.Cs
else Cs,
and not use_sim_Cs then sim.Cs_coeff*(Habs^(2*sim.a)) elseif not
use_custom_Cs then sim.Cs else Cs,
Habs=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
then Habs else sim.HPres,
nPorts=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.OnePort
Expand Down
9 changes: 5 additions & 4 deletions IDEAS/Buildings/Components/Window.mo
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ model Window "Multipane window"
"if checked, Cs will be used in stead of the default related to the interzonal airflow type "
annotation(choices(checkBox=true),Dialog(enable=true,tab="Airflow", group="Wind Pressure"));

parameter Boolean use_sim_Cs =sim.use_sim_Cs "if checked, the default Cs of each surface in the building is sim.Cs"
annotation(choices(checkBox=true),Dialog(enable=not use_custom_Cs,tab="Airflow", group="Wind Pressure"));

parameter Real Cs=sim.Cs
"Wind speed modifier"
annotation (Dialog(enable=use_custom_Cs,tab="Airflow", group="Wind Pressure"));
Expand Down Expand Up @@ -246,10 +249,8 @@ protected
IDEAS.Fluid.Sources.OutsideAir outsideAir(
redeclare package Medium = Medium,
Cs=if not use_custom_Cs and sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
then sim.Cs_coeff*(Habs^(2*sim.a))
elseif not use_custom_Cs
then sim.Cs
else Cs,
and not use_sim_Cs then sim.Cs_coeff*(Habs^(2*sim.a)) elseif not
use_custom_Cs then sim.Cs else Cs,
Habs=if sim.interZonalAirFlowType == IDEAS.BoundaryConditions.Types.InterZonalAirFlow.TwoPorts
then Habs else sim.HPres,
final azi = aziInt,
Expand Down

0 comments on commit 4392a5b

Please sign in to comment.