Skip to content

Commit ad2e505

Browse files
committed
Merge branch 'main' into auxfeff
2 parents 2089279 + 5756497 commit ad2e505

File tree

129 files changed

+63473
-26418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+63473
-26418
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Build CSE"
2+
description: "Get git info (for version) and build CSE executable"
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Get branch name
7+
uses: tj-actions/[email protected]
8+
id: branch-name
9+
- name: Save branch name
10+
run: echo "CI_GIT_BRANCH=${{steps.branch-name.outputs.current_branch}}" >> $GITHUB_ENV
11+
shell: bash
12+
- name: Build
13+
shell: cmd
14+
run: build.bat
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Build docs"
2+
description: "Install prerequisites and build CSE documentation"
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Install pandoc
7+
run: 'cinst -y pandoc --version=1.17.2 --ia=ALLUSERS=1'
8+
shell: bash
9+
- name: Add pandoc to path
10+
run: echo "C:\Program Files (x86)\Pandoc" >> $GITHUB_PATH
11+
shell: bash
12+
- name: Add MSVC developer commands to PATH
13+
uses: ilammy/msvc-dev-cmd@v1
14+
- name: Set build to NOT do coverage check by default
15+
run: rake set_coverage_off_by_default
16+
shell: bash
17+
working-directory: doc
18+
- name: Build docs
19+
run: rake
20+
shell: bash
21+
working-directory: doc
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Download CSE artifact"
2+
description: "Download CSE executable built and uploaded in a previous job"
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Download executable artifact
7+
uses: actions/download-artifact@v3
8+
with:
9+
name: CSE.exe
10+
path: msvc

.github/workflows/build-and-test.yml

Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ jobs:
1111
shell: bash
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v1
15-
- name: Get branch name
16-
uses: tj-actions/branch-names@v5
17-
id: branch-name
18-
- name: Save branch name
19-
run: echo "CI_GIT_BRANCH=${{steps.branch-name.outputs.current_branch}}" >> $GITHUB_ENV
20-
- name: Build
21-
shell: cmd
22-
run: build.bat
14+
uses: actions/[email protected]
15+
with:
16+
fetch-depth: 0
17+
submodules: recursive
18+
- name: Build CSE
19+
uses: ./.github/actions/build-cse
2320
- name: Upload executable artifiact
24-
uses: actions/upload-artifact@v2.2.4
21+
uses: actions/upload-artifact@v3
2522
with:
2623
name: CSE.exe
2724
path: msvc/CSE.exe
@@ -31,30 +28,18 @@ jobs:
3128
runs-on: windows-2022
3229
steps:
3330
- name: Checkout
34-
uses: actions/checkout@v1
31+
uses: actions/checkout@v3.3.0
3532
- name: Configure CMake
3633
run: cmake -P cmake/configure.cmake
3734
- name: Build wcmp and unit test executable
3835
run: cmake --build . --config Release --target wcmp cse_tests
3936
working-directory: msvc/build
40-
- name: Download executable artifact
41-
uses: actions/download-artifact@v2
42-
with:
43-
name: CSE.exe
44-
path: msvc
45-
# - name: Download Mesa3D on Windows
46-
# if: runner.os == 'Windows'
47-
# shell: cmd
48-
# run: curl.exe -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/20.3.2/mesa3d-20.3.2-release-msvc.7z
49-
# working-directory: msvc
50-
# - name: Install Mesa3D on Windows
51-
# if: runner.os == 'Windows'
52-
# shell: cmd
53-
# run: |
54-
# "C:\Program Files\7-Zip\7z.exe" x mesa.7z
55-
# mklink opengl32.dll "x64\opengl32.dll"
56-
# mklink libglapi.dll "x64\libglapi.dll"
57-
# working-directory: msvc
37+
- name: Download CSE artifact
38+
uses: ./.github/actions/download-cse-artifact
39+
# - name: Setup Mesa3D
40+
# uses: bigladder/github-actions/setup-mesa3d@main
41+
# with:
42+
# install-directory: msvc
5843
- name: Test
5944
run: ctest -C Release -j 2 --output-on-failure -E shadetest # CI can't do GPU calcs at this time (the steps above get us close, but throws an exception on destruction)
6045
working-directory: msvc/build
@@ -64,34 +49,20 @@ jobs:
6449
runs-on: windows-2022
6550
steps:
6651
- name: Checkout
67-
uses: actions/checkout@v1
52+
uses: actions/checkout@v3.3.0
6853
- name: Configure CMake
6954
run: cmake -P cmake/configure.cmake
70-
- name: Download executable artifact
71-
uses: actions/download-artifact@v2
72-
with:
73-
name: CSE.exe
74-
path: msvc
75-
- name: Install pandoc
76-
run: 'cinst -y pandoc --version=1.17.2 --ia=ALLUSERS=1'
77-
shell: bash
78-
- name: Add pandoc to path
79-
run: echo "C:\Program Files (x86)\Pandoc" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
80-
- name: Add MSVC developer commands to PATH
81-
uses: ilammy/msvc-dev-cmd@v1
82-
- name: Set build to NOT do coverage check by default
83-
run: rake set_coverage_off_by_default
84-
working-directory: doc
85-
- name: Build docs (without coverage check)
86-
run: rake
87-
working-directory: doc
55+
- name: Download CSE artifact
56+
uses: ./.github/actions/download-cse-artifact
57+
- name: Build docs
58+
uses: ./.github/actions/build-docs
8859
- name: Run coverage check
8960
run: rake coverage
9061
working-directory: doc
9162
- name: Upload documentation
92-
uses: actions/upload-artifact@v2.2.4
63+
uses: actions/upload-artifact@v3
9364
with:
9465
name: Documentation
95-
path: |
66+
path: |
9667
doc/output
9768
!doc/output/.git

.github/workflows/release.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,19 @@ jobs:
1414
shell: bash
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v1
18-
- name: Get branch name
19-
uses: tj-actions/branch-names@v5
20-
id: branch-name
21-
- name: Save branch name
22-
run: echo "CI_GIT_BRANCH=${{steps.branch-name.outputs.current_branch}}" >> $GITHUB_ENV
23-
- name: Build
24-
shell: cmd
25-
run: build.bat
17+
uses: actions/[email protected]
18+
with:
19+
fetch-depth: 0
20+
submodules: recursive
21+
- name: Build CSE
22+
uses: ./.github/actions/build-cse
2623
- name: Upload executable to release assets
27-
uses: AButler/[email protected]
24+
uses: AButler/[email protected].2
2825
with:
2926
files: msvc/CSE.exe
3027
repo-token: ${{ secrets.GITHUB_TOKEN }}
31-
- name: Install pandoc
32-
run: 'cinst -y pandoc --version=1.17.2 --ia=ALLUSERS=1'
33-
shell: bash
34-
- name: Add pandoc to path
35-
run: echo "C:\Program Files (x86)\Pandoc" >> $GITHUB_PATH
36-
- name: Add MSVC developer commands to PATH
37-
uses: ilammy/msvc-dev-cmd@v1
3828
- name: Build docs
39-
run: rake
40-
working-directory: doc
29+
uses: ./.github/actions/build-docs
4130
- name: Update gh-pages
4231
uses: peaceiris/actions-gh-pages@v3
4332
with:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build and Test](https://github.com/cse-sim/cse/workflows/Build%20and%20Test/badge.svg)](https://github.com/cse-sim/cse/actions?query=branch%3Amaster)
1+
[![Build and Test](https://github.com/cse-sim/cse/workflows/Build%20and%20Test/badge.svg)](https://github.com/cse-sim/cse/actions?query=branch%3Amain)
22

33
## California Simulation Engine (CSE)
44

cmake/string-finder.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# string-finder: Returns an error if string is not found in the given file. Otherwise exits gracefully.
2+
file(READ ${file} file_content)
3+
4+
string(FIND ${file_content} ${string} content_location)
5+
6+
if (${content_location} LESS 0)
7+
message(FATAL_ERROR "STRING-FINDER ERROR: String, \"${string}\", not found in the file, \"${file}\".")
8+
endif()

doc/src/input-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ Built-in functions perform a number of useful scheduling and conditional operati
14141414
**Syntax** *float* **wFromDbRh**( *float tDb, float rh*)
14151415
------------ -----------------------------------------------------------
14161416

1417-
#### rhFromDbW
1417+
#### rhFromDbW
14181418

14191419
------------ -----------------------------------------------------------
14201420
**Function** Returns relative humidity (0 – 1) of moist air from dry bulb

doc/src/operation.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,39 @@ where:
1111
*inputfile*
1212
: specifies the name of the text input file for the run(s). If the filename has an extension other than ".cse" (the default), it must be included. The name of the file with weather data for the simulation(s) is given in this file (wfName= statement, see [Weather Data Items](#top-weather-data-items)).
1313

14+
1415
*{switches}*
1516
: indicates zero or more of the following:
1617

1718
- -D*name* defines the preprocessor symbol *name* with the value "". Useful for testing with `#ifdef name`, to invoke variations in the simulation without changing the input file. The CSE preprocessor is described "[The Preprocessor](#the-preprocessor)".
1819

1920
- -D*name*=*value* defines the preprocessor symbol *name* with the specified *value*. *Name* can then be used in the input file to allow varying the simulation without changing the input file -- see "[The Preprocessor](#the-preprocessor)" for more information. The entire switch should be enclosed in quotes if it contains any spaces -- otherwise the command processor will divide it into two arguments and CSE will not understand it.
2021

21-
- -b batch mode: CSE will never stop for a response from the user when an error occurs. Error messages may thus scroll off the screen, but will all be in the error message file.
22+
- -U*name* undefines the preprocessor symbol *name*.
23+
24+
- -i*path;path;path* specifies directories where CSE looks for input and include files.
25+
26+
- -b batch mode: suppresses all prompts for user input. Currently there are no prompts implemented in CSE. -b is retained in case prompts are added in the future. It is good practice to include -b in batch script CSE invocations.
27+
28+
- -n suppresses screen display of warning messages. When -n is specified, warning messages are reported only to the error file.
2229

2330
- -p display all the class and member names that can be "probed" or accessed in CSE expressions. "Probes" are described in "[Probes](#probes)". Use with command processor redirection operator ">" to obtain a report in a file. *Inputfile* may be given or omitted when -p is given.
2431

25-
- -q similar to -p, but displays additional member names that cannot be probed or would not make sense to probe in an input file (development aid).
32+
- -p1 similar to -p, but displays additional member names that cannot be probed or would not make sense to probe in an input file (development aid).
33+
34+
- -c display all input names.
35+
36+
- -c1 display input names with build-independent details from CSE CULT tables (development aid).
37+
38+
- -c2 display input names with all details from CSE CULT tables (development aid).
2639

2740
- -x specifies report test prefix; see TOP repTestPfx. The -x command line setting takes precedence over the input file value, if any.
2841

29-
<!--
30-
TODO: Review all command line switches and update. See cne3() and pp.cpp:ppClargIf() at least.
31-
-->
42+
- -t*nn* specifies internal testing option bits (development aid). The following values should be combined bit-wise to determine *nn*. \
43+
1: Omit directory paths from file names in reports, yielding location-independent report files suitable for text comparison.\
44+
2: Include detailed timing information in the log file (default is summary only).
45+
46+
3247
## Locating Files
3348

3449
As with any program, in order to invoke CSE, the directory containing CSE.EXE must be the current directory, or that directory must be on the operating system path, or you must type the directory path before CSE.

doc/src/output-reports.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,45 @@ A Meter Report displays the energy use of a METER object, a user-defined "device
2222

2323
Meters account for energy use in pre-defined categories, called *end uses, that are documented with METER.*
2424

25+
## Air Flow Meter Report
26+
27+
An Air Flow Meter Report displays air flow values accumulated by an AFMETER that is associated with one or more ZONEs. The report provides insight into the results of the AirNet pressure model.
28+
29+
AFMETER maintains values for subhour, hour, day, month, and year intervals. Values are standard cfm (0.075 lb/ft3). Values for intervals longer than subhour are averages.
30+
31+
Flows are categorized by 1) direction of flow (+ = into zone(s), - = out of zone(s)); IZXFER izAFCat tags; and 3) type of source or sink of the flow (ambient, unconditioned zone, conditioned zone).
32+
33+
The following items are displayed (using the abbreviations shown in the report headings). The "+/-" notation indicates that two columns are included, one for each direction of flow. For example, "InfX+/-" means the report includes columns "InfX+" (infiltration flows into the zone) and "InfX-" (infiltration flows out of the zone).
34+
35+
---------- -------------------------------------------------------------
36+
Tot+/- Total flows
37+
38+
Unkn+/- Uncategorized flows (generally this shows 0)
39+
40+
InfX+/- Infiltration flows from/to ambient (izAFCat = InfilEx)
41+
42+
VntX+/- Natural vent exchanges from/to ambient (izAFCat = VentEx)
43+
44+
FanX+/- Forced vent and DOAS flows to/from ambient (izAFCat = FanEx)
45+
46+
InfU+/- Infiltration flows from/to unconditioned zones (izAFCat = InfilIz)
47+
48+
VntU+/- Natural vent flows from/to unconditioned zones (izAFCat = VentIz)
49+
50+
FanU+/- Forced vent flows from/to unconditioned zones (izAFCat = FanIz)
51+
52+
InfC+/- Infiltration flows from/to conditioned zones (izAFCat = InfilIz)
53+
54+
VntC+/- Natural vent flows from/to conditioned zones (izAFCat = VentIz)
55+
56+
FanC+/- Forced vent flows from/to conditioned zones (izAFCat = FanIz)
57+
58+
Duct+/- Duct leakage flows
59+
60+
HVAC+/- HVAC air flows at zone (i.e. at registers)
61+
---------- -------------------------------------------------------------
62+
63+
2564
## Energy Balance Report
2665

2766
The Energy Balance Report displays the temperature and sensible and latent heat flows into and out of the air of a single zone. Sign conventions assume that a positive flow increases the air temperature. Heat flow from a warm mass element such as a concrete wall into the zone air is defined as a positive flow, heat flow from air into mass is negative. Solar gain into the zone is defined as a positive heat flow. Solar gain that is incident on and absorbed directly into a mass element is shown as both a positve in the SOLAR column (gain to the zone) and a negative in the MASS column (lost from the zone to the mass).

0 commit comments

Comments
 (0)