Skip to content

demand: CPFL's GED 13 to version 46.0 and Enel's GRI-0017 (the former ET 1569) to version 02 - #474

Merged
IPedrax merged 1 commit into
IPedrax:mainfrom
ffishman:demand-cpfl46-enel02
Nov 17, 2026
Merged

IPedrax merged 1 commit into
IPedrax:mainfrom
ffishman:demand-cpfl46-enel02

Conversation

@ffishman

Copy link
Copy Markdown
Contributor

demand was written against CPFL's GED 13 version 2.24 (2020) and Enel's ET 1569 version 01 (2024). Both utilities have published new editions since then. This PR brings the tables up to date. The command's shape and parameters stay the same.

CPFL, GED 13 version 46.0 (19/03/2026)

I checked every table demand reads against the new edition.

  • Same values: the demand factors (Tabelas 2 to 11) and Tabela 15, the old Tabela 18, are unchanged.
  • Renumbered: the commercial table is now Tabela 15 (was 18), the motor tables are now 13 and 14 (were 14 and 15), motor starting is Tabela 12, and the formula is item 6.22.1 (was 6.25.1). The source text, the module doc and the params doc now use the new numbers.
  • Tabela 1 (1A single-phase, 1B two-phase, 1C three-phase):
    • C9 (220/380 V) now goes up to 52 kVA instead of 46, so C10 starts above 52.
    • B1 and B3 now take a 32 mm conduit instead of 40 mm.
    • C7's earthing conductor is now 6 mm² instead of 10.
    • The table now prints an aluminium entry cable beside the copper one. The reply gives it as aluminium_mm2.
  • Three-phase motors: Tabela 14 now goes up to 300 cv. Its note 3 says that above 50 cv the supply is at medium voltage.

Enel, GRI-0017 version 02 (06/03/2025)

  • Anexo A (aerial, 127/220 V):
    • Version 02 no longer prints a power made available. Instead each range now reaches up to that power (A1 to 5 kW, B1 to 11, C1 10 to 15 and so on), so ranges overlap. The command already returns every category that holds the load in candidates, the smaller supply first.
    • There is a new C8 at 175 A (57.1 to 67 kW), and the 200 A row is now C9 (67 to 75 kW).
    • The earthing conductor of B1, C1 and C2 is now 10 mm², and C4's entry is now 25(25).
  • Anexo B (delta): B4 and C4 now connect by 16(16), and B9/C9 now earth by 50 mm².
  • Anexo C (120/240 V): A2 is now 5 to 6 kW and B1 is now 6 to 12 kW.
  • Anexo D (underground): the ranges were rewritten, there is a new C5 at 175 A (57.1 to 67 kW), and the 200 A row is now C6.
  • Anexo E: unchanged.
  • Removed field: available_kw is gone from the reply, because no annex prints it now. The demand note now cites Anexo A's note 11 (the designer works out a three-phase demand, up to 75 kW of installed load), and the 75 kW limit cites item 7.4.
  • Not covered: Anexos F to H (Enel Ceará), listed in not_covered.

Tests

The tests were changed first to the new printed values, then the code. They cover:

  • every changed row;
  • the overlapping ranges of Anexo A;
  • the new 175 A rows;
  • C9 at 52 kVA;
  • the aluminium column;
  • the 100 and 300 cv motors.

GED 13's Example 3 still comes out at 46.1 kW, D ≈ 33 kVA, C3. The area doc (docs/areas/structure-and-mep.md) is updated to match.

Checks

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, cargo i18n check.

CPFL: the factors are unchanged; the tables are renumbered (Tabela 15 for
other buildings, 13 and 14 for motors, item 6.22.1). Tabela 1C's C9 goes to
52 kVA, B1 and B3 take a 32 mm conduit, C7 earths by 6 mm², the aluminium
entry cable is given beside the copper one, and three-phase motors go to
300 cv.

Enel: GRI-0017 version 02 (the former ET 1569) prints no power made
available and stretches each range up to it, so Anexo A's ranges overlap;
new 175 A rows in Anexos A (C8) and D (C5); Anexo A's earthing and C4's
entry, Anexo B's B4/C4 connection and B9/C9 earthing, Anexo C's limits as
printed. available_kw leaves the reply.
@dansity

dansity commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

I'm planning to move all kinds of national standards like the electrical ones to the unified Building Code menu I have introduced in stairs. It will allow granular control of these values without PRs as well the possibility to introduce other nation's codes. I will see when the maintainer merges the stairs then it is possible we bundle this PR into some big Building Code PR.
Let me know what do you think.

@ffishman

Copy link
Copy Markdown
Contributor Author

Thanks, @dansity, I like the idea. One place for every country's code, with values people can change without a PR, is the direction we have been after since load_points and dr_check went in as data (#290, #359): the mechanism neutral in the core, each country's rules as data.

I would still keep this PR on its own, if that's all right with you. It only moves two utilities' tables, which are already in main, to their current editions, so it can go in whenever the maintainer has a moment, without waiting for the stairs. Once the Building Code menu from #386 is in main, I'm happy to move the electrical data into it myself, demand and building_demand (#458) included.

I read docs/areas/building-codes.md and building-codes.json in #386. Two things about the electrical data that may help when we extend the format:

  • Entrance categories are a utility's rule, not a country's. Brazil has dozens of utilities and cooperatives, each with its own standard and edition, and a few share one standard with local changes. So below the country there is a second level: who issues the rule, which document and which edition. A project picks its utility, much as it picks its country.
  • The source goes down to the page. Your entries already name a source for each value. The electrical tables would also need the edition and the table or page: in building_demand: a building's demand by a utility's or a country's method, as data #458 each table of several utilities carries them, in one data file, and the tests check that every table is in order and that the entrance tables leave no gap or overlap. That matters when someone has to defend a design to the utility.

I have also been comparing how other countries work out a building's demand. The ones I could read in open sources come down to a few forms of diversity: an equivalent number of units (Brazil's utilities; Spain's ITC-BT-10 up to 21 dwellings), a coefficient by band that multiplies the sum (France's SéQuélec GP 16, Portugal's RTIEBT, the US NEC 120.84, formerly 220.84), a + b·n (the UK's SP Energy Networks ESDD-02-012: ADMD × n plus a fixed term), and load bands taken at 100 % and then at a lower percentage (the NEC's standard method). Germany's DIN 18015-1 gives a curve, which I could not check, as the standard is not open. All of them fit one mechanism with a kind field. I can write this up with the sources wherever you'd like to discuss the format.

dansity added a commit that referenced this pull request Nov 16, 2026
# Conflicts:
#	CLAUDE.md
#	crates/core/src/commands.rs
#	docs/areas/structure-and-mep.md
#	translations/project/bimcraft-project.pot
#	translations/project/cs.po
#	translations/project/de.po
#	translations/project/es.po
#	translations/project/fr.po
#	translations/project/it.po
#	translations/project/nl.po
#	translations/project/pl.po
#	translations/project/pt.po
#	translations/project/sv.po
#	translations/project/vi.po
#	translations/ui/bimcraft-ui.pot
#	translations/ui/cs.po
#	translations/ui/de.po
#	translations/ui/es.po
#	translations/ui/fr.po
#	translations/ui/it.po
#	translations/ui/nl.po
#	translations/ui/pl.po
#	translations/ui/pt.po
#	translations/ui/vi.po
#	translations/ui/zh.po
#	translations/ui/zh_TW.po
@IPedrax
IPedrax merged commit f0f392e into IPedrax:main Nov 17, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in BIMCraft Nov 17, 2026
ffishman added a commit to ffishman/BIMCraft that referenced this pull request Nov 20, 2026
Each fails under a deliberate break that the tests let through before: a range from 0 holds 0, and each row answers at its
own upper end (and its demand's), in every utility's table and by every method (IPedrax#484, IPedrax#474); each building method at its
least number of dwellings and not one fewer (IPedrax#483); an outdoor rule asks it of outlets only, whatever kinds a code lists
(IPedrax#359); a room with its outlets and no light point is short, and enough once its light is drawn (IPedrax#280); a 3D file over the
limit refused by its size, before it is read (IPedrax#393); only a common property set has the status the export writes (IPedrax#291); a
beam at the view range's top is seen, and hidden by a ceiling there (IPedrax#153); Run Script says a single warning (IPedrax#391).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants