RAW Import
RAW power system data format import, validation, and conversion to netlist.
PSS/E RAW import maps buses, generators, branches, loads and transformers into one authoritative ModelSpace Circuit case. Persist that case and the import report, then use native Circuit compilation and computation.
Import and execute
tdse circuit import --format psse_raw --input case.raw \
--out case.modelspace.json --out-json raw_import_report.json \
--approximation-policy warn
The importer records units, source identity and electrical approximation choices. Its defaults are SI coordinates, Thevenin generators and ZIP_SPLIT loads. Select the policy that matches the study and retain the resulting model for every run.
The import CLI accepts explicit native equivalent policies:
| Option | Values | Default |
|---|---|---|
--unit-mode | si, pu | si |
--generator-model | thevenin, norton | thevenin |
--load-model | shunt, series, zip_split | zip_split |
--transformer-model | series_only, ideal_tap_series, tap_split_shunt | ideal_tap_series |
These select the native RAW-to-ModelSpace mapping before model construction. They do not edit source classification or introduce an intermediate netlist.
The C API executes persisted ModelSpace JSON:
tdse_modelspace_circuit_compile_request_t request =
tdse_modelspace_circuit_compile_request_init();
request.case_json = case_json;
tdse_circuit_compile_result_t result = tdse_circuit_compile_result_init();
tdse_status_t status = tdse_modelspace_circuit_compile(&request, &result);
if (status == TDSE_STATUS_OK) {
/* Use result.handle for native matrix, probe and Pack computations. */
tdse_circuit_destroy(&result.handle);
}
To compile a qualified region, set request.region_id to its ModelSpace region
ID. Use tdse_circuit_workflow_handle_to_pack() with the resulting handle, or the
ModelSpace region workflow. Frequency-grid preparation must precede causality
correction; corrected values go directly to native kernel construction.
See ModelSpace native import and Circuit API integration.
Electrical equivalents
Transformer Models
Transformers in PSS/E RAW files have tap ratios and phase shifts. The model you choose determines how these are represented in the ModelSpace case:
| Model | Enum constant | Description |
|---|---|---|
series_only | TDSE_CIRCUIT_RAW_TRANSFORMER_SERIES_ONLY | Series impedance plus magnetizing shunt; ignores tap ratio and phase shift |
ideal_tap_series | TDSE_CIRCUIT_RAW_TRANSFORMER_IDEAL_TAP_SERIES | Ideal tap and phase shift in series with leakage impedance, plus magnetizing shunt |
tap_split_shunt | TDSE_CIRCUIT_RAW_TRANSFORMER_TAP_SPLIT_SHUNT | Approximated by ideal tap plus series leakage; emits RAW_TRANSFORMER_TAP_SPLIT_APPROXIMATED. Two-winding phase shift is omitted in this mode. |
Two-winding transformers are converted directly. Three-winding transformers are decomposed into three two-winding equivalents connected at a star point.
Load Models
RAW import converts PSS/E load records into circuit-domain equivalents. Three models are available:
SHUNT: Each load becomes an admittance from the load bus to ground, computed from the load's MW/MVAR at the system base voltage. Use when you care about impedance loading effects and are not modeling load dynamics separately.
SERIES: Each load becomes a signed series impedance to ground that preserves real and reactive power draw at nominal voltage. Positive reactance is inductive; negative reactance is capacitive. This is an operating-point equivalent.
ZIP_SPLIT: The importer emits its available ZIP components as shunt admittance and current-source equivalents, plus a constant-impedance component derived from the operating point. It is a circuit approximation, not a claim that every RAW load record contains a complete dynamic ZIP model.
These choices define different electrical equivalents. There is no universal SHUNT/SERIES/ZIP accuracy ranking; select the policy for the source data and study, and retain its approximation report.
Import report and validation
The JSON report includes source revision, parsed-record counts, selected
electrical equivalents, unsupported sections, warnings and final ModelSpace
validation errors. Review its ok, errors, warnings and approximation fields
before execution. Base values and the final study settings live in ModelSpace.
Repeated branch keys (bus pair and circuit ID) retain every parallel record.
The importer assigns deterministic unique component IDs and emits
RAW_DUPLICATE_BRANCH_KEY_PRESERVED with the source key and record ordinal.
It never merges or drops parallel records to resolve an ID collision.
Independent current injections, fallback voltage sources and fixed Thevenin equivalents are classified as LTI by the SDK. Source response is included in the selected region's Pack independent response. Callers do not alter qualification flags. See Independent Sources.
Import validation checks model syntax, references and supported semantics. Electrical accuracy is evaluated with native Circuit matrix/probe computations against study-specific reference values. A successful import does not establish agreement with an external simulator's operating point.
Sequence networks
tdse_modelspace_import_seq_networks() imports RAW+SEQ into owned positive-,
negative- and zero-sequence ModelSpace JSON strings. Persist those models and
compile each with tdse_modelspace_circuit_compile(). Pass the three handles to
tdse_circuit_compute_seq_fault() for 3PH, SLG, LL or DLG calculations.
Release each imported JSON buffer with tdse_circuit_seq_free_owned_output().
Support boundary
| Area | ModelSpace mapping | Verify in the study |
|---|---|---|
| Buses and branches | Electrical nodes and native equivalents | Connectivity and port selection |
| Generators | Declared source equivalents | Polarity, units and operating point |
| Transformers | Selected tap and impedance model | Phase shift, magnetizing shunt and winding bases |
| Loads | Selected SHUNT, SERIES or ZIP_SPLIT approximation | Operating-point assumptions |
| Unsupported records | Explicit import diagnostics | Required capability before execution |
The original RAW file is input provenance. ModelSpace is the persistent model authority for every subsequent computation.
