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

Update Lattice to published version of Standard 232 #50

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def task_generate_meta_schemas():
name = Path(example.root_directory).name
yield {
"name": name,
"file_dep": [schema.path for schema in example.schemas]
"file_dep": [schema.file_path for schema in example.schemas]
+ [BASE_META_SCHEMA_PATH, CORE_SCHEMA_PATH, Path(SOURCE_PATH, "meta_schema.py")],
"targets": [schema.meta_schema_path for schema in example.schemas],
"actions": [(example.generate_meta_schemas, [])],
Expand All @@ -44,7 +44,7 @@ def task_validate_schemas():
yield {
"name": name,
"task_dep": [f"generate_meta_schemas:{name}"],
"file_dep": [schema.path for schema in example.schemas]
"file_dep": [schema.file_path for schema in example.schemas]
+ [schema.meta_schema_path for schema in example.schemas]
+ [BASE_META_SCHEMA_PATH, CORE_SCHEMA_PATH, Path(SOURCE_PATH, "meta_schema.py")],
"actions": [(example.validate_schemas, [])],
Expand All @@ -58,7 +58,7 @@ def task_generate_json_schemas():
yield {
"name": name,
"task_dep": [f"validate_schemas:{name}"],
"file_dep": [schema.path for schema in example.schemas]
"file_dep": [schema.file_path for schema in example.schemas]
+ [schema.meta_schema_path for schema in example.schemas]
+ [CORE_SCHEMA_PATH, BASE_META_SCHEMA_PATH, Path(SOURCE_PATH, "schema_to_json.py")],
"targets": [schema.json_schema_path for schema in example.schemas],
Expand Down Expand Up @@ -88,7 +88,7 @@ def task_generate_markdown():
yield {
"name": name,
"targets": [template.markdown_output_path for template in example.doc_templates],
"file_dep": [schema.path for schema in example.schemas]
"file_dep": [schema.file_path for schema in example.schemas]
+ [template.path for template in example.doc_templates]
+ [Path(SOURCE_PATH, "docs", "grid_table.py")],
"task_dep": [f"validate_schemas:{name}"],
Expand All @@ -104,7 +104,7 @@ def task_generate_cpp_code():
yield {
"name": name,
"task_dep": [f"validate_schemas:{name}"],
"file_dep": [schema.path for schema in example.cpp_schemas]
"file_dep": [schema.file_path for schema in example.cpp_schemas]
+ [schema.meta_schema_path for schema in example.schemas]
+ [CORE_SCHEMA_PATH, BASE_META_SCHEMA_PATH, Path(SOURCE_PATH, "header_entries.py")],
"targets": [schema.cpp_header_path for schema in example.cpp_schemas]
Expand All @@ -122,7 +122,7 @@ def task_generate_web_docs():
yield {
"name": name,
"task_dep": [f"validate_schemas:{name}", f"generate_json_schemas:{name}", f"validate_example_files:{name}"],
"file_dep": [schema.path for schema in example.schemas]
"file_dep": [schema.file_path for schema in example.schemas]
+ [template.path for template in example.doc_templates]
+ [Path(SOURCE_PATH, "docs", "mkdocs_web.py")],
"targets": [Path(example.web_docs_directory_path, "public")],
Expand Down
7 changes: 4 additions & 3 deletions examples/fan_spec/examples/Fan-Continuous.RS0003.a205.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"metadata": {
"schema_author": "ASHRAE_205",
"schema": "RS0003",
"schema_name": "RS0003",
"schema_version": "0.2.0",
"author": "SSPC 205 Working Group",
"description": "Continuous Fan",
"id": "123e4567-e89b-12d3-a456-426614174000",
"timestamp": "2020-05-11T00:00Z",
"version": 1,
"time_of_creation": "2020-05-11T00:00Z",
"version": "1.0.0",
"disclaimer": "Example data not to be used for simulation"
},
"description": {
Expand Down
8 changes: 4 additions & 4 deletions examples/fan_spec/schema/ASHRAE205.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ PerformanceMapTemplate:
GridVariablesTemplate:
Object Type: "Data Group Template"
Required Data Types:
- "[Numeric][1..]"
- "[Integer][1..]"
- "[Numeric]"
- "[Integer]"
Data Elements Required: True

LookupVariablesTemplate:
Object Type: "Data Group Template"
Required Data Types:
- "[Numeric][1..]"
- "[Integer][1..]"
- "[Numeric]"
- "[Integer]"
Data Elements Required: True

RepresentationSpecificationTemplate:
Expand Down
66 changes: 44 additions & 22 deletions examples/fan_spec/schema/RS0003.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,18 @@ SystemCurve:
Data Elements:
standard_air_volumetric_flow_rate:
Description: "Volumetric air flow rate through an air distribution system at standard air conditions"
Data Type: "[Numeric][2..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[2..]"
Units: "m3/s"
Required: True
static_pressure_difference:
Description: "Static pressure difference of an air distribution system"
Data Type: "[Numeric][2..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[2..]"
Units: "Pa"
Required: True

Expand All @@ -247,14 +251,18 @@ GridVariablesContinuous:
Data Elements:
standard_air_volumetric_flow_rate:
Description: "Volumetric air flow rate through fan assembly at standard air conditions"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "m3/s"
Required: True
static_pressure_difference:
Description: "External static pressure across fan assembly at dry coil conditions"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "Pa"
Notes: "Any static pressure deduction (or addition) for wet coil is specified by `wet_pressure_difference` in 'assembly_components' data group"
Required: True
Expand All @@ -265,14 +273,18 @@ LookupVariablesContinuous:
Data Elements:
impeller_rotational_speed:
Description: "Rotational speed of fan impeller"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "rev/s"
Required: True
shaft_power:
Description: "Mechanical shaft power input to fan assembly"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "W"
Notes: "Does not include the mechanical efficiency of any mechanical drive used to modify rotational speed between the motor and impeller"
Required: True
Expand All @@ -296,15 +308,19 @@ GridVariablesDiscrete:
Data Elements:
speed_number:
Description: "Number indicating discrete speed of fan impeller in rank order (with 1 being the lowest speed)"
Data Type: "[Integer][1..]"
Constraints: ">=0"
Data Type: "[Integer]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "-"
Notes: "Data shall be provided for all allowable discrete speeds or settings"
Required: True
static_pressure_difference:
Description: "External static pressure across fan assembly at dry coil conditions"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "Pa"
Notes: "Any static pressure deduction (or addition) for wet coil is specified by `wet_pressure_difference` in 'assembly_components' data group"
Required: True
Expand All @@ -315,20 +331,26 @@ LookupVariablesDiscrete:
Data Elements:
standard_air_volumetric_flow_rate:
Description: "Volumetric air flow rate through fan assembly at standard air conditions"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "m3/s"
Required: True
shaft_power:
Description: "Mechanical shaft power input to fan assembly"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "W"
Notes: "Does not include the mechanical efficiency of any mechanical drive used to modify rotational speed between the motor and impeller"
Required: True
impeller_rotational_speed:
Description: "Rotational speed of fan impeller"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "rev/s"
Required: True
26 changes: 18 additions & 8 deletions examples/fan_spec/schema/RS0005.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,18 @@ GridVariables:
Data Elements:
shaft_power:
Description: "Delivered rotational shaft power"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "W"
Required: True
shaft_rotational_speed:
Description: "Rotational speed of shaft"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "rev/s"
Required: True

Expand All @@ -120,14 +124,20 @@ LookupVariables:
Data Elements:
efficiency:
Description: "Efficiency of motor"
Data Type: "[Numeric][1..]"
Constraints: [">=0.0", "<=1.0"]
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "<=1.0"
- "[1..]"
Units: "-"
Notes: "Defined as the ratio of mechanical shaft power to electrical input power of the motor"
Required: True
power_factor:
Description: "Power factor of the motor"
Data Type: "[Numeric][1..]"
Constraints: [">=0.0", "<=1.0"]
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "<=1.0"
- "[1..]"
Units: "-"
Required: True
19 changes: 13 additions & 6 deletions examples/fan_spec/schema/RS0006.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,18 @@ GridVariables:
Data Elements:
output_power:
Description: "Power delivered to the motor"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "W"
Required: True
output_frequency:
Description: "Frequency delivered to the motor"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "Hz"
Required: True

Expand All @@ -122,8 +126,11 @@ LookupVariables:
Data Elements:
efficiency:
Description: "Efficiency of drive"
Data Type: "[Numeric][1..]"
Constraints: [">=0.0","<=1.0"]
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "<=1.0"
- "[1..]"
Units: "-"
Notes: ["Defined as the ratio of electrical output power (to the motor) to electrical input power (to the drive)",
"Input power shall include any power required to provide active air cooling for the drive"]
Expand Down
13 changes: 9 additions & 4 deletions examples/fan_spec/schema/RS0007.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ GridVariables:
Data Elements:
output_power:
Description: "Output shaft power"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "W"
Required: True

Expand All @@ -110,8 +112,11 @@ LookupVariables:
Data Elements:
efficiency:
Description: "Efficiency of drive"
Data Type: "[Numeric][1..]"
Constraints: [">=0.0","<=1.0"]
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "<=1.0"
- "[1..]"
Units: "-"
Notes: "Defined as the ratio of output shaft power to input shaft power"
Required: True
21 changes: 13 additions & 8 deletions examples/lookup_table/schema/LookupTable.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ LookupTableTemplate:
GridVariablesTemplate:
Object Type: "Data Group Template"
Required Data Types:
- "[Numeric][1..]"
- "[Integer][1..]"
- "[Numeric]"
- "[Integer]"
Data Elements Required: True

LookupVariablesTemplate:
Object Type: "Data Group Template"
Required Data Types:
- "[Numeric][1..]"
- "[Integer][1..]"
- "[Numeric]"
- "[Integer]"
Data Elements Required: True

LookupTable:
Expand All @@ -54,8 +54,10 @@ GridVariables:
Data Elements:
output_power:
Description: "Output shaft power"
Data Type: "[Numeric][1..]"
Constraints: ">=0.0"
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "[1..]"
Units: "W"
Required: True

Expand All @@ -65,8 +67,11 @@ LookupVariables:
Data Elements:
efficiency:
Description: "Efficiency of drive"
Data Type: "[Numeric][1..]"
Constraints: [">=0.0","<=1.0"]
Data Type: "[Numeric]"
Constraints:
- ">=0.0"
- "<=1.0"
- "[1..]"
Units: "-"
Notes: "Defined as the ratio of output shaft power to input shaft power"
Required: True
Loading
Loading