Conversation
Reworked `aR` wrapping in `windPressureLowRise.mo` to use a floor-based modulo expression (`alpha - floor(alpha/pi2)*pi2`) instead of sign-flip + conditional reduction. This correctly handles negative and large angles for non-symmetrical profiles and simplifies the algorithm.
Introduce configurable outdoor pollutant inputs in `PartialSimInfoManager` with a new `usePollutantSchedule` flag, file path, tracer count, and conditional `ReaderOutdoorAirPollution` component.
Simple constant outdoor air concentration schedule of 400ppm used for testing
Introduces a new `IDEAS.Fluid.Sources.Examples.OutsideAirFile` example that configures `OutsideAir` with an air medium including CO2 and an `inner SimInfoManager` reading outdoor pollution data from `outsideAir_simple.csv`.
OutsideAir now wraps `u` directly into `[0, 2*pi]` using a floor-based modulo expression, removing the previous sign-flip and partial range constraint logic. It also updates `C_in_internal` to use `sim.CEnv.y` only when no pollutant schedule is active, and `sim.C_outdoor` when `sim.usePollutantSchedule` is enabled.
Contributor
Author
|
I am thinking of annotating the file format used in outsideAir_simple.csv. This would give the user the ability to store some meta-information in the header-lines (e.g. location, datasource, timing, headers). This would change the Do you agree? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for reading outdoor air pollutant concentrations from a file and propagating these concentrations to the outsideair model used within the buildings components. It also improves angle wrapping logic for wind pressure calculations, resulting in more robust and efficient code. The most important changes are grouped below by theme.
Outdoor Air Pollution File Support:
OutdoorAirPollutionand modelReaderOutdoorAirPollutionto read pollutant concentrations from a user-specified file (e.g.outsideAir_simple.csv), with parameters for the number of tracers and file selection. [1] [2] [3] [4]PartialSimInfoManagerto support optional pollutant schedule reading: added parameters (usePollutantSchedule,outdoorFileName,nC), conditional instantiation of the reader, and a new outputC_outdoorfor pollutant concentrations. [1] [2] [3]OutsideAirsource model to useC_outdoorfrom the simulation manager when pollutant scheduling is enabled, ensuring pollutant concentrations are correctly used in simulations.OutsideAirFile[1] [2]Wind Pressure Angle Wrapping Improvements:
windPressureLowRiseandOutsideAirmodels to use a more robust, branchless formula, improving numerical performance and reliability when the provided profile is not symmetric. [1] [2]These changes make it possible to include time-varying outdoor pollutant concentrations and improve the maintainability and accuracy of wind pressure calculations.