Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #927 from slacgismo/develop
Browse files Browse the repository at this point in the history
Release beauharnois-23
  • Loading branch information
aivanova5 authored Jul 2, 2021
2 parents 84d18cb + 7e5c403 commit 6eca2bf
Show file tree
Hide file tree
Showing 22 changed files with 27,882 additions and 131 deletions.
4 changes: 3 additions & 1 deletion docs/Converters/Import/Tmy3_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Synopsis

~~~
#input "filename.tmy3"
#input "filename.tmy3" [-p|--property NAME=VALUE] [...]
~~~

# Description
Expand All @@ -18,6 +18,8 @@ module climate;
object climate
{
tmyfile "<filename>.tmy3";
NAME "VALUE";
...
}
~~~

Expand Down
17 changes: 14 additions & 3 deletions docs/GLM/Macro/Input.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@ GLM:

# Description

The `#input` macro allows a non-GLM file to be input inline using [[/GLM/Command/Automatic import conversion.md]] with options, e.g.,
The `#input` macro allows a non-GLM file to be input inline using [[/Command/Automatic import conversion]] with options.

# Example
## CSV converters
Input: `csv`

Output: `glm`

From: `ami`, `scada`, `onpoint-weather`, `table`

Type: `ceus`, `rbsa`, `climate`, `object`

# Example 1

The following example converts the file `data.csv` to `house.glm` using the converter `csv-ami2glm-house.py` with the `heating_setpoint` property set to `72 degF`:

Expand All @@ -27,7 +36,9 @@ object meter {
}
~~~~


# See also

* [[/Command/Automatic import conversion.md]]
* [[/Command/Automatic import conversion]]
* [[/Converters/Import/Csv_files]]
* [[/GLM/Macro/Include]]
14 changes: 13 additions & 1 deletion docs/Global/Verbose.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ bash$ gridlabd --define verbose=FALSE

# Description

Verbose enable flag
Verbose enable flag. Set to `TRUE` to enable. To enable object level verbose

~~~
#set verbose=TRUE
module <module_name> {
message_flags VERBOSE;
}
object <object_name> {
flags VERBOSE;
}
~~~

# Example

Expand Down
93 changes: 69 additions & 24 deletions docs/Module/Powerflow/Pole.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@ object pole
tilt_angle "0 deg";
tilt_direction 0 deg";
weather "<climate-object>";
wind_speed 0.0 m/s;
wind_direction 0.0 deg;
wind_gusts 0.0 m/s;
configuration "<pole-configuration-object>";
install_year "1970";
repair_time "24 h";
wind_speed 0.0 m/s;
wind_direction 0.0 deg;
wind_gusts 0.0 m/s;
pole_stress "0 pu";
pole_stress_polynomial_a "0 ft*lb";
pole_stress_polynomial_b "0 ft*lb";
pole_stress_polynomial_c "0 ft*lb";
susceptibility "0 pu*s/m";
total_moment "0 ft*lb";
resisting_moment "0 ft*lb";
pole_moment "0 ft*lb";
pole_moment_nowind "0 ft*lb";
equipment_moment "0 ft*lb";
equipment_moment_nowind "0 ft*lb";
critical_wind_speed "0 m/s";
guy_height "0 ft";
}
~~~

Expand Down Expand Up @@ -66,56 +71,56 @@ The tilt direction of the pole.

Reference to the source of the weather data.

### `wind_speed`
### `configuration`

~~~
wind_speed 0.0 m/s;
object configuration;
~~~

The wind speed at the location of the pole. This is automatically set is the
`weather` object is provided.
Reference to the pole configuration.

### `wind_direction`
### `install_year`

~~~
wind_direction 0.0 deg;
int32 install_year;
~~~

The wind direction at the location of the pole. This is automatically set is the
`weather` object is provided.
Year the pole was installed.

### `wind_gusts`
### `repair_time`

~~~
wind_gusts 0.0 m/s;
double repair_time[h];
~~~

The wind gusts at the location of the pole. This is automatically set is the
`weather` object is provided.
Time required to repair or replace the pole after failure.

### `configuration`
### `wind_speed`

~~~
object configuration;
int32 wind_speed [m/s];
~~~

Reference to the pole configuration.
The wind speed at the location of the pole. This is automatically set is the
`weather` object is provided.

### `install_year`
### `wind_direction`

~~~
int32 install_year;
int32 wind_direction [deg];
~~~

Year the pole was installed.
The wind direction at the location of the pole. This is automatically set is the
`weather` object is provided.

### `repair_time`
### `wind_gusts`

~~~
double repair_time[h];
int32 wind_gusts [m/s];
~~~

Time required to repair or replace the pole after failure.
The wind gusts at the location of the pole. This is automatically set is the
`weather` object is provided.

### `pole_stress`

Expand Down Expand Up @@ -171,6 +176,38 @@ The total moment on the pole.
double resisting_moment[ft*lb];
~~~

### `pole_moment`

~~~
double pole_moment[ft*lb];
~~~

The moment of the pole.

### `pole_moment_nowind`

~~~
double pole_moment_nowind[ft*lb];
~~~

The moment of the pole without wind.

### `equipment_moment`

~~~
double equipment_moment[ft*lb];
~~~

The moment of the equipment.

### `equipment_moment_nowind`

~~~
double equipment_moment_nowind[ft*lb];
~~~

The moment of the equipment without wind.

The resisting moment on the pole.

### `critical_wind_speed`
Expand All @@ -181,6 +218,14 @@ The resisting moment on the pole.

Wind speed at pole failure.

### `guy_height`

~~~
double guy_height[m/s];
~~~

Guy wire attachment height.

# Model

The pole failure model is described in [Pole Loading Model](https://github.com/slacgismo/gridlabd/raw/master/module/powerflow/docs/pole_loading.pdf).
Expand Down
2 changes: 1 addition & 1 deletion docs/Module/Residential/RBSA.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Specifies the price sensitivity.
The following implements a 3,000 sf single-family home in the Northwest valleys region with 90% constant impedance at unity power factor, and 10% constant power at power factor ~0.89:

~~~
object rasa {
object rbsa {
filename "NWV_SFHOME.csv";
floor_area 10 ksf;
composition "Heating:{ZR:0.9;PR:0.1;PI:0.01}";
Expand Down
20 changes: 14 additions & 6 deletions gldcore/converters/tmy32glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@

def help():
print('Syntax:')
print('tmy32glm.py -i|--ifile <input-file>[,<input-file>[,...]] -o|--ofile <output-file>')
print('tmy32glm.py -i|--ifile <input-file>[,<input-file>[,...]] -o|--ofile <output-file> -p|--property <name>=<value>')
print(' -i|--ifile : [REQUIRED] omd input file name.')
print(' -o|--ofile : [REQUIRED] glm output file name.')
print(' -p|--property : [OPTIONAL] specify additional GLM object properties')

input_file = None
output_file = None
properties = {}

opts, args = getopt.getopt(sys.argv[1:],"hi:o:",["help","ifile=","ofile="])
opts, args = getopt.getopt(sys.argv[1:],"hi:o:p:",["help","ifile=","ofile=","property="])

if not opts :
help()
Expand All @@ -28,12 +30,18 @@ def help():
input_file = arg.strip()
elif opt in ("-o", "--ofile"):
output_file = arg.strip()
elif opt in ("-p", "--property"):
spec = arg.split("=")
properties[spec[0]] = spec[1]
else:
raise Exception(f"'{opt}' is an invalid command line option")

with open(output_file,"w") as glm:
glm.write(f"#weather get {input_file}\n")
glm.write(f"module climate;\n")
glm.write('object climate { tmyfile "')
glm.write(input_file)
glm.write('"; }\n')
glm.write("module climate;\n")
glm.write("object climate\n")
glm.write("{\n")
glm.write(f"\ttmyfile \"{input_file}\";\n")
for name, value in properties.items():
glm.write(f"\t{name} \"{value}\";\n")
glm.write("}\n")
1 change: 1 addition & 0 deletions gldcore/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ DEPRECATED static KEYWORD dmc_keys[] = {
{"VERSION", DMC_VERSION, dmc_keys+50},
{"XCORE", DMC_XCORE, dmc_keys+51},
{"MAIN", DMC_MAIN, dmc_keys+52},
{"PYTHON", DMC_PYTHON, dmc_keys+53},
{"CMDARG", DMC_CMDARG, NULL},
};
DEPRECATED static KEYWORD vtc_keys[] = {
Expand Down
3 changes: 2 additions & 1 deletion gldcore/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,9 @@ typedef enum {
DMC_VALIDATE = 0x0001000000000000,
DMC_VERSION = 0x0002000000000000,
DMC_XCORE = 0x0004000000000000,
DMC_PYTHON = 0x0008000000000000,
DMC_NONE = 0, /**< no messages allowed */
DMC_ALL = 0x0007ffffffffffff, /**< all messages allowed */
DMC_ALL = 0x000fffffffffffff, /**< all messages allowed */
} GLOBALMESSAGECONTEXT;

/* Variable: */
Expand Down
Loading

0 comments on commit 6eca2bf

Please sign in to comment.