Open domthom21 opened 1 year ago
We can add functionality later to automatically list the functions with NDPs
We must think about the case where the NA does not define a value for the current country. At the moment if some countries define a NDP and some don't, a NotImplementedError is thrown
Überlegung zu NA 1993-1-1 6.1 notwendig, da unterschiedliche gamma_M2-Werte für Hochbauten und außergewöhnliche Bemessungssituationen
We must think about the case where the NA does not define a value for the current country. At the moment if some countries define a NDP and some don't, a NotImplementedError is thrown
In the NA.csv we could have a line referencing this parameter just like in the other NA that do have a value for the NDP except instead of a value it could be a flag value/string etc, that triggers a call to the default value. That way we have to programme it to intentionally access the default value. And if we haven't programmed it it will still throw the not implemented error.
Is your feature request related to a problem? Please describe. The eurocodes allow the national annexes to set national defined parameters (NDP). For example in germany $\gamma_{M1} = 1.10$ is set in their national annex to EN 1993-1-1.
A list of the national standardization committess can be found in https://support.clearcalcs.com/article/150-eurocodes-and-national-annexes-where-to-get-them
Describe the solution you'd like I propose adding a
@NDP
decorator in a new moduleeurocodedesign.core.NA
. A function with this decorator supports/uses a national defined parameter and must have acountry
parameter to set the national defined parameter internally.The national country is set with the national country code as string, like
de
(ISO-3166-1 ALPHA-2), not the abbreviation of the standard comittee likeDIN
. It can be set globally via the functioneurocodesign.core.NA.set_country(country='de')
or by calling the function directly withfunction_name(country="de")
. For the last call, the national country is only set for the function context.Each Eurocode standard directory gets an internal folder
_NA/
, which has mutiple csv-file for each country containing the columns 'NDP_identifier,version,NDP,comment', e.g.de.csv, nl.csv
containing the necessary infos for the nationalization of the function.The nationalized function can call the helper function
eurocodedesign.core.NA.load_NDP(ndp_id='5.11#gamma_M1', country='de')
Example:
Describe alternatives you've considered
ndp
instead ofcountry
, but this would be unspecificAdditional context